
/* ── Global Section Space Master Control ────────────────── */
.section-space { padding: 80px 0 !important; }

@media (max-width: 768px) {
    .section-space { padding: 50px 0 !important; }
}

@media (max-width: 480px) {
    .section-space { padding: 35px 0 !important; }
}
/* ═══════════════════════════════════════════════════════════
   DIEVON — RESPONSIVE CSS SYSTEM
   Fluid responsive design from 1400px down to 320px
   ═══════════════════════════════════════════════════════════ */

/* ── 1200px — Large Desktops / Laptops ────────────────── */
@media (max-width: 1200px) {
    .container { max-width: 100%; padding: 0 30px; }
    .mega-menu-dropdown { width: 90vw; max-width: 900px; }
    .home-insta-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── 1100px — Desktop ──────────────────────────────────── */
@media (max-width: 1100px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
    .container  { padding: 0 24px; }
}

/* ── 960px — Tablet Landscape ──────────────────────────── */
@media (max-width: 960px) {
    .hero-grid, .checkout-grid { grid-template-columns: 1fr; }
    .hero-visual  { display: none; }
    .hero-title   { font-size: 38px; }
    .hero-stats   { flex-wrap: wrap; }
    .hero-stat    { min-width: 50%; }
    .order-detail-grid { grid-template-columns: 1fr; }
    .form-row          { grid-template-columns: 1fr; }

    .story-grid,
    .about-story-grid,
    .contact-grid { grid-template-columns: 1fr; }

    .gallery-grid    { columns: 2; column-gap: 14px; }
    .landing-title   { font-size: 46px; }
    .story-img-block { height: 300px; }
    .about-hero h1   { font-size: 36px; }
}

/* ── 900px — Shop / Product / Home Grids ───────────────── */
@media (max-width: 900px) {
    /* Shop layout */
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { border-right: none; border-bottom: 1px solid var(--border-light); padding-right: 0; padding-bottom: 30px; margin-bottom: 30px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .products-grid.list-view .product-card { flex-direction: column !important; height: auto; }
    .products-grid.list-view .product-card > div:nth-child(3) { width: 100%; height: 320px !important; border-right: none; border-bottom: 1px solid var(--border-light) !important; }

    /* Product page */
    .product-layout { grid-template-columns: 1fr; gap: 40px; }
    .product-image-section { flex-direction: column-reverse; }
    .product-image-section > div:first-child { flex-direction: row !important; width: 100% !important; overflow-x: auto; }
    .gallery-thumb { width: 70px !important; height: 100px !important; flex-shrink: 0; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }

    /* Home page grids */
    .home-categories-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .home-best-sellers-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .home-blog-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .home-benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .home-insta-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

    /* Editorial & About grids */
    .editorial-grid { grid-template-columns: 1fr; }
    .editorial-content { padding-left: 0; padding-right: 0; padding-top: 30px; }
    .about-narrative-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-values-grid { grid-template-columns: 1fr; gap: 30px; }
    .contact-layout-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-form-row { grid-template-columns: 1fr; gap: 0; }
    .blog-list-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }


    /* Search overlay */
    .search-results-area { grid-template-columns: 1fr; gap: 20px; }
    .instant-results-grid { grid-template-columns: 1fr; }

    /* Section Spacing Responsive Adjustments */
    .section-space { padding: 70px 0; }
    /* .section-space-sm */ { padding: 45px 0; }
    /* .section-space-lg */ { padding: 90px 0; }
    .section-mb { margin-bottom: 40px; }
    .section-mb-lg { margin-bottom: 60px; }
}


/* ── 768px — Tablet Portrait ───────────────────────────── */
@media (max-width: 768px) {
    /* Navbar */
    .nav-links     { display: none !important; }
    .nav-hamburger { display: flex; }
    .mobile-drawer { display: block; }
    .nav-actions .btn-primary { display: none; }
    .nav-container { padding: 0 16px !important; }


    /* Hero */
    .landing-title   { font-size: 38px; }
    .landing-subtitle { font-size: 15px; }
    .hero-band        { padding: 48px 0 100px; }
    .hero-title       { font-size: 34px; }
    .about-hero h1    { font-size: 30px; }
    .about-hero p     { font-size: 14px; }
    .about-hero-eyebrow { font-size: 11px; }
    .luxury-hero h1   { font-size: 34px; }
    .luxury-hero      { padding: 80px 0 50px; }

    /* Section headers */
    .section-title    { font-size: 28px; }
    .section-subtitle { font-size: 14px; }

    /* Products */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .product-name  { font-size: 15px; }
    .product-price { font-size: 19px; }
    .product-body  { padding: 14px 16px 14px; }

    /* Category tabs */
    .category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }
    .cat-tab { white-space: nowrap; flex-shrink: 0; }

    /* Cart sidebar */
    .cart-sidebar { width: 100%; max-width: 100vw; border-left: none; }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Checkout */
    .checkout-grid { gap: 24px; }

    /* Order confirmation */
    .confirmation-title { font-size: 28px; }

    /* Story section */
    .story-grid        { gap: 32px; }
    .story-img-block   { height: 240px; font-size: 80px; }
    .story-content h2  { font-size: 28px; }
    .story-highlights  { gap: 12px; }
    .story-highlight   { padding: 10px 14px; min-width: 120px; }

    /* Flavour grid */
    .flavour-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .flavour-card-img   { height: 140px; }

    /* About story */
    .about-story-grid { gap: 28px; }
    .about-story-img  { aspect-ratio: 16/9; }
    .about-story-content h2 { font-size: 26px; }

    /* Gallery */
    .gallery-grid   { columns: 2; column-gap: 12px; }
    .gallery-item   { margin-bottom: 12px; }

    /* Footer */
    .footer-top    { grid-template-columns: 1fr; gap: 24px; }
    .footer-brand p { max-width: 100%; }
    .footer-bottom-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .footer-newsletter-form { flex-direction: column; }
    .footer-newsletter-form button { width: 100%; padding: 12px; }

    /* CTA section */
    .landing-cta-section h2 { font-size: 28px; }
    .landing-cta-section p  { font-size: 14px; }

    /* Social buttons */
    .social-buttons-grid  { flex-direction: column; align-items: stretch; }
    .social-btn           { justify-content: center; }

    /* Map */
    .map-container { height: 280px; }

    /* Product page */
    .product-detail-container { padding: 0 16px; }

    /* Search overlay */
    .search-header { padding: 20px; }
    .search-input { font-size: 22px; }

    /* Quick view modal */
    .quick-view-content { flex-direction: column; height: auto; max-width: 95%; }
    .quick-view-img { width: 100%; height: 260px; }
    .quick-view-details { width: 100%; padding: 20px; }

    /* Home page section headers */
    .home-section-header { flex-direction: column; align-items: flex-start; gap: 16px; }

    /* Hero slider mobile */
    .hero-slider-section { height: 65vh; }
    .slide-content { left: 5%; bottom: 10%; right: 5%; max-width: 100%; }
    .slide-content h2 { font-size: 32px; margin-bottom: 12px; }
    .slide-content p { font-size: 13px; margin-bottom: 20px; }
    .hero-arrow { width: 40px; height: 40px; }
    .hero-arrow-left { left: 10px; }
    .hero-arrow-right { right: 10px; }

    /* Occasion banners mobile */
    .occasion-banner { padding: 80px 0; }
    .occasion-banner-content h2 { font-size: 28px; }
    .occasion-banner-content p { font-size: 13px; }

    /* Video banner mobile */
    .video-banner-section { height: 40vh; }
    .video-banner-content h2 { font-size: 26px; margin-bottom: 12px; }

    /* Reviews section mobile */
    .reviews-slider-wrap { height: 220px; }
    .review-quote { font-size: 16px; }

    /* Cart layout mobile */
    .cart-page-layout { grid-template-columns: 1fr; gap: 30px; }

    /* Section Spacing Responsive Adjustments */
    .section-space { padding: 50px 0; }
    /* .section-space-sm */ { padding: 35px 0; }
    /* .section-space-lg */ { padding: 70px 0; }
    .section-mb { margin-bottom: 30px; }
    .section-mb-lg { margin-bottom: 40px; }
}


