/* =========================================================
   ROSEWOOD FACTORY — Dark Wood Theme
   ========================================================= */

/* ---------- CSS Variables ---------- */
:root {
    --primary:      #C8860A;
    --primary-dark: #A06808;
    --primary-light:#F0B429;
    --gold:         #D4A017;
    --bg:           #0A0806;
    --bg-card:      #141210;
    --bg-section:   #100E0C;
    --bg-section2:  #0D0B09;
    --text:         #E8DDD0;
    --text-muted:   #8A7E72;
    --text-light:   #BFB3A7;
    --border:       #2A2018;
    --border-light: #3A3028;
    --white:        #FFFFFF;
    --radius:       6px;
    --shadow:       0 8px 32px rgba(0,0,0,0.5);
    --transition:   0.4s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

body[dir="ltr"] { font-family: 'Poppins', 'Cairo', sans-serif; }
body[dir="rtl"] { font-family: 'Cairo', 'Poppins', sans-serif; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Cairo', serif;
    color: var(--text);
    line-height: 1.3;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] h4,
body[dir="rtl"] h5,
body[dir="rtl"] h6 {
    font-family: 'Cairo', 'Playfair Display', serif;
}

::selection { background: var(--primary); color: #fff; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 3px; }

/* ---------- Utility ---------- */
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-label::before,
.section-label::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: var(--primary);
    vertical-align: middle;
}
.section-label::before { margin-inline-end: 10px; }
.section-label::after  { margin-inline-start: 10px; }

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
}

.section-subtitle.centered { margin-inline: auto; text-align: center; }

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    margin-bottom: 20px;
}
.divider.centered { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn-rw {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-rw-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-rw-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200,134,10,0.35);
}

.btn-rw-outline {
    background: transparent;
    color: var(--primary-light);
    border-color: var(--primary);
}
.btn-rw-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-rw-ghost {
    background: rgba(200,134,10,0.08);
    color: var(--primary-light);
    border-color: var(--border-light);
}
.btn-rw-ghost:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ---------- Navbar ---------- */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 18px 0;
    transition: all var(--transition);
    /* Dark-to-transparent gradient keeps links readable on any hero image */
    background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
}

#navbar.scrolled {
    padding: 10px 0;
    background: rgba(10, 8, 6, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* When mobile menu is open, navbar always has solid background (no transparent gradient) */
body.nav-open #navbar {
    background: rgba(10, 8, 6, 0.97);
    backdrop-filter: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.nav-brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 1px;
    line-height: 1.1;
}
body[dir="rtl"] .nav-brand-name { font-family: 'Cairo', serif; }

.nav-brand-logo {
    max-height: 48px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.nav-brand-tagline {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 16px;
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-light);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 60%; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    color: var(--text-light);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--transition);
    background: rgba(255,255,255,0.04);
}
.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(200,134,10,0.1);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero / Carousel ---------- */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.carousel-inner, .carousel-item { height: 100%; }

.carousel-item .slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transition: transform 6s ease;
}
.carousel-item.active .slide-bg { transform: scale(1); }

/* ── YouTube video slide ── */
.slide-yt-playing .slide-bg,
.slide-yt-playing .slide-content,
.slide-yt-playing .yt-play-overlay { display: none !important; }

.yt-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.yt-play-overlay:hover { background: rgba(0,0,0,0.15); }

.yt-play-btn {
    width: 82px; height: 82px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.88);
    border: 3px solid rgba(255,255,255,0.85);
    color: #fff;
    font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 35px rgba(0,0,0,0.55);
}
.yt-play-btn:hover { transform: scale(1.1); background: #f00; box-shadow: 0 12px 45px rgba(255,0,0,0.45); }

.yt-play-label {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    letter-spacing: 0.5px;
}

.yt-iframe-wrap {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: #000;
    display: none;
}
.yt-iframe-wrap iframe {
    width: 100%; height: 100%;
    border: none;
}

.yt-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 60;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
}
.yt-close-btn:hover { background: rgba(220,50,50,0.85); transform: scale(1.1); }

.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Strong top → light middle → dark bottom:
       top covers navbar area, bottom covers slide text */
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.60) 0%,
        rgba(0,0,0,0.08) 40%,
        rgba(10,8,6,0.78) 100%
    );
}

.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

body[dir="rtl"] .slide-content { align-items: flex-end; text-align: right; }
body[dir="ltr"] .slide-content { align-items: flex-start; text-align: left; }

