/* ==========================================================================
   SIRAJ UNIFIED CATALOG STYLES (catalog.css)
   Architectural Serenity & Product Architectural Card System
   ========================================================================== */

/* 1. CATALOG PAGE LAYOUT & HEADER */
.catalog-page-wrapper {
    background: #FAF7F2;
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 80px;
    direction: rtl;
    font-family: var(--font-main, 'KOSans', 'Outfit', sans-serif);
}

.catalog-header {
    max-width: 1200px;
    margin: 20px auto 16px;
    padding: 0px;
}

.product-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #8A8580;
}

.breadcrumbs a {
    color: #8A8580;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #1C1917;
}

.crumb-sep {
    color: #C5C0B8;
}

.crumb-current {
    color: #1C1917;
    font-weight: 600;
}

.products-count-badge {
    font-size: 0.82rem;
    font-weight: 500;
    color: #8A8580;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   2. STICKY ARCHITECTURAL FILTER BAR
   ========================================================================== */
.catalog-filter-bar {
    padding: 14px 24px;
    margin-bottom: 32px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.catalog-filter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Culture Capsule Tabs */
.culture-capsule-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.culture-capsule {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #605953;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
}

.culture-capsule:hover {
    border-color: #D74E09;
    color: #D74E09;
    background: rgba(215, 78, 9, 0.04);
}

.culture-capsule.is-active {
    background: #D74E09;
    color: #FFFFFF;
    border-color: #D74E09;
    box-shadow: 0 4px 12px rgba(215, 78, 9, 0.2);
}

/* Sorting & Type Custom Architectural Dialogs */
.filter-selects-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.catalog-select-wrapper {
    position: relative;
    display: inline-block;
}

.catalog-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #FAF9F5;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1C1917;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    min-width: 140px;
}

.catalog-select-btn:hover,
.catalog-select-wrapper.is-open .catalog-select-btn {
    border-color: #D74E09;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(215, 78, 9, 0.1);
}

.catalog-select-icon {
    font-size: 0.8rem;
    color: #8A8580;
    transition: transform 0.25s ease, color 0.25s ease;
}

.catalog-select-wrapper.is-open .catalog-select-icon {
    transform: rotate(180deg);
    color: #D74E09;
}

/* Floating Dialog Popover Card */
.select-dialog-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0px;
    z-index: 120;
    min-width: 200px;
    background: #FAF9F5;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 2px solid #D74E09;
    border-radius: 18px;
    box-shadow: 0 0 0 1px rgba(215, 78, 9, 0.15), 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 8px;
    transform: translateY(-8px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.catalog-select-wrapper.is-open .select-dialog-popover {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Dialog Top Header Title */
.select-dialog-header {
    padding: 6px 10px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 4px;
}

.dialog-header-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8A8580;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Dialog Option Item */
.select-dialog-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.select-dialog-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #1C1917;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: right;
}

.select-dialog-option:hover {
    background: rgba(215, 78, 9, 0.08);
    color: #D74E09;
}

.select-dialog-option .option-check {
    opacity: 0;
    color: #D74E09;
    font-size: 0.85rem;
    font-weight: 700;
    transition: opacity 0.18s ease;
}

.select-dialog-option.is-selected {
    background: rgba(215, 78, 9, 0.12);
    color: #D74E09;
    font-weight: 700;
}

.select-dialog-option.is-selected .option-check {
    opacity: 1;
}

/* ==========================================================================
   3. PRODUCT ARCHITECTURAL CARDS GRID (.catalog-grid)
   Exact match to curated-grid dimensions & style
   ========================================================================== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 32px auto 48px;
    padding: 0 24px;
    box-sizing: border-box;
}

.product-architectural-card {
    position: relative;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: border-color 0.4s ease, opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.product-architectural-card:hover {
    border-color: var(--amber-glow, #D74E09);
}

.card-image-window {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #F5F1EA;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.product-img.img-base {
    z-index: 1;
    opacity: 1;
}

.product-img.img-glow {
    display: none !important;
}

.product-architectural-card:hover .product-img {
    transform: scale(1.03);
}

/* Card Meta & Typography */
.card-meta {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    background: #FFFFFF;
    flex-grow: 1;
}

.card-info {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "tag price"
        "title title";
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
}

.product-culture-tag {
    grid-area: tag;
    font-size: 0.74rem;
    font-weight: 400;
    color: #8A8580;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title {
    grid-area: title;
    width: 100%;
    font-size: 0.94rem;
    font-weight: 600;
    color: #111318;
    margin: 0;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.product-price {
    grid-area: price;
    font-size: 0.92rem;
    font-weight: 700;
    color: #D74E09;
    white-space: nowrap;
    display: block;
}

/* Floating Wishlist Action on Desktop (> 786px) */
.card-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-wishlist-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111318;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(17, 19, 24, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.add-wishlist-icon-btn:hover {
    background: #FFFFFF;
    color: #D74E09;
    border-color: rgba(215, 78, 9, 0.25);
    transform: scale(1.06);
}

.add-wishlist-icon-btn.is-active {
    background: #FFFFFF;
    color: #D74E09;
    border-color: rgba(215, 78, 9, 0.32);
    box-shadow: 0 4px 14px rgba(215, 78, 9, 0.16);
}

.wishlist-btn-text {
    display: none;
}

/* Empty State */
.catalog-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #8A8580;
}

.catalog-empty-state p {
    font-size: 1rem;
    color: #111318;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 600px) {
    .catalog-filter-bar {
        padding: 12px 16px;
    }
    
    .culture-capsule {
        padding: 6px 14px;
        font-size: 0.82rem;
    }
}
