/* ==========================================================================
   SIRAJ ARCHITECTURAL MOOD BUILDER STYLES (mood-builder.css)
   Pure Minimalist Architectural Room Canvas & Interactive Fixtures Dock
   ========================================================================== */

/* 1. PAGE LAYOUT & CONTAINER */
.mood-builder-page {
    background: #FAF7F2;
    min-height: 100vh;
    direction: rtl;
    font-family: var(--font-main, 'KOSans', 'Outfit', sans-serif);
    color: #1C1917;
    margin: 0;
    padding-top: 80px;
    padding-bottom: 80px;
    box-sizing: border-box;
}

/* 2. TOP BAR & BREADCRUMBS (Matching catalog.html) */
.catalog-header {
    max-width: 1200px;
    margin: 20px auto 16px;
}

.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);
}

.mood-hero-section {
    max-width: 1200px;
    margin: 10px auto 0;
    padding: 0 24px;
    text-align: center;
}

.mood-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #D74E09;
    background: rgba(215, 78, 9, 0.08);
    border: 1px solid rgba(215, 78, 9, 0.15);
    padding: 4px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.mood-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1C1917;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.mood-hero-desc {
    font-size: 0.92rem;
    color: #605953;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ==========================================================================
   2. ARCHITECTURAL SIMULATION CANVAS STAGE (.mood-canvas-stage)
   ========================================================================== */
.mood-canvas-container {
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 0 24px;
}

.mood-canvas-stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.room-layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.room-layer,
.cover-patch img {
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter;
}

/* فئة مرحلية لتسهيل التبديل البصري */
.mood-canvas-stage.is-switching .room-layer {
  filter: blur(4px) brightness(0.92);
  opacity: 0.6;
}

/* رقع التغطية: تأخذ نفس حجم وموضع الصورة تماماً وتستخدم mask ناعم فوق مكان المصباح */
.cover-patch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* مخفية افتراضياً = المصباح يظهر */
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.cover-patch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* تفعيل الرقعة يعني تغطية المصباح بالصورة الفارغة */
.cover-patch.is-hidden {
  opacity: 1;
}

/* قناع الثريا السقفية: تم تضييق العرض الأفقي وحصره في المنتصف (عرض 22% بدلاً من 35%) لمنع الوصول للمصباح الأرضي */
.patch-ceiling {
  -webkit-mask-image: radial-gradient(ellipse 22% 34% at 50% 22%, black 65%, rgba(0,0,0,0.2) 85%, transparent 100%);
  mask-image: radial-gradient(ellipse 22% 34% at 50% 22%, black 65%, rgba(0,0,0,0.2) 85%, transparent 100%);
}

/* قناع المصباح الأرضي: تم تركيزه في اليمين وعزله عن منطقة المنتصف */
.patch-floor {
  -webkit-mask-image: radial-gradient(ellipse 28% 50% at 75% 50%, black 65%, rgba(0,0,0,0.2) 85%, transparent 100%);
  mask-image: radial-gradient(ellipse 28% 50% at 75% 50%, black 65%, rgba(0,0,0,0.2) 85%, transparent 100%);
}

/* قناع الطاولة (يبقى ثابتاً لنجاحه عبر الثقافات) */
.patch-table {
  -webkit-mask-image: radial-gradient(ellipse 25% 32% at 11% 58%, black 65%, rgba(0,0,0,0.2) 85%, transparent 100%);
  mask-image: radial-gradient(ellipse 25% 32% at 11% 58%, black 65%, rgba(0,0,0,0.2) 85%, transparent 100%);
}

/* CULTURE SELECTOR TABS */
.room-culture-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.culture-capsule {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #605953;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.86rem;
    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);
}

/* ==========================================================================
   4. FLOATING FIXTURES DOCK BAR (.mood-fixtures-dock)
   ========================================================================== */
.mood-fixtures-dock {
    max-width: 1080px;
    margin: 24px auto 0;
    background: rgba(250, 249, 245, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

/* CATEGORY TABS BAR */
.dock-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

.dock-tab-btn {
    background: transparent;
    border: none;
    color: #605953;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    padding: 6px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.22s ease;
}

.dock-tab-btn:hover {
    color: #1C1917;
    background: rgba(0, 0, 0, 0.04);
}

.dock-tab-btn.is-active {
    color: #D74E09;
    background: rgba(215, 78, 9, 0.08);
    border: 1px solid rgba(215, 78, 9, 0.15);
}

/* FIXTURES LIST IN DOCK */
.dock-fixtures-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0;
    scroll-behavior: smooth;
}

.dock-fixtures-list::-webkit-scrollbar {
    height: 4px;
}

.dock-fixtures-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* FIXTURE DOCK CARD */
.fixture-dock-card {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    position: relative;
}

.fixture-dock-card:hover {
    border-color: rgba(215, 78, 9, 0.35);
    box-shadow: 0 4px 16px rgba(215, 78, 9, 0.08);
    transform: translateY(-2px);
}

.fixture-dock-card.is-active {
    border-color: #D74E09;
    background: rgba(215, 78, 9, 0.04);
    box-shadow: 0 4px 18px rgba(215, 78, 9, 0.12);
}

.dock-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #F5F1EA;
    border: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.fixture-dock-card:hover .dock-card-thumb {
    transform: scale(1.04);
}

.dock-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
    min-width: 0;
}

.dock-card-type {
    font-size: 0.72rem;
    font-weight: 500;
    color: #8A8580;
}

.dock-card-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1C1917;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dock-card-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: #D74E09;
}

.dock-card-toggle {
    margin-right: auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #D5CEBE;
    background: #FAF7F2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    color: #FFFFFF;
}

.fixture-dock-card.is-active .dock-card-toggle {
    border-color: #D74E09;
    background: #D74E09;
    box-shadow: 0 2px 8px rgba(215, 78, 9, 0.3);
}

.dock-card-toggle svg {
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fixture-dock-card.is-active .dock-card-toggle svg {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   5. MOOD SUMMARY DOCK BAR (.mood-summary-dock)
   ========================================================================== */
.mood-summary-dock {
    max-width: 1080px;
    margin: 20px auto 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
}

.summary-dock-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-dock-label {
    font-size: 0.8rem;
    color: #8A8580;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-active-count {
    font-weight: 700;
    color: #1C1917;
}

.summary-dock-total {
    font-size: 1.15rem;
    font-weight: 700;
    color: #D74E09;
}

.mood-add-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 28px;
    border-radius: 24px;
    background: #D74E09;
    color: #FFFFFF;
    border: none;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px rgba(215, 78, 9, 0.25);
    white-space: nowrap;
}

.mood-add-all-btn:hover {
    background: #C04306;
    box-shadow: 0 6px 22px rgba(215, 78, 9, 0.35);
    transform: translateY(-1px);
}

.mood-add-all-btn:disabled {
    background: #A09A93;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 860px) {
    .mood-hero-title {
        font-size: 1.6rem;
    }

    .mood-canvas-stage {
        border-radius: 14px;
    }

    .dock-fixtures-list {
        justify-content: flex-start;
    }

    .fixture-dock-card {
        min-width: 200px;
    }

    .mood-summary-dock {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        text-align: center;
    }

    .mood-add-all-btn {
        width: 100%;
    }
}
