/* ==========================================================================
   1. DESIGN SYSTEM & FONTS (Elegant Brand Alignment)
   ========================================================================== */
:root {
    --primary-green: #93B372;
    --dark-green: #678646; /* Slightly darker green for premium typography contrast */
    --light-green: #eef3ef;
    --accent-pink: #fbeee6;
    --text-dark: #678646;
    --text-muted: #6e7e73;
    --white: #ffffff;
    --border-color: #e2eae4;
    
    --font-en: 'Playfair Display', serif;
    --font-ar: 'IBM Plex Sans Arabic', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ar);
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    opacity: 0;
    animation: fadeInPage 0.8s ease forwards;
}

html[lang="en"] body {
    font-family: var(--font-en);
}

@keyframes fadeInPage {
    to { opacity: 1; }
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

p, span, h3, h4, button, input, label, select {
    font-family: var(--font-ar);
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links { 
    display: flex; 
    gap: 30px; 
}

.nav-links a {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-green);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.header-actions { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    font-size: 18px; 
}

.header-actions i { cursor: pointer; transition: var(--transition); }
.header-actions i:hover { color: var(--primary-green); transform: scale(1.1); }

/* ==========================================================================
   3. INDEX HOME PAGE (Hero & Moving Icon-Catalog)
   ========================================================================== */
.hero {
    position: relative;
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.15)), url('ghaimg/ghaher.png') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 35px 65px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    animation: slideUpHero 1s 0.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideUpHero {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.hero-card h2 {
    font-size: 32px; /* Made slightly smaller for elegance */
    color: var(--dark-green); /* Darker sophisticated green tone */
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-btn {
    display: inline-block;
    padding: 10px 35px;
    background: var(--primary-green);
    color: var(--white);
    font-weight: 500;
    border: 1px solid var(--primary-green);
    transition: var(--transition);
}
.hero-btn:hover {
    background: transparent;
    color: var(--primary-green);
}

/* Catalog section optimized to fix gaps */
.categories-section {
    padding: 80px 5%;
    text-align: center;
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('ghaimg/catalog.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section-title {
    font-size: 28px;
    color: var(--dark-green);
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
}

.carousel-track {
    display: flex;
    gap: 25px;
    transition: transform 0.5s ease-in-out;
}

/* Transformed into elegant icon/interactive cards */
.category-card {
    min-width: calc(20% - 20px);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50px; /* Pillow icon framing */
    border: 1px solid var(--border-color);
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(103,134,70,0.15);
    border-color: var(--primary-green);
    background: var(--white);
}

.category-card h3 {
    font-size: 15px;
    color: var(--dark-green);
    font-weight: 600;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 10;
    transition: var(--transition);
}
.carousel-btn:hover { background: var(--primary-green); color: var(--white); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* ==========================================================================
   4. SHOP LAYOUT OVERHAUL (Flanked Panels Locked & Grid Workspace)
   ========================================================================== */

/* ============================
   SHOP WRAPPER (The Three-Column Grid)
   ============================ */
.shop-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    width: 100%;
    min-height: 100vh;
    position: relative;
    background: transparent;
}

/* ============================
   LOCKED SIDE PANELS (Using Sticky instead of Fixed)
   ============================ */
.left-bg, .right-bg {
    position: sticky;
    top: 80px; /* Locks below your header when scrolling */
    height: calc(100vh - 80px); /* Fills the rest of the viewport height */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

/* Left side - explicitly placed in column 1 */
.left-bg {
    grid-column: 1;
    background-image: url('ghaimg/backshop.jpeg');
}

/* Right side - explicitly placed in column 3 */
.right-bg {
    grid-column: 3;
    background-image: url('ghaimg/backfloo.jpeg');
}

/* ============================
   CENTER PRODUCTS AREA
   ============================ */
.products {
    grid-column: 2; /* Explicitly forces products to stay in the middle */
    padding: 40px 30px;
    background: var(--white);
    z-index: 2; 
}

/* Shop Title */
.shop-main-title {
    text-align: center;
    font-family: var(--font-en);
    font-style: italic;
    font-size: 36px;
    color: var(--dark-green);
    margin-bottom: 25px;
    letter-spacing: 1px;
}

/* ============================
   PRODUCT GRID
   ============================ */
.products-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px; 
    width: 100%;
}

.product-item { 
    background: var(--white); 
    border: 1px solid var(--border-color); 
    border-radius: 14px; 
    padding: 15px; 
    text-align: center; 
    transition: var(--transition); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.product-item:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 8px 20px rgba(147,179,114,0.15); 
    border-color: var(--primary-green); 
}

/* ============================
   PRODUCT IMAGE SLIDER
   ============================ */
.product-img-wrapper img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

/* ==========================================================================
   5. DRAWER SLIDE CART SYSTEM
   ========================================================================== */
.side-cart {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    transition: right 0.35s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 20px;
}
.side-cart.open { right: 0; }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.close-cart { background: none; border: none; font-size: 26px; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; }

/* ==========================================================================
   7. FOOTER INTERFACE (Upscaled graphics & elegant titles)
   ========================================================================== */
footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 60px 0 30px 0;
    margin-top: 60px;
    position: relative;
}

.footer-center-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    gap: 35px;
    margin-bottom: 35px;
}

/* Upscaled corner decorative flower dimensions */
.footer-img {
    width: 140px; /* Increased dramatically from 70px to frame beautifully */
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.05));
}

.footer-text-block {
    text-align: center;
    max-width: 550px;
}

/* Fine-tuned to use elegant english font alignment */
.footer-text-block h2 {
    font-family: var(--font-en);
    font-style: italic;
    font-size: 42px;
    font-weight: 400;
    color: var(--white); /* Forces pure clean white */
    margin-bottom: 15px;
}

.footer-text-block p {
    font-size: 15px;
    color: var(--white);
    opacity: 0.9;
    line-height: 1.7;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
    font-size: 22px;
}
.social-icons a { color: var(--white); transition: var(--transition); }
.social-icons a:hover { color: var(--accent-pink); transform: scale(1.1); }

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}
.footer-bottom a {
    color: var(--white);
    font-weight: 600;
    text-decoration: underline;
}

/* ==========================================================================
   6. CHECKOUT SCREEN (Original Style Restored)
   ========================================================================== */
.checkout-container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.checkout-page {
  min-height: 100vh;
  background-image: url('ghaimg/backfloo.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 40px;
}

.checkout-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 26px;
    color: var(--primary-green);
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.checkout-box {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.checkout-box h3 {
    margin-bottom: 15px;
    color: var(--primary-green);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.checkout-box label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.checkout-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    outline: none;
    transition: var(--transition);
}
.checkout-box input:focus { border-color: var(--primary-green); }

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-top: 15px;
    font-weight: bold;
    color: var(--primary-green);
}

.pay-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}
.pay-btn:hover { background: var(--text-dark); }

#orderSummary div {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ==========================================================================
   8. RESPONSIVE MEDIA CONTROLS
   ========================================================================== */
@media (max-width: 1024px) {
    .shop-wrapper { grid-template-columns: 1fr; }
    .left-bg, .right-bg { display: none; }
    .category-card { min-width: calc(33.33% - 20px); }
}

@media (max-width: 600px) {
    header { flex-direction: column; gap: 15px; padding-bottom: 20px; }
    .logo { position: relative; left: 0; transform: none; }
    .nav-links { gap: 15px; }
    .category-card { min-width: 100%; border-radius: 25px; }
    .footer-center-wrap { flex-direction: column; }
    .footer-img { width: 100px; }
}