/* =========================================
   CSS Variables — Cannabis / Dispensary Brand
   ========================================= */
:root {
    /* ── Core palette ── */
    --color-primary:       #7c3aed;
    --color-primary-dark:  #6d28d9;
    --color-primary-light: #ede9fe;
    --color-accent:        #a855f7;
    --color-dark:          #0f0520;      /* header bg, dark sections */
    --color-dark-2:        #1a0a35;      /* slightly lighter dark */
    --color-dark-mid:      #2d0a5e;      /* hero gradient midpoint */
    --color-dark-alt:      #4c1d95;      /* app-cta gradient end */
    --color-text:          #1a1a2e;
    --color-text-muted:    #6b7280;
    --color-text-light:    #9ca3af;
    --color-bg:            #f8f7ff;
    --color-surface:       #ffffff;
    --color-border:        #e8e4f5;
    --color-success:       #10b981;
    --color-deal:          #f59e0b;
    --color-danger:        #ef4444;

    /* ── Opacity tokens derived from palette ── */
    --color-primary-a15:   rgba(124,58,237,0.15);
    --color-primary-a30:   rgba(124,58,237,0.3);
    --color-accent-a15:    rgba(168,85,247,0.15);
    --color-accent-a30:    rgba(168,85,247,0.3);
    --color-accent-light:  #c084fc;

    /* ── Gradient backgrounds ── */
    --hero-bg:             linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-mid) 50%, var(--color-dark) 100%);
    --hero-glow:           radial-gradient(ellipse 80% 60% at 50% 0%, var(--color-accent-a15) 0%, transparent 70%);
    --hero-badge-bg:       var(--color-accent-a15);
    --hero-badge-border:   var(--color-accent-a30);
    --hero-badge-color:    var(--color-accent-light);
    --section-purple-bg:   linear-gradient(135deg, var(--color-dark-mid) 0%, var(--color-dark-2) 100%);
    --app-cta-bg:          linear-gradient(135deg, var(--color-dark-mid) 0%, var(--color-dark-alt) 100%);

    /* ── Typography ── */
    --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif:     Georgia, 'Times New Roman', serif;
    --font-heading:   var(--font-sans);
    --font-size-body: 16px;
    --font-size-sm:   13px;
    --line-height:    1.6;

    /* ── Layout ── */
    --max-width:      1200px;
    --content-width:  740px;
    --header-height:  68px;

    /* ── Shape ── */
    --radius:         10px;
    --radius-lg:      16px;
    --radius-sm:      6px;
    --radius-full:    9999px;

    /* ── Elevation ── */
    --shadow:         0 1px 4px rgba(124,58,237,0.07);
    --shadow-md:      0 6px 20px rgba(124,58,237,0.12);
    --shadow-lg:      0 16px 48px rgba(124,58,237,0.16);
}

/* =========================================
   Reset & Base
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: var(--font-size-body);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================================
   Age Gate Modal
   ========================================= */
.age-gate {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(10,3,26,0.97);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.age-gate-box {
    background: var(--color-dark-2);
    border: 1px solid var(--color-primary-a30);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.age-gate-logo {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 8px;
}
.age-gate-logo span { color: var(--color-accent); }
.age-gate-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.age-gate-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 32px;
    line-height: 1.6;
}
.age-gate-btns { display: flex; gap: 12px; justify-content: center; }
.age-gate-yes {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 13px 32px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex: 1;
}
.age-gate-yes:hover { background: var(--color-primary-dark); }
.age-gate-no {
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 13px 32px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    flex: 1;
}
.age-gate-no:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.age-gate-legal {
    margin-top: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    line-height: 1.5;
}

/* =========================================
   Layout
   ========================================= */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.content-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   Header & Nav (fallback static)
   ========================================= */
.site-header {
    background: #fff;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
}
.site-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.site-logo span { color: var(--color-primary); }
.site-logo:hover { text-decoration: none; opacity: .85; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
    padding: 7px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .2s, background .2s;
}
.site-nav a:hover,
.site-nav a.active { color: var(--color-primary); background: var(--color-primary-a15, rgba(124,58,237,.07)); text-decoration: none; }

/* ── Dropdown ── */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
}
.nav-arrow {
    display: inline-block;
    transition: transform .25s ease;
    opacity: .65;
    flex-shrink: 0;
}
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
    list-style: none;
    margin: 0;
    padding: 6px;
    /* hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 200;
}
/* Small caret arrow above dropdown */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top: 0;
    border-bottom-color: #fff;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,.06));
}
.nav-dropdown-menu li a {
    display: block;
    padding: 9px 14px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text);
    background: transparent;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.nav-dropdown-menu li a:hover,