/* ── 640px — Large Phone Landscape ────────────────────── */
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .logo { font-size: 20px; }
    .landing-hero  { padding: 60px 0 90px; }
    .landing-title { font-size: 32px; line-height: 1.12; }
    .landing-cta-group { flex-direction: column; align-items: center; gap: 12px; }
    .landing-cta-group .btn-hero-primary,
    .landing-cta-group .btn-hero-secondary { width: 100%; max-width: 320px; justify-content: center; }

    .products-grid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-body    { padding: 12px 12px 10px; }
    .product-name    { font-size: 14px; }
    .product-desc    { font-size: 12px; margin-bottom: 10px; }
    .product-price   { font-size: 17px; }
    .btn-add-cart    { width: 34px; height: 34px; font-size: 14px; }

    .flavour-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .section-card { padding: 20px 18px; }
    .order-summary-item { gap: 10px; }

    .hero-stats { gap: 0; }
    .hero-stat  { min-width: 50%; padding: 18px 12px; }
    .hero-stat-value { font-size: 26px; }

    .flavours-section,
    .story-section,
    .gallery-page,
    .about-story-section,
    .contact-map-section,
    .social-links-section {  }

    .gallery-page { padding: 32px 0 60px; }
    .confirmation-title { font-size: 26px; }
    .order-code-value   { font-size: 26px; letter-spacing: 2px; }
    .login-card { padding: 32px 24px; }
    .about-hero h1 { font-size: 26px; }

    /* Home page */
    .home-categories-grid { grid-template-columns: 1fr; gap: 16px; }
    .home-best-sellers-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .home-blog-grid { grid-template-columns: 1fr; gap: 20px; }
    .blog-list-grid { grid-template-columns: 1fr; gap: 20px; }

    .home-benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .home-insta-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    
    .section-space { padding: 40px 0; }
    /* .section-space-sm */ { padding: 28px 0; }
    /* .section-space-lg */ { padding: 55px 0; }
    .section-mb { margin-bottom: 25px; }
    .section-mb-lg { margin-bottom: 35px; }
}

