/* ==========================================================================
   1. TYPOGRAPHY & FONT DEFINITIONS
   ========================================================================== */
.font-vibes {
    font-family: 'Great Vibes', cursive !important;
}

.font-aref {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
}

.handwritten-title {
    font-family: 'Great Vibes', cursive !important;
    font-weight: 400;
    font-size: 38px;
    line-height: 1.15;
    color: #5c5343;
    text-transform: none;
    display: block;
    margin-bottom: 0.5rem;
}

.lang-en { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
}

.lang-ar { 
    font-family: 'Cairo', sans-serif; 
}

.serif-title { 
    font-family: 'Playfair Display', serif; 
}

/* ==========================================================================
   2. GENERAL UI & VIEWPORT
   ========================================================================== */
body { 
    padding-bottom: 76px; 
}

.glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.viewframe-img {
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
}

.viewframe-img.swapping {
    opacity: 0;
    transform: scale(0.98);
}

/* ==========================================================================
   3. HERO ROTATOR STRIP
   ========================================================================== */
#hero-rotator-strip {
    align-items: stretch;
}

.hero-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e7e5e4;
    aspect-ratio: 3 / 4;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    cursor: pointer;
}

.hero-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.hero-card:hover .hero-card-img {
    transform: scale(1.05);
}

.hero-card-info {
    position: absolute;
    left: 0; 
    right: 0; 
    bottom: 0;
    padding: 28px 10px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
}

.hero-card-title {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-card-price {
    font-size: 12px;
    font-weight: 900;
    margin-top: 3px;
    letter-spacing: 0.02em;
}

.hero-card.fading {
    opacity: 0;
    transform: scale(0.96);
}

/* Hide 3rd card on smaller mobile devices */
@media (max-width: 767px) {
    .hero-card-third { 
        display: none; 
    }
}

#hero-rotator-canvas {
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    object-fit: contain;
    padding: 1.5rem;
}

.hero-fade-out {
    opacity: 0 !important;
    transform: scale(1.03);
}

/* ==========================================================================
   4. BOTTOM NAVIGATION TABS
   ========================================================================== */
#bottom-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(214, 211, 209, 0.6);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px 8px;
    color: #78716c;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s ease, transform 0.15s ease;
    position: relative;
    font-family: inherit;
}

.tab-btn:active { 
    transform: scale(0.94); 
}

.tab-btn.active { 
    color: #0c0a09; 
}

.tab-btn.active .tab-icon { 
    transform: translateY(-1px); 
}

.tab-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
    stroke-width: 1.8;
}

.tab-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tab-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    background: #0c0a09;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.tab-badge.hidden-badge { 
    display: none; 
}

/* ==========================================================================
   5. CATEGORY BOTTOM DRAWER / SHEET
   ========================================================================== */
#category-sheet {
    position: fixed;
    bottom: 0; 
    left: 0; 
    right: 0;
    z-index: 46;
    background: #fff;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0));
    max-height: 70vh;
    overflow-y: auto;
}

#category-sheet.open { 
    transform: translateY(0); 
}

#category-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#category-sheet-overlay.open { 
    opacity: 1; 
    pointer-events: auto; 
}

.cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f4;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 15px;
    font-weight: 600;
    color: #1c1917;
}

.cat-item:active { 
    background: #fafaf9; 
}

.cat-item:last-child { 
    border-bottom: none; 
}

.cat-count {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #a8a29e;
    text-transform: uppercase;
}

/* ==========================================================================
   6. WHO'S THE PETAL (ABOUT) SECTION
   ========================================================================== */
#about-section { 
    display: none; 
}

#about-section.active { 
    display: block; 
}

.about-hero {
    position: relative;
    text-align: center;
    padding: 56px 24px 48px;
    background:
        radial-gradient(circle at 50% 0%, rgba(214, 195, 168, 0.35) 0%, rgba(247, 245, 240, 0) 62%),
        linear-gradient(180deg, #ffffff 0%, #faf8f3 100%);
    border: 1px solid #ece7dc;
    border-radius: 28px;
    overflow: hidden;
    margin-bottom: 36px;
}

.about-hero::before {
    content: "";
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(197, 168, 122, 0.16) 0%, rgba(197, 168, 122, 0) 70%);
    pointer-events: none;
}