.nav-dropdown-menu li a.active {
    background: var(--color-primary-light, #ede9fe);
    color: var(--color-primary);
}

/* Show on hover */
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Keep dropdown open when cursor moves from link to menu */
.nav-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-cta {
    background: var(--color-primary) !important;
    color: #fff !important;
    margin-left: 10px;
    font-weight: 700 !important;
}
.nav-cta:hover { background: var(--color-accent) !important; }

/* ── Mobile dropdown groups ── */
.mobile-nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 15px;
    font-weight: 500;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.mobile-nav-arrow {
    transition: transform .25s ease;
    opacity: .6;
    flex-shrink: 0;
}
.mobile-nav-group.open .mobile-nav-arrow { transform: rotate(180deg); opacity: 1; }
.mobile-nav-children {
    display: none;
    background: rgba(0,0,0,.15);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mobile-nav-group.open .mobile-nav-children { display: block; }
.mobile-nav-children a {
    display: block;
    padding: 11px 24px 11px 36px;
    font-size: 14px;
    opacity: .85;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mobile-nav-children a:last-child { border-bottom: none; }

/* cms-nav — rendered by GlobalTemplateService */
.cms-nav {
    list-style: none; margin: 0; padding: 0;
    display: flex; align-items: center; gap: 2px;
}
.cms-nav li { position: relative; }
.cms-nav > li > a {
    display: block;
    padding: 7px 14px;
    border-radius: var(--radius);
    font-size: 14px; font-weight: 500;
    color: inherit;
    text-decoration: none;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.cms-nav > li > a:hover { opacity: .75; text-decoration: none; }
.cms-nav li ul {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: var(--color-dark-2);
    border: 1px solid var(--color-primary-a15);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none; margin: 6px 0 0; padding: 6px;
    min-width: 170px; z-index: 200;
}
.cms-nav li:hover > ul { display: block; }
.cms-nav li ul a {
    display: block; padding: 8px 12px;
    font-size: 14px; color: rgba(255,255,255,0.75);
    text-decoration: none; border-radius: 6px; white-space: nowrap;
}
.cms-nav li ul a:hover { background: rgba(255,255,255,0.07); color: #fff; }

/* =========================================
   Announcement Bar
   ========================================= */
.announcement-bar {
    background: var(--color-primary);
    color: #fff;
    text-align: center;
    padding: 9px 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.announcement-bar a { color: #fff; text-decoration: underline; }

/* =========================================
   Hero
   ========================================= */
.hero {
    background: var(--hero-bg);
    color: #fff;
    padding: 100px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--hero-glow);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--hero-badge-bg);
    border: 1px solid var(--hero-badge-border);
    color: var(--hero-badge-color);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero-title span { color: var(--color-accent); }
.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.75;
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stat-row {
    display: flex; justify-content: center; gap: 48px;
    margin-top: 56px; padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}
.hero-stat-value {
    font-size: 30px; font-weight: 900; color: #fff; line-height: 1;
    margin-bottom: 4px;
}
.hero-stat-label {
    font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 500;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .15s;
    text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; text-decoration: none; }
.btn-accent { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-accent:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; text-decoration: none; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-light); text-decoration: none; }
.btn-dark { background: var(--color-dark); color: #fff; border-color: var(--color-dark); }
.btn-dark:hover { background: var(--color-dark-2); color: #fff; border-color: var(--color-dark-2); text-decoration: none; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* =========================================
   Section helpers
   ========================================= */
.section { padding: 72px 0; }
.section-dark {
    background: var(--color-dark);
    color: #fff;
}
.section-purple {
    background: var(--section-purple-bg);
    color: #fff;
}
.section-light { background: var(--color-surface); }
.section-tinted { background: var(--color-bg); }

.section-label {
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--color-accent);
    margin-bottom: 10px;
}
.section-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    line-height: 1.2;
}
.section-subtitle { color: var(--color-text-muted); font-size: 16px; line-height: 1.6; max-width: 560px; }
.section-header { margin-bottom: 40px; }
.section-header-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 40px; gap: 16px; flex-wrap: wrap;
}

/* =========================================
   Product Category Cards
   ========================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.category-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 16px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    color: var(--color-text);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.category-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    text-decoration: none;
    color: var(--color-primary);
}
.category-icon {
    width: 60px; height: 60px;
    background: var(--color-primary-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    transition: background .2s;
}
.category-card:hover .category-icon { background: var(--color-primary); }
.category-name { font-size: 14px; font-weight: 700; }

/* =========================================
   Deal Cards
   ========================================= */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.deal-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    position: relative;
}
.deal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.deal-badge {
    position: absolute; top: 14px; left: 14px;
    background: var(--color-deal);
    color: #fff;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .05em;
}
.deal-img {
    height: 180px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 64px;
}
.deal-img img { width: 100%; height: 180px; object-fit: cover; }
.deal-body { padding: 18px; }
.deal-day { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-accent); margin-bottom: 4px; }
.deal-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.deal-desc { font-size: 13px; color: var(--color-text-muted); margin-bottom: 14px; line-height: 1.5; }
.deal-footer { display: flex; align-items: center; justify-content: space-between; }
.deal-price-old { font-size: 12px; color: var(--color-text-light); text-decoration: line-through; }
.deal-price { font-size: 18px; font-weight: 800; color: var(--color-primary); }

/* =========================================
   Brand Cards
   ========================================= */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.brand-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all .2s;
}
.brand-card:hover {
    border-color: var(--color-accent-a30);
    background: var(--color-accent-a15);
}
.brand-logo {
    width: 48px; height: 48px;
    background: var(--color-accent-a15);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 900;
    color: var(--color-accent-light);
    margin-bottom: 14px;
}
.brand-name { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.brand-desc { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; margin-bottom: 16px; }

/* =========================================
   Mood Filter Tabs
   ========================================= */
.mood-tabs { display: flex; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.mood-tab {
    padding: 9px 20px;
    border-radius: 9999px;
    font-size: 14px; font-weight: 600;
    border: 2px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all .15s;
}
.mood-tab:hover, .mood-tab.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

/* =========================================
   App CTA Banner
   ========================================= */
.app-cta {
    background: var(--app-cta-bg);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.app-cta-content { flex: 1; min-width: 260px; }
.app-cta-title { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.app-cta-sub { font-size: 15px; color: rgba(255,255,255,0.65); margin-bottom: 24px; }
.app-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.app-store-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background .15s;
    font-weight: 600; font-size: 13px;
}
.app-store-btn:hover { background: rgba(255,255,255,0.18); color: #fff; text-decoration: none; }
.app-cta-visual {
    font-size: 100px;
    line-height: 1;
    opacity: .8;
}

/* =========================================
   Newsletter
   ========================================= */
.newsletter-form { display: flex; gap: 10px; max-width: 440px; flex-wrap: wrap; }
.newsletter-input {
    flex: 1; min-width: 220px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 14px;
    outline: none;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-input:focus { border-color: var(--color-accent); }

/* =========================================
   Post Cards
   ========================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.post-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
    display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card-image { width: 100%; height: 200px; object-fit: cover; background: var(--color-bg); }
.post-card-image-placeholder {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: var(--color-primary);
}
.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.post-card-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.post-category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 9999px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    text-decoration: none;
}
.post-category-tag:hover { background: var(--color-primary-light); text-decoration: none; }
.post-card-title {
    font-size: 17px; font-weight: 700; line-height: 1.35;
    color: var(--color-text); margin-bottom: 8px;
    text-decoration: none; display: block;
}
.post-card-title:hover { color: var(--color-primary); text-decoration: none; }
.post-card-excerpt {
    font-size: 14px; color: var(--color-text-muted); line-height: 1.6; flex: 1;
    margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--color-text-light);
    margin-top: auto; padding-top: 12px; border-top: 1px solid var(--color-border);
}
.post-author { display: flex; align-items: center; gap: 6px; }
.author-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; flex-shrink: 0;
}

/* =========================================
   Blog listing
   ========================================= */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
    padding: 56px 0;
}
.blog-post-row {
    display: flex; gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--color-border);
}
.blog-post-row:last-child { border-bottom: none; }
.blog-post-thumb {
    width: 140px; height: 100px;
    border-radius: var(--radius);
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: var(--color-primary);
    overflow: hidden;
}
.blog-post-thumb img { width: 140px; height: 100px; border-radius: var(--radius); object-fit: cover; }
.blog-post-content { flex: 1; }
.blog-post-title {
    font-size: 18px; font-weight: 700; color: var(--color-text);
    line-height: 1.35; margin-bottom: 6px;
    text-decoration: none; display: block;
}
.blog-post-title:hover { color: var(--color-primary); text-decoration: none; }
.blog-post-excerpt {
    font-size: 14px; color: var(--color-text-muted); margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: var(--color-text-light); flex-wrap: wrap;
}
.post-meta-dot::before { content: '·'; }

/* =========================================
   Sidebar
   ========================================= */
.sidebar-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px; margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.widget-title {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--color-text-muted);
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}
.widget-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.widget-list li a {
    font-size: 14px; color: var(--color-text); text-decoration: none;
    display: flex; justify-content: space-between; align-items: center;
}
.widget-list li a:hover { color: var(--color-primary); }
.widget-count {
    font-size: 11px; background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 1px 6px; border-radius: 9999px; color: var(--color-text-muted);
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
    display: inline-block; padding: 4px 10px;
    background: var(--color-bg); border: 1px solid var(--color-border);
    border-radius: 9999px; font-size: 12px; color: var(--color-text-muted);
    text-decoration: none; transition: all .15s;
}
.tag-cloud a:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary); text-decoration: none;
}

/* =========================================
   Single Post
   ========================================= */
.single-layout {
    display: grid; grid-template-columns: 1fr 280px;
    gap: 48px; align-items: start; padding: 56px 0;
}
.post-header { margin-bottom: 32px; }
.post-title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800; line-height: 1.2;
    letter-spacing: -0.5px; margin-bottom: 16px;
}
.post-meta-bar {
    display: flex; align-items: center; gap: 16px;
    font-size: 13px; color: var(--color-text-muted);
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 32px; flex-wrap: wrap;
}
.post-featured-image {
    width: 100%; max-height: 460px; object-fit: cover;
    border-radius: var(--radius-lg); margin-bottom: 32px;
}
.post-body {
    font-family: var(--font-serif); font-size: 18px;
    line-height: 1.8; color: var(--color-text);
}
.post-body h1 { font-family: var(--font-sans); font-size: 30px; font-weight: 800; margin: 36px 0 14px; letter-spacing: -0.3px; }
.post-body h2 { font-family: var(--font-sans); font-size: 24px; font-weight: 700; margin: 32px 0 12px; }
.post-body h3 { font-family: var(--font-sans); font-size: 20px; font-weight: 600; margin: 24px 0 10px; }
.post-body h4 { font-family: var(--font-sans); font-size: 17px; font-weight: 600; margin: 20px 0 8px; }
.post-body p  { margin-bottom: 20px; }
.post-body strong, .post-body b { font-weight: 700; }
.post-body em, .post-body i { font-style: italic; }
.post-body u  { text-decoration: underline; }
.post-body s  { text-decoration: line-through; }
.post-body hr { border: none; border-top: 1px solid var(--color-border); margin: 32px 0; }
.post-body ul, .post-body ol { margin: 0 0 20px 24px; }
.post-body li { margin-bottom: 6px; }
.post-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 12px 20px; margin: 24px 0;
    background: var(--color-primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic; color: var(--color-text-muted);
}
.post-body pre {
    background: var(--color-dark); color: var(--color-text-light);
    padding: 20px; border-radius: var(--radius);
    overflow-x: auto; font-size: 14px; margin-bottom: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.post-body code {
    background: var(--color-bg); padding: 2px 6px;
    border-radius: 3px; font-size: 14px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.post-body pre code { background: none; padding: 0; }
.post-body a { color: var(--color-primary); }
.post-body img { border-radius: var(--radius-lg); margin: 24px 0; max-width: 100%; }
.post-body .ql-align-center { text-align: center; }
.post-body .ql-align-right  { text-align: right; }
.post-body .ql-align-justify { text-align: justify; }
.post-tags { margin-top: 32px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-tags-label { font-size: 13px; font-weight: 600; color: var(--color-text-muted); }

/* =========================================
   Related Posts
   ========================================= */
.related-section {
    padding: 48px 0; border-top: 1px solid var(--color-border); margin-top: 48px;
}
.related-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px; margin-top: 20px;
}

/* =========================================
   Pagination
   ========================================= */
.pagination { display: flex; gap: 4px; justify-content: center; padding: 32px 0; }
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 14px;
    color: var(--color-text); text-decoration: none;
    background: var(--color-surface); transition: all .15s;
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.pagination .active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .disabled { opacity: .4; cursor: default; }

/* =========================================
   Static Page
   ========================================= */
.page-hero {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-mid) 100%);
    padding: 72px 24px;
    text-align: center;
    color: #fff;
}
.page-hero-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 900; letter-spacing: -0.5px; margin-bottom: 12px;
}
.page-content {
    max-width: var(--content-width);
    margin: 56px auto; padding: 0 24px;
    font-family: var(--font-serif); font-size: 18px; line-height: 1.8;
}
.page-content h1, .page-content h2, .page-content h3, .page-content h4 { font-family: var(--font-sans); font-weight: 700; margin: 28px 0 12px; }
.page-content h1 { font-size: 30px; } .page-content h2 { font-size: 24px; }
.page-content h3 { font-size: 20px; } .page-content h4 { font-size: 17px; }
.page-content p { margin-bottom: 18px; }
.page-content strong, .page-content b { font-weight: 700; }
.page-content ul, .page-content ol { margin: 0 0 18px 24px; }
.page-content li { margin-bottom: 6px; }
.page-content blockquote { border-left: 4px solid var(--color-primary); padding: 12px 20px; margin: 24px 0; background: var(--color-primary-light); font-style: italic; border-radius: 0 var(--radius) var(--radius) 0; }
.page-content a { color: var(--color-primary); }
.page-content img { border-radius: var(--radius-lg); margin: 20px 0; max-width: 100%; }
.page-content .ql-align-center { text-align: center; }
.page-content .ql-align-right  { text-align: right; }
.page-content .ql-align-justify { text-align: justify; }