/* ── 900px — Shop / Product / Home Grids ───────────────── */
@media (max-width: 900px) {
    /* Multi-tier Header Responsive */
    .top-header-left { display: none; }
    .top-header-container { justify-content: center; text-align: center; }
    .header-search-wrap { max-width: 100%; }
    .footer-top { grid-template-columns: repeat(2, 1fr); gap: 30px; }

    /* Product Page Layout */
    .product-layout { grid-template-columns: 1fr !important; gap: 30px !important; width: 100% !important; overflow: hidden; }
    .product-image-section { flex-direction: column-reverse !important; gap: 15px !important; width: 100% !important; }
    .gallery-thumbs-col { flex-direction: row !important; width: 100% !important; max-width: 100% !important; overflow-x: auto !important; padding-bottom: 5px; }
    .gallery-thumb { width: 65px !important; height: 85px !important; flex-shrink: 0 !important; }
    .product-details-col { width: 100% !important; max-width: 100% !important; overflow: hidden !important; }
    .product-main-img { max-height: 480px !important; }
    .specifications-grid { grid-template-columns: 1fr; gap: 10px; }
    .related-compact-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .compact-card-img-wrap { aspect-ratio: 3 / 4; height: auto; }


}

/* ── 768px — Mobile & Tablet ────────────────────────────── */
@media (max-width: 768px) {
    .logo img { height: 60px !important; max-height: 60px !important; }

    .nav-actions { gap: 14px; }
    .nav-action-item span { display: none; }
    .nav-action-item i { font-size: 18px; }
    .bottom-header-bar { display: none !important; }
    .hide-mobile { display: none !important; }
    .header-search-wrap input { font-size: 12px; }
}