.about-hero .about-kicker {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-weight: 800;
    color: #a89372;
    margin-bottom: 14px;
}

.about-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    line-height: 1.2;
    color: #1c1917;
    margin: 0 0 10px;
}

.about-hero .about-sub {
    font-family: 'Great Vibes', cursive !important;
    font-size: 26px;
    color: #a89372;
    margin-bottom: 20px;
}

.about-hero p.about-lead {
    max-width: 620px;
    margin: 0 auto;
    color: #57534e;
    font-size: 15px;
    line-height: 1.85;
}

.about-card {
    background: #ffffff;
    border: 1px solid #ece7dc;
    border-radius: 24px;
    padding: 34px 30px;
    margin-bottom: 26px;
    box-shadow: 0 6px 24px -14px rgba(60, 50, 35, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px -16px rgba(60, 50, 35, 0.28);
}

.about-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.about-card-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f6efe2 0%, #efe6d3 100%);
    border: 1px solid #e4d9c2;
}

.about-card-head h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    line-height: 1.2;
    color: #1c1917;
    margin: 0;
}

.about-card p {
    color: #57534e;
    font-size: 14.5px;
    line-height: 1.9;
    margin-bottom: 12px;
}

.about-card p:last-child { 
    margin-bottom: 0; 
}

.about-divider {
    height: 1px;
    border: 0;
    background: linear-gradient(90deg, rgba(197, 168, 122, 0) 0%, rgba(197, 168, 122, 0.55) 50%, rgba(197, 168, 122, 0) 100%);
    margin: 28px 0;
}

.about-quote {
    font-family: 'Great Vibes', cursive !important;
    font-size: 24px;
    line-height: 1.4;
    color: #8a7452;
    text-align: center;
    margin: 22px 0 6px;
}

.about-values-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

@media (min-width: 768px) {
    .about-values-grid { 
        grid-template-columns: repeat(3, minmax(0, 1fr)); 
    }
}

.about-value-card {
    background: linear-gradient(180deg, #fdfbf7 0%, #faf7f0 100%);
    border: 1px solid #eee6d7;
    border-radius: 18px;
    padding: 20px 18px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.about-value-card:hover {
    transform: translateY(-3px);
    border-color: #d9c9a8;
    box-shadow: 0 10px 24px -16px rgba(120, 95, 55, 0.45);
}

.about-value-card .value-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    color: #1c1917;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-value-card .value-name .v-dot {
    width: 7px; 
    height: 7px; 
    border-radius: 999px;
    background: #c5a87a; 
    flex-shrink: 0;
}

.about-value-card p {
    font-size: 13px;
    color: #6b6257;
    line-height: 1.75;
    margin: 0;
}

.about-tagline-box {
    text-align: center;
    padding: 34px 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
    color: #f5f2ec;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.55);
    margin-bottom: 10px;
}

.about-tagline-box .tag-en {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.about-tagline-box .tag-ar {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
    font-size: 20px;
    color: #d8c39a;
}

.category-title-font {
    font-family: 'Great Vibes', cursive !important;
    font-weight: 400;
}

/* ==========================================================================
   7. RTL SPECIFIC OVERRIDES (ARABIC TYPOGRAPHY)
   ========================================================================== */
[dir="rtl"] .about-hero h2 {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
}

[dir="rtl"] .about-hero .about-sub {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
    font-size: 22px;
}

[dir="rtl"] .about-card-head h3 {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
}

[dir="rtl"] .about-quote {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
    font-size: 20px;
}

[dir="rtl"] .about-value-card .value-name {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
}

[dir="rtl"] .category-title-font {
    font-family: 'Aref Ruqaa', 'Cairo', serif !important;
    font-weight: 700;
}