/* =========================================
   Footer (static fallback)
   ========================================= */
.site-footer {
    background: var(--color-bg, #f8f7ff);
    color: var(--color-text-muted);
    padding: 64px 0 28px;
    border-top: 1px solid var(--color-border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr;
    gap: 48px; margin-bottom: 48px;
}
.footer-brand-name {
    font-size: 22px; font-weight: 900; color: var(--color-text);
    margin-bottom: 10px; letter-spacing: -0.5px;
}
.footer-brand-name span { color: var(--color-primary); }
.footer-brand-tagline { font-size: 14px; color: var(--color-text-muted); margin-bottom: 20px; line-height: 1.5; }
.footer-social { display: flex; gap: 10px; }
.footer-social-link {
    width: 36px; height: 36px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted);
    text-decoration: none; font-size: 15px;
    transition: all .15s;
}
.footer-social-link:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; text-decoration: none; }
.footer-heading {
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--color-text); margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
    font-size: 14px; color: var(--color-text-muted);
    text-decoration: none; transition: color .15s;
}
.footer-links a:hover { color: var(--color-primary); text-decoration: none; }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--color-text-muted);
    flex-wrap: wrap; gap: 8px;
}
.footer-legal-links { display: flex; gap: 20px; }
.footer-legal-links a { color: var(--color-text-muted); text-decoration: none; font-size: 12px; }
.footer-legal-links a:hover { color: var(--color-primary); }