/* ── 480px — Small Phone Portrait ────────────────────────── */
@media (max-width: 480px) {
    .footer-top { grid-template-columns: 1fr; gap: 30px; }
    .product-detail-container { padding: 0 12px; }
    .delivery-checker-input-wrap { flex-direction: column; }
    .delivery-checker-input-wrap button { width: 100%; margin-top: 5px; }
}

    .gallery-grid        { columns: 1; }

    .landing-title       { font-size: 28px; }
    .landing-subtitle    { font-size: 14px; }

    .hero-stat-value     { font-size: 24px; }
    .hero-stat-label     { font-size: 11px; }

    .checkout-grid > div:last-child .glass-panel { position: static; }
    .section-title { font-size: 24px; }

    .footer-social { gap: 8px; }
    .footer-social a { width: 32px; height: 32px; font-size: 13px; }

    .product-detail-container { padding: 0 12px; }
    .product-accordion-header { font-size: 13px; }
    .product-accordions { margin-bottom: 20px; }
    .related-grid { grid-template-columns: 1fr; }
    .nav-actions { gap: 10px; }
}


/* ── 380px — Small Phone (iPhone SE, etc.) ────────────────── */
@media (max-width: 380px) {
    .container       { padding: 0 12px; }
    .logo            { font-size: 18px; }
    .landing-title   { font-size: 24px; }
    .hero-title      { font-size: 24px; }
    .section-title   { font-size: 20px; }
    .products-grid   { gap: 10px; }
    .flavour-cards-grid { grid-template-columns: 1fr; }
    .stats-grid      { grid-template-columns: 1fr 1fr; }
    .stat-card       { padding: 14px 12px; }
    .stat-value      { font-size: 24px; }
    .nav-hamburger   { width: 38px; height: 38px; }
    .home-categories-grid { grid-template-columns: 1fr; }
    .home-insta-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Touch & Mobile Interaction ────────────────────────── */
a, button { touch-action: manipulation; }

.cart-sidebar {
    height: 100vh;
    height: 100dvh;
}

@media (max-width: 768px) {
    .cart-footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .cart-sidebar { display: flex; flex-direction: column; }
    .cart-items { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .cart-footer { flex-shrink: 0; }
}

/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL RESPONSIVE OVERRIDES
   Scoped strictly to body.admin-wrapper
   ═══════════════════════════════════════════════════════════ */

body.admin-wrapper .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
    body.admin-wrapper .product-form-grid { grid-template-columns: 1fr !important; }
    body.admin-wrapper .product-form-grid > div:last-child { position: static !important; }
    body.admin-wrapper .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    body.admin-wrapper .admin-sidebar.open { transform: translateX(0); }
    body.admin-wrapper .admin-menu-toggle { display: block !important; }
    body.admin-wrapper .admin-main { margin-left: 0; }
    body.admin-wrapper .admin-topbar { padding: 0 16px; }
    body.admin-wrapper .admin-content { padding: 16px; }
}


@media (max-width: 768px) {
    body.admin-wrapper .admin-page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    body.admin-wrapper .admin-gallery-grid { grid-template-columns: repeat(3, 1fr); }
    body.admin-wrapper .form-row { grid-template-columns: 1fr; }
    body.admin-wrapper .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    body.admin-wrapper .admin-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; padding-bottom: 6px; scrollbar-width: none; gap: 4px !important; }
    body.admin-wrapper .admin-tabs::-webkit-scrollbar { display: none; }
    body.admin-wrapper .admin-tab { flex-shrink: 0; white-space: nowrap; padding: 10px 14px !important; font-size: 13px !important; }
    body.admin-wrapper .glass-panel { padding: 16px !important; }
    body.admin-wrapper .data-table { min-width: 700px; }
    body.admin-wrapper .admin-nav-links { display: none !important; }
    body.admin-wrapper .form-section { padding: 16px !important; }
    body.admin-wrapper .order-detail-grid { grid-template-columns: 1fr !important; }
    body.admin-wrapper .variant-row { flex-wrap: wrap !important; }
}

@media (max-width: 480px) {
    body.admin-wrapper .admin-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    body.admin-wrapper .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    body.admin-wrapper .stat-card { padding: 14px 12px !important; }
    body.admin-wrapper .stat-value { font-size: 24px !important; }
    body.admin-wrapper .glass-panel { padding: 12px !important; }
    body.admin-wrapper .filter-sort-bar { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
    body.admin-wrapper .admin-action-bar { flex-direction: column; gap: 8px; }
    body.admin-wrapper .data-table { min-width: 550px; }
}