.slide-label {
    font-size: 0.78rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInDown 0.8s 0.2s forwards;
}

.slide-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInDown 0.8s 0.4s forwards;
}

.slide-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.75);
    margin-bottom: 36px;
    max-width: 500px;
    opacity: 0;
    animation: fadeInDown 0.8s 0.6s forwards;
}

.slide-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s 0.8s forwards;
}

/* Carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px; height: 50px;
    background: rgba(200,134,10,0.2);
    border: 1px solid rgba(200,134,10,0.4);
    border-radius: 50%;
    top: 50%; transform: translateY(-50%);
    transition: all var(--transition);
    opacity: 1;
}
.carousel-control-prev { left: 24px; }
.carousel-control-next { right: 24px; }
.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.carousel-control-prev-icon,
.carousel-control-next-icon { width: 20px; height: 20px; }

/* ── Slide thumbnail coverflow strip ── */
.slide-thumbs {
    position: absolute;
    bottom: 24px;
    left: 0; right: 0;
    height: 100px;          /* tall enough for active thumb + any lift */
    z-index: 25;
    pointer-events: none;   /* container is transparent — thumbs handle their own clicks */
}

.slide-thumb {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 112px;
    height: 70px;
    margin-left: -56px;     /* centre on 50% axis by default */
    border-radius: 9px;
    background-image: var(--thumb-bg);
    background-size: cover;
    background-position: center;
    border: 2.5px solid rgba(255,255,255,0.15);
    cursor: pointer;
    overflow: hidden;
    pointer-events: auto;
    transform-origin: bottom center;   /* scale grows/shrinks from the bottom edge */
    box-shadow: 0 6px 22px rgba(0,0,0,0.6);
    /* JS sets transform, opacity, filter — transition animates them smoothly */
    transition: transform   0.48s cubic-bezier(0.34, 1.15, 0.64, 1),
                opacity     0.35s ease,
                filter      0.35s ease,
                border-color 0.3s ease,
                box-shadow  0.35s ease;
}

/* Dim overlay — JS controls brightness via filter, ::before adds inner vignette */
.slide-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.42);
    transition: background 0.3s;
    pointer-events: none;
}
.slide-thumb.active::before { background: rgba(0,0,0,0.04); }

/* Active: gold border + stronger shadow (transform set by JS) */
.slide-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 14px 38px rgba(0,0,0,0.72), 0 0 0 1px rgba(200,134,10,0.45);
}

/* Hover hint on non-active thumbs */
.slide-thumb:hover:not(.active) {
    border-color: rgba(255,255,255,0.5);
}

/* YouTube icon badge */
.slide-thumb-yt {
    position: absolute;
    inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    pointer-events: none;
}

@media (max-width: 600px) {
    .slide-thumbs { bottom: 16px; height: 72px; }
    .slide-thumb  { width: 74px; height: 46px; margin-left: -37px; border-radius: 6px; }
}

/* Scroll indicator */
.scroll-down {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}
.scroll-down i { font-size: 1.2rem; }

/* ---------- Section Padding ---------- */
.rw-section { padding: 90px 0; }
.rw-section-sm { padding: 60px 0; }
.bg-section  { background-color: var(--bg-section); }
.bg-section2 { background-color: var(--bg-section2); }

.container-rw {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- About Section ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

body[dir="rtl"] .about-grid { direction: rtl; }

.about-image-wrap {
    position: relative;
}

.about-image-main {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.about-image-badge {
    position: absolute;
    bottom: -20px;
    inset-inline-end: -20px;
    background: var(--primary);
    color: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(200,134,10,0.4);
}
.about-image-badge .badge-num {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    font-family: 'Playfair Display', serif;
}
.about-image-badge .badge-text {
    font-size: 0.75rem;
    letter-spacing: 1px;
    opacity: 0.9;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 28px 0 36px;
}

.about-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 0.95rem;
}
.about-feature-item i {
    width: 20px; height: 20px;
    color: var(--primary);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.about-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.product-action-btns { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Categories Section ---------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 48px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
    cursor: pointer;
}
.category-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(200,134,10,0.15);
}

.category-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
}
.category-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.category-card:hover .category-card-img img { transform: scale(1.08); }

.category-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,8,6,0.7) 0%, transparent 60%);
}

.category-card-icon {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 44px; height: 44px;
    background: rgba(200,134,10,0.9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    z-index: 2;
}

.category-card-body {
    padding: 20px 22px 22px;
}

.category-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    transition: color var(--transition);
}
.category-card:hover .category-card-name { color: var(--primary-light); }

.category-card-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.category-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap var(--transition), color var(--transition);
}
.category-card:hover .category-card-link { gap: 10px; color: var(--primary-light); }

/* Sub-category chips shown on index page */
.category-sub-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}
.category-sub-chip {
    font-size: 0.68rem;
    background: rgba(200,134,10,0.1);
    border: 1px solid rgba(200,134,10,0.2);
    color: var(--primary);
    border-radius: 30px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* =====================================================
   CATALOG LAYOUT  (categories/index)
   ===================================================== */

.catalog-layout {
    display: flex;
    align-items: flex-start;
    min-height: 70vh;
    gap: 0;
}

/* ── Sidebar ── */
.catalog-sidebar {
    width: 290px;
    flex-shrink: 0;
    background: #0d0b09;
    border-inline-end: 1px solid var(--border);
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 70px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.sidebar-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}
.sidebar-mobile-header i { transition: transform 0.3s ease; }
.sidebar-mobile-header i.rotated { transform: rotate(180deg); }

.sidebar-body {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(200,134,10,0.25) transparent;
}
.sidebar-body::-webkit-scrollbar { width: 4px; }
.sidebar-body::-webkit-scrollbar-thumb { background: rgba(200,134,10,0.25); border-radius: 2px; }

/* Search */
.sidebar-search-wrap {
    position: relative;
    padding: 14px 14px 8px;
}
.sidebar-search-icon {
    position: absolute;
    inset-inline-start: 26px;
    top: 50%;
    transform: translateY(-40%);
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
}
.sidebar-search-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px 8px 32px;
    color: var(--text);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
[dir="rtl"] .sidebar-search-input { padding: 8px 32px 8px 14px; }
.sidebar-search-input:focus { border-color: rgba(200,134,10,0.5); }

/* Tree controls (Expand All / Collapse All) */
.sidebar-tree-controls {
    display: flex;
    gap: 6px;
    padding: 0 14px 10px;
}
.sidebar-ctrl-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(200,134,10,0.06);
    border: 1px solid rgba(200,134,10,0.2);
    border-radius: 7px;
    padding: 6px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.sidebar-ctrl-btn:hover {
    background: rgba(200,134,10,0.14);
    border-color: rgba(200,134,10,0.45);
}
.sidebar-ctrl-btn i { font-size: 0.65rem; }

/* Tree */
.catalog-tree {
    padding: 8px 0 20px;
}

.tree-node { position: relative; }

.tree-node-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-inline-start: 2px solid transparent;
    user-select: none;
}
.tree-node-row:hover {
    background: rgba(200,134,10,0.07);
    color: var(--primary);
}
.tree-node-row.active {
    background: rgba(200,134,10,0.12);
    border-inline-start-color: var(--primary);
    color: var(--primary);
}
.tree-node-row.active .tree-node-icon,
.tree-node-row.active .tree-node-name { color: var(--primary); }

/* ── Children container — trunk line via border ── */
/*
 * Alignment math (RTL & LTR identical via logical props):
 *   .tree-node-row  border-inline-start : 2px
 *   .tree-node-row  padding-inline-start: 14px
 *   Total to first flex item            : 16px
 *   .tree-toggle width                  : 20px  →  centre at 16 + 10 = 26px
 *   trunk (1.5px border) centre         : margin + 0.75px = 26px
 *   ∴ margin-inline-start               : 25px  (25 + 0.75 ≈ 26px ✓)
 *
 *   padding-inline-start: 14px  →  children content at 25 + 14 = 39px
 *   horizontal connector: from trunk (25px) → content (39px) = 14px wide
 *   connector inset-inline-start: -14px (relative to child .tree-node)
 */
.tree-children {
    display: none;
    padding-inline-start: 14px;
    margin-inline-start: 25px;
    border-inline-start: 1.5px solid rgba(200,134,10,0.35);
}
.tree-children .tree-node-row { padding-top: 7px; padding-bottom: 7px; font-size: 0.88rem; }

/* Horizontal connector from trunk to each child row */
.tree-children > .tree-node {
    position: relative;
}
.tree-children > .tree-node::before {
    content: '';
    position: absolute;
    top: 14px;
    inset-inline-start: -14px;
    height: 1.5px;
    background: rgba(200,134,10,0.35);
    border-radius: 1px;
    /*
     * Default (leaf nodes — have .tree-toggle-placeholder):
     *   row: border(2px) + padding(14px) + placeholder(20px) + gap(8px) = icon at 44px
     *   endpoint = -14 + 54 = 40px into .tree-node  →  4px before icon  ✓
     * Overridden below for parent nodes that have a .tree-toggle button.
     */
    width: 54px;
}