/* =========================================
   Empty States
   ========================================= */
.empty-state { text-align: center; padding: 80px 24px; color: var(--color-text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.empty-state-title { font-size: 20px; font-weight: 700; color: var(--color-text); margin-bottom: 8px; }
.empty-state-text { font-size: 15px; margin-bottom: 24px; }

/* =========================================
   Mobile Navbar
   ========================================= */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background .15s;
}
.nav-hamburger:hover { background: var(--color-primary-a15, rgba(124,58,237,.08)); }
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 190;
    backdrop-filter: blur(2px);
}
.mobile-nav-overlay.open { display: block; }
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 88vw);
    background: #fff;
    z-index: 200;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-left: 1px solid var(--color-border);
}
.mobile-nav-drawer.open { transform: translateX(0); }
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}
.mobile-nav-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: color .15s, background .15s;
}
.mobile-nav-close:hover { color: var(--color-text); background: var(--color-bg); }
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    flex: 1;
}
.mobile-nav-links a {
    display: block;
    padding: 13px 24px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
    transition: color .15s, background .15s, padding-left .15s;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--color-primary);
    background: var(--color-primary-a15, rgba(124,58,237,.07));
    padding-left: 30px;
}

@media (max-width: 768px) {
    .site-nav { display: none; }
    .nav-hamburger { display: flex; }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .blog-layout { grid-template-columns: 1fr; }
    .single-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .blog-post-row { flex-direction: column; }
    .blog-post-thumb { width: 100%; height: 180px; }
    .blog-post-thumb img { width: 100%; height: 180px; }
    .section-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .hero { padding: 64px 16px 48px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-stat-row { gap: 28px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); } /* overridden at ≤576px */
    .app-cta { padding: 32px 24px; }
    .app-cta-visual { display: none; }
}