/*
 * Nodes that have children (contain .tree-toggle with +/- button):
 * Stop the line exactly at the toggle button's inline-start edge.
 *   .tree-node-row border(2px) + padding-inline-start(14px) = 16px to button
 *   -14 + 30 = 16px  →  line ends flush at button edge, no overlap
 */
.tree-children > .tree-node:has(.tree-toggle)::before {
    width: 30px;
}

/* ── +/- Toggle button ── */
.tree-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
}
.tree-toggle:hover .tree-pm { background: rgba(200,134,10,0.18); border-color: var(--primary); }
.tree-toggle-placeholder { width: 20px; flex-shrink: 0; }

.tree-pm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1.5px solid rgba(200,134,10,0.45);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    background: rgba(200,134,10,0.07);
    font-family: monospace;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}
.tree-pm::before { content: '+'; }
.tree-toggle.open .tree-pm::before { content: '−'; }

.tree-node-icon {
    font-size: 0.82rem;
    color: var(--primary);
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}
.tree-node-name {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.3;
}
.tree-node-count {
    font-size: 0.65rem;
    background: rgba(200,134,10,0.12);
    color: rgba(200,134,10,0.8);
    border-radius: 30px;
    padding: 1px 7px;
    flex-shrink: 0;
}

/* ── Main Panel ── */
.catalog-main {
    flex: 1;
    min-width: 0;
    min-height: 60vh;
    padding: 36px 40px;
}

/* Welcome state */
.catalog-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}
.catalog-welcome-inner {
    text-align: center;
    max-width: 360px;
}
.catalog-welcome-icon {
    font-size: 3rem;
    color: rgba(200,134,10,0.3);
    margin-bottom: 20px;
    animation: welcomePulse 2.5s infinite;
}
@keyframes welcomePulse {
    0%,100% { opacity: 0.3; transform: translateX(0); }
    50%      { opacity: 0.7; transform: translateX(-6px); }
}
[dir="ltr"] @keyframes welcomePulse {
    50% { transform: translateX(6px); }
}
.catalog-welcome-inner h3 {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}
.catalog-welcome-inner p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Panel breadcrumb */
.catalog-panel-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.catalog-panel-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}
.catalog-panel-breadcrumb a:hover { text-decoration: underline; }
.catalog-panel-breadcrumb .sep-icon { font-size: 0.65rem; opacity: 0.5; }

/* Panel header */
.catalog-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.catalog-panel-icon {
    width: 52px; height: 52px;
    background: rgba(200,134,10,0.1);
    border: 1px solid rgba(200,134,10,0.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}
.catalog-panel-title {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    color: var(--text);
    margin-bottom: 6px;
}
.catalog-panel-desc {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Sub-collections inside panel */
.catalog-sub-section { margin-bottom: 28px; }
.catalog-sub-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.catalog-sub-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.catalog-sub-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
    font-size: 0.85rem;
    font-family: inherit;
}
.catalog-sub-card:hover {
    background: rgba(200,134,10,0.08);
    border-color: rgba(200,134,10,0.35);
    color: var(--primary);
    transform: translateY(-2px);
}
.catalog-sub-card i { color: var(--primary); font-size: 0.85rem; }
.catalog-sub-name { font-weight: 600; }
.catalog-sub-count {
    background: rgba(200,134,10,0.12);
    color: var(--primary);
    font-size: 0.68rem;
    border-radius: 30px;
    padding: 1px 8px;
}

/* Divider between sub-categories and products */
.catalog-divider {
    position: relative;
    text-align: center;
    margin: 28px 0;
}
.catalog-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-start: 0;
    width: 100%;
    height: 1px;
    background: var(--border);
}
.catalog-divider span {
    position: relative;
    background: var(--bg);
    padding: 0 14px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

/* Products grid inside panel (override for smaller gap) */
.catalog-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Skeleton loader */
.catalog-skeleton { padding: 20px 0; }
.skeleton-header {
    height: 60px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 10px;
    margin-bottom: 28px;
}
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.skeleton-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.skeleton-img {
    height: 180px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
.skeleton-line {
    height: 12px;
    margin: 14px 16px 8px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-55 { width: 55%; }
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .catalog-layout { flex-direction: column; }

    .catalog-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-inline-end: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-mobile-header { display: flex; }
    .sidebar-body { display: none; max-height: 60vh; overflow-y: auto; }

    .catalog-main { padding: 24px 20px; }
    .catalog-welcome { min-height: 30vh; }
}

@media (max-width: 575px) {
    .catalog-main { padding: 20px 16px; }
    .catalog-sub-grid { flex-direction: column; }
}

/* =====================================================
   END CATALOG LAYOUT
   ===================================================== */

/* ---------- Products Grid ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition);
}
.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-light);
    box-shadow: 0 10px 32px rgba(0,0,0,0.4);
}

.product-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #111;
}
.product-card-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.06); }

.product-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,8,6,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.product-card:hover .product-card-overlay { opacity: 1; }

.product-card-body { padding: 18px 20px; }

.product-card-cat {
    font-size: 0.72rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.product-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Features Section ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
    margin-top: 56px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px 28px;
    text-align: center;
    transition: all var(--transition);
}
.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(200,134,10,0.12);
}

.feature-icon {
    width: 64px; height: 64px;
    background: rgba(200,134,10,0.1);
    border: 1px solid rgba(200,134,10,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
    color: var(--primary);
    transition: all var(--transition);
}
.feature-card:hover .feature-icon {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-body {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---------- Stats ---------- */
.stats-wrap {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(200,134,10,0.05) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 56px 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item { padding: 20px 12px; }

.stat-number {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--primary-light);
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ---------- Contact Section ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 56px;
    align-items: start;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    align-items: flex-start;
}
.contact-info-icon {
    width: 44px; height: 44px;
    background: rgba(200,134,10,0.1);
    border: 1px solid rgba(200,134,10,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    font-size: 1rem;
}
.contact-info-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.contact-info-value {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Contact Form */
.rw-form .form-group { margin-bottom: 20px; }

.rw-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.rw-form input,
.rw-form textarea,
.rw-form select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}
.rw-form input:focus,
.rw-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(200,134,10,0.12);
}
.rw-form textarea { min-height: 130px; resize: vertical; }
.rw-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rw-form .is-invalid { border-color: #e05; }
.rw-form .invalid-feedback { color: #e05; font-size: 0.78rem; margin-top: 4px; }

/* ---------- Footer ---------- */
#footer {
    background: var(--bg-section2);
    border-top: 1px solid var(--border);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
}

.footer-brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 6px;
    display: block;
}
body[dir="rtl"] .footer-brand-name { font-family: 'Cairo', serif; }

.footer-brand-logo {
    max-height: 60px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
    display: block;
    filter: brightness(1.1);
}

.footer-brand-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 10px;
}
.social-link {
    width: 40px; height: 40px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition);
}
.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}
.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 28px; height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links-list a {
    color: var(--text-muted);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}
.footer-links-list a i { font-size: 0.5rem; color: var(--primary); }
.footer-links-list a:hover { color: var(--primary-light); padding-inline-start: 4px; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

/* ---------- Page Hero ---------- */
.page-hero {
    padding: 160px 0 80px;
    background: var(--bg-section);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.page-hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.breadcrumb-rw {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    list-style: none;
    flex-wrap: wrap;
}
.breadcrumb-rw li { display: flex; align-items: center; gap: 8px; }
.breadcrumb-rw a { color: var(--primary); }
.breadcrumb-rw .sep { color: var(--border-light); }

/* ---------- Product Detail ---------- */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

/* ── Product Gallery ──────────────────────────────────────────────────── */
.product-gallery { position: sticky; top: 100px; }

/* Main display wrapper */
.pg-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-height: calc(100vh - 230px); /* sticky top (100px) + thumbs (84px) + margins */
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--bg);
}
.pg-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}
.pg-main-video {
    width: 100%;
    height: 100%;
}

/* Fullscreen button */
.pg-fs-btn {
    position: absolute;
    bottom: 10px;
    inset-inline-end: 10px;
    width: 34px; height: 34px;
    border-radius: 8px;
    border: none;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.pg-fs-btn:hover { background: rgba(200,134,10,0.85); }

/* Thumbnail strip */
.pg-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-dark) transparent;
}
.pg-thumb-item {
    flex-shrink: 0;
    width: 72px; height: 72px;
    border-radius: 8px;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
    background: var(--bg);
}
.pg-thumb-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.pg-thumb-item.active,
.pg-thumb-item:hover { border-color: var(--primary); }
.pg-thumb-noimg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 1.4rem;
}
.pg-thumb-play {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 0.9rem;
    pointer-events: none;
}