/* =========================================
   GrapeJS class-based responsive grid system
   Used by all FlexiBuilder templates
   ========================================= */
.gjs-r { display: grid; }
.gjs-r--2 { grid-template-columns: 1fr 1fr; }
.gjs-r--3 { grid-template-columns: repeat(3, 1fr); }
.gjs-r--4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 577px) and (max-width: 900px) {
    .gjs-r--3, .gjs-r--4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 576px) {
    .gjs-r--2 { grid-template-columns: 1fr !important; }
    .gjs-r--3, .gjs-r--4 {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 16px !important;
        scrollbar-width: none !important;
    }
    .gjs-r--3::-webkit-scrollbar, .gjs-r--4::-webkit-scrollbar { display: none; }
    .gjs-r--3 > *, .gjs-r--4 > * {
        flex: 0 0 88% !important;
        width: 88% !important;
        scroll-snap-align: start !important;
        box-sizing: border-box !important;
    }
}

/* =========================================
   Slider UI — Arrows + Dots
   Injected by JS only on ≤576px viewports.
   ========================================= */
.slider-ui-wrap {
    position: relative;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
    padding: 0;
    color: var(--color-text);
    transition: opacity .2s;
    -webkit-tap-highlight-color: transparent;
}
.slider-arrow--prev { left: 6px; }
.slider-arrow--next { right: 6px; }
@media (max-width: 576px) {
    .slider-arrow { display: flex; }
}
.slider-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0 2px;
}
@media (max-width: 576px) {
    .slider-dots { display: flex; }
}
.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .18);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s, transform .2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.slider-dot.active {
    background: var(--color-primary);
    transform: scale(1.35);
}
/* per-section slider opt-out (data attr set in FlexiBuilder Slider Options) */
[data-no-arrows] .slider-arrow,
[data-no-arrows] ~ .slider-arrow { display: none !important; }
[data-no-dots] .slider-dots,
[data-no-dots] ~ .slider-dots { display: none !important; }