/* ── Lightbox ──────────────────────────────────────────────────────────── */
.pg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.pg-lightbox[aria-hidden="false"] { display: flex; }

.pg-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: pointer;
}

/* Full-viewport flex column — content is always truly centered */
.pg-lb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* padding keeps content away from the fixed close-btn (top) and arrows (sides) */
    padding: 64px 88px 40px;
    box-sizing: border-box;
    pointer-events: none;
}

/* Content cell: takes all available width so image/video can fill it */
.pg-lb-display {
    width: 100%;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image inside lightbox */
.pg-lb-display img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 10px;
}

/* Video wrapper inside lightbox */
.pg-lb-display .lb-video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
}
.pg-lb-display .lb-video-wrap iframe {
    width: 100%; height: 100%;
    border: none;
}

.pg-lb-close {
    position: fixed;
    top: 16px;
    inset-inline-end: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    pointer-events: all;
    transition: background 0.2s;
    z-index: 2;
}
.pg-lb-close:hover { background: rgba(200,134,10,0.75); }

.pg-lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    pointer-events: all;
    transition: background 0.2s;
    z-index: 2;
}
.pg-lb-arrow:hover { background: rgba(200,134,10,0.75); }
.pg-lb-prev { inset-inline-start: 16px; }
.pg-lb-next { inset-inline-end: 16px; }

.pg-lb-counter {
    margin-top: 14px;
    color: rgba(255,255,255,0.55);
    font-size: 0.82rem;
    pointer-events: none;
    flex-shrink: 0;
}
body.lb-open { overflow: hidden; }

.product-category-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(200,134,10,0.1);
    border: 1px solid rgba(200,134,10,0.2);
    padding: 4px 12px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.product-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.25;
}

.product-short-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.product-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 28px;
}
.spec-item {}
.spec-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.spec-value {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 600;
}

.product-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}
.product-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.92rem;
}
.product-features-list li i { color: var(--primary); font-size: 0.8rem; }

/* ---------- Back To Top ---------- */
#back-to-top {
    position: fixed;
    bottom: 28px;
    inset-inline-end: 28px;
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
    z-index: 500;
    box-shadow: 0 4px 16px rgba(200,134,10,0.4);
}
#back-to-top.visible { display: flex; }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ---------- Loading Spinner ---------- */
.rw-spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ---------- Toast Notification ---------- */
.rw-toast {
    position: fixed;
    bottom: 24px;
    inset-inline-start: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-inline-start: 3px solid var(--primary);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 0.9rem;
    color: var(--text);
    box-shadow: var(--shadow);
    z-index: 9999;
    transform: translateY(16px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 340px;
}
.rw-toast.show { transform: translateY(0); opacity: 1; }
.rw-toast.success { border-inline-start-color: #2d9e5e; }
.rw-toast.error   { border-inline-start-color: #e04545; }

/* ---------- No Results ---------- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 20px; color: var(--border-light); }
.empty-state p { font-size: 1.05rem; }

/* ---------- Animations ---------- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

.wow { visibility: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .about-grid,
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .stats-wrap { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .product-gallery { position: static; }
}

@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: fixed;
        top: 0; left: 0; right: 0; bottom: 0; height: 100vh;
        background: rgba(10,8,6,0.97);
        justify-content: center; align-items: center; gap: 8px; z-index: 999; }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1.1rem; padding: 14px 24px; }
    .nav-toggle { display: flex; position: relative; z-index: 1001; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-wrap { grid-template-columns: 1fr 1fr; padding: 40px 20px; }
    .rw-form .form-row { grid-template-columns: 1fr; }
    .product-specs { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .products-grid  { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .about-image-badge { bottom: -10px; inset-inline-end: 10px; }
    .slide-btns { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .stats-wrap { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Product Attribute Switcher
   ========================================================= */
.product-attr-switcher { margin: 20px 0; display: flex; flex-direction: column; gap: 16px; }
.attr-group-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.attr-group-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.attr-sw-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 30px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-muted); font-size: 0.83rem; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.attr-sw-btn:hover { border-color: var(--primary); color: var(--text); }
.attr-sw-btn.active { border-color: var(--primary); background: rgba(200,134,10,0.12); color: var(--primary); }
.attr-sw-swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); flex-shrink: 0; }
.attr-info-image img { display: block; }