/* =========================================
   GrapeJS Builder Content — Responsive
   Covers both "no-space" (as-authored) and
   "space-after-colon/comma" (browser-normalised)
   variants of inline grid-template-columns.
   ========================================= */

/* Tablet 577–900px: collapse to 2-col grid (no slider) */
@media (min-width: 577px) and (max-width: 900px) {
    [style*="grid-template-columns:repeat(4,1fr)"],
    [style*="grid-template-columns: repeat(4,1fr)"],
    [style*="grid-template-columns:repeat(4, 1fr)"],
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
    }
    [style*="grid-template-columns:repeat(3,1fr)"],
    [style*="grid-template-columns: repeat(3,1fr)"],
    [style*="grid-template-columns:repeat(3, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
    }
}

/* Mobile ≤576px — card grids → horizontal snap sliders */
@media (max-width: 576px) {

    /* 2-col content layouts → stack vertically */
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:repeat(2,1fr)"],
    [style*="grid-template-columns: repeat(2,1fr)"],
    [style*="grid-template-columns:repeat(2, 1fr)"],
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }

    /* 3-col card grids → horizontal snap slider (1 card visible + peek) */
    [style*="grid-template-columns:repeat(3,1fr)"],
    [style*="grid-template-columns: repeat(3,1fr)"],
    [style*="grid-template-columns:repeat(3, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 12px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        padding-bottom: 16px !important;
        scrollbar-width: none !important;
        grid-template-columns: unset !important;
        grid-template-rows: unset !important;
        box-sizing: border-box !important;
    }
    [style*="grid-template-columns:repeat(3,1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(3,1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns:repeat(3, 1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(3, 1fr)"]::-webkit-scrollbar { display: none; }
    [style*="grid-template-columns:repeat(3,1fr)"] > *,
    [style*="grid-template-columns: repeat(3,1fr)"] > *,
    [style*="grid-template-columns:repeat(3, 1fr)"] > *,
    [style*="grid-template-columns: repeat(3, 1fr)"] > * {
        flex: 0 0 88% !important;
        width: 88% !important;
        max-width: 88% !important;
        scroll-snap-align: start !important;
        box-sizing: border-box !important;
    }

    /* 4-col grids → slider (1 card visible + peek) */
    [style*="grid-template-columns:repeat(4,1fr)"],
    [style*="grid-template-columns: repeat(4,1fr)"],
    [style*="grid-template-columns:repeat(4, 1fr)"],
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 12px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        padding-bottom: 16px !important;
        scrollbar-width: none !important;
        grid-template-columns: unset !important;
        grid-template-rows: unset !important;
        box-sizing: border-box !important;
    }
    [style*="grid-template-columns:repeat(4,1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(4,1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns:repeat(4, 1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(4, 1fr)"]::-webkit-scrollbar { display: none; }
    [style*="grid-template-columns:repeat(4,1fr)"] > *,
    [style*="grid-template-columns: repeat(4,1fr)"] > *,
    [style*="grid-template-columns:repeat(4, 1fr)"] > *,
    [style*="grid-template-columns: repeat(4, 1fr)"] > * {
        flex: 0 0 88% !important;
        width: 88% !important;
        max-width: 88% !important;
        scroll-snap-align: start !important;
        box-sizing: border-box !important;
    }

    /* Section padding reduction */
    section[style*="padding:60px"], section[style*="padding: 60px"],
    section[style*="padding:48px"], section[style*="padding: 48px"] {
        padding-top: 32px !important; padding-bottom: 32px !important;
    }
    section[style*="padding:80px"], section[style*="padding: 80px"] {
        padding-top: 40px !important; padding-bottom: 40px !important;
    }

    /* Font scaling */
    [style*="font-size:52px"],[style*="font-size: 52px"] { font-size: 30px !important; line-height:1.15 !important; }
    [style*="font-size:44px"],[style*="font-size: 44px"] { font-size: 28px !important; line-height:1.2 !important; }
    [style*="font-size:36px"],[style*="font-size: 36px"] { font-size: 24px !important; }
    [style*="font-size:34px"],[style*="font-size: 34px"] { font-size: 22px !important; }
    [style*="font-size:32px"],[style*="font-size: 32px"] { font-size: 22px !important; }
    [style*="font-size:30px"],[style*="font-size: 30px"] { font-size: 20px !important; }
    [style*="font-size:28px"],[style*="font-size: 28px"] { font-size: 20px !important; }

    /* Daily deals header row: wrap on mobile */
    [style*="justify-content:space-between"],
    [style*="justify-content: space-between"] {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    /* Stats row: wrap */
    [style*="gap:32px"],[style*="gap: 32px"] {
        gap: 14px !important;
        flex-wrap: wrap !important;
    }

    /* Hero button rows */
    [style*="display:flex"][style*="flex-wrap:wrap"],
    [style*="display: flex"][style*="flex-wrap:wrap"] {
        justify-content: center !important;
    }

    /* Form rows → stack */
    form[style*="display:flex"], form[style*="display: flex"] {
        flex-direction: column !important; gap: 10px !important;
    }
    form[style*="display:flex"] > *, form[style*="display: flex"] > * {
        width: 100% !important; flex: unset !important;
    }

    /* ── Theme CSS-class grids → horizontal snap sliders ── */
    .category-grid,
    .brands-grid,
    .posts-grid,
    .deals-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 12px !important;
        padding-bottom: 16px !important;
        scrollbar-width: none !important;
        grid-template-columns: unset !important;
    }
    .category-grid::-webkit-scrollbar,
    .brands-grid::-webkit-scrollbar,
    .posts-grid::-webkit-scrollbar,
    .deals-grid::-webkit-scrollbar { display: none; }
    .category-grid > *,
    .brands-grid > *,
    .posts-grid > *,
    .deals-grid > * {
        flex: 0 0 80% !important;
        width: 80% !important;
        max-width: 80% !important;
        scroll-snap-align: start !important;
        box-sizing: border-box !important;
    }
    /* Category cards are small icons — show 2 at a time */
    .category-grid > * {
        flex: 0 0 44% !important;
        width: 44% !important;
        max-width: 44% !important;
    }

    /* Max-width containers → full width */
    [style*="max-width:1100px"],[style*="max-width: 1100px"],
    [style*="max-width:1000px"],[style*="max-width: 1000px"],
    [style*="max-width:900px"],[style*="max-width: 900px"],
    [style*="max-width:700px"],[style*="max-width: 700px"],
    [style*="max-width:600px"],[style*="max-width: 600px"],
    [style*="max-width:500px"],[style*="max-width: 500px"],
    [style*="max-width:400px"],[style*="max-width: 400px"],
    [style*="max-width:360px"],[style*="max-width: 360px"] {
        max-width: 100% !important;
        width: 100% !important;
    }
}
