/* public/assets/css/app.css */

/* =========================
   RESET / BASE
   ========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2933;
    background-color: transparent;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    background: transparent;
    padding-top: 88px;
}

/* Fixed background layer for all devices */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.28)),
        url("/image.php?id=site_bg_desktop");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    transform: translateZ(0);
    will-change: transform;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================
   THEME VARIABLES
   ========================= */
:root {
    --accent: #db1709;
    --accent-soft: rgba(219, 23, 9, 0.22);
    --accent-ring: rgba(219, 23, 9, 0.28);

    --brand-red: #db1709;
    --brand-blue: #2563eb;
    --brand-glow: #e2f26b;

    --brand-deep: #0f172a;
    --brand-accent: var(--brand-red);

    --border: #e5e7eb;
    --muted: #475569;
    --bg: #f5f7fa;
    --card: #ffffff;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Accent glow utility */
.glow-accent {
    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(219, 23, 9, 0.16),
        0 14px 34px var(--accent-soft);
}

/* =========================
   LAYOUT: HEADER / MAIN / FOOTER
   ========================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: #0f172a;
    color: #f9fafb;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.4);
}

.site-header__left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.site-logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-logo__img {
    display: block;
    height: clamp(28px, 3.2vw, 52px);
    width: auto;
    max-width: 18vw;
    min-width: 42px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-nav a {
    color: #e5e7eb;
    font-size: 0.95rem;
}

.site-nav a:hover {
    color: #ffffff;
}

.site-header__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.site-header__user {
    font-size: 0.85rem;
    color: #9ca3af;
}

.site-header__cart {
    position: relative;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0.3rem 0.4rem;
    border-radius: 8px;
    text-decoration: none;
    transition: color 0.15s;
    flex-shrink: 0;
}
.site-header__cart:hover { color: #db1709; }
.site-header__cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #db1709;
    color: #fff;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.site-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
    line-height: 1;
    flex-shrink: 0;
    transition: background .15s;
}
.site-nav-toggle:hover { background: rgba(255,255,255,.1); }
.site-nav-toggle svg { display: block; }

/* Mobile nav auth links — hidden on desktop, shown in dropdown */
.site-nav__mobile-auth { display: none; }

@media (max-width: 860px) {
    .site-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: -1rem;
        right: -1rem;
        background: #0f172a;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0 1rem;
        border-radius: 0 0 16px 16px;
        border-top: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 8px 24px rgba(0,0,0,.4);
        z-index: 10;
    }
    .site-nav.is-open {
        display: flex;
    }
    .site-nav a {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
        border-radius: 0;
    }
    .site-nav a:hover {
        background: rgba(255,255,255,.07);
    }
    .site-header__left {
        position: relative;
    }
    /* Show auth links in dropdown, hide desktop buttons */
    .site-nav__mobile-auth {
        display: block;
        border-top: 1px solid rgba(255,255,255,.06);
        margin-top: 0.4rem;
        padding-top: 0.4rem;
        color: #9ca3af !important;
    }
    .site-nav__mobile-auth--primary {
        color: #f87171 !important;
        font-weight: 600;
    }
    .site-header__right {
        display: none;
    }
    /* Larger logo on mobile */
    .site-logo__img {
        height: 36px;
        max-width: none;
    }
}

.site-main {
    flex: 1;
    padding: 1.5rem 2rem;
    width: 100%;
    margin: 0 auto;
    max-width: none;
}

.site-footer {
    background: #0f172a;
    color: #9ca3af;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.75rem 1rem;
}

/* =========================
   CONTAINERS / TYPO
   ========================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

h1,
h2,
h3 {
    color: var(--brand-deep);
}

.muted,
.text-muted {
    color: #1f2937;
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
    white-space: nowrap;
}

.btn-primary {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-blue));
    color: #ffffff;
    box-shadow:
        0 10px 22px rgba(15, 23, 42, 0.3),
        0 0 0 1px rgba(219, 23, 9, 0.22),
        0 12px 30px var(--accent-soft);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f02211, #1e40af);
    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.4),
        0 0 0 1px rgba(219, 23, 9, 0.3),
        0 18px 44px var(--accent-ring);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(219, 23, 9, 0.22),
        0 10px 26px var(--accent-soft);
}

.btn-secondary {
    background-color: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
    border: none;
}

.btn-danger:hover {
    filter: brightness(0.95);
}

.btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px var(--accent-ring),
        0 0 0 1px rgba(219, 23, 9, 0.25);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* =========================
   FORMS (GLOBAL)
   ========================= */
.field,
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.field label,
.form-field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="url"],
.field select,
.field textarea,
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field input[type="url"],
.form-field select,
.form-field textarea,
.input,
.textarea,
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="tel"] {
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    outline: none;
    background-color: #f9fafb;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="tel"] {
    border-radius: 999px;
}

.field textarea,
.form-field textarea,
.textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.input {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
}

.textarea {
    width: 100%;
    background: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.input:focus,
.textarea:focus,
.auth-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background-color: #ffffff;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.form {
    padding: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.form-grid .span-2,
.field--span2 {
    grid-column: 1 / -1;
}

.field .help {
    font-size: 0.82rem;
    color: #6b7280;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #111827;
}

.req {
    color: #b91c1c;
}

.actions {
    white-space: nowrap;
}

/* =========================
   ALERTS
   ========================= */
.alert {
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    margin: 0.75rem 0;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.alert-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

/* =========================
   CARDS / PRODUCTS
   ========================= */
.card {
    background: var(--card);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.card img {
    width: 100%;
    border-radius: 0.5rem;
    object-fit: cover;
    max-height: 180px;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
}

.card-price {
    font-weight: 600;
    color: #16a34a;
    font-size: 0.95rem;
}

.card-meta {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.35;
}

.img-preview {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 0.75rem;
    background: #f9fafb;
}

.img-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 12px;
    display: block;
}

/* =========================
   SHOP HEADER / FILTERS
   ========================= */
.shop-breadcrumb {
    font-size: 0.82rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.shop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.shop-header__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    position: relative;
    padding-bottom: 0.15rem;
    margin-bottom: 0.2rem;
}

.shop-header__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.5rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-accent), transparent);
    opacity: 0.9;
}

.shop-header p,
.shop-header .text-muted {
    color: #1f2937;
    font-weight: 600;
}

.shop-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shop-header__filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.shop-header__filters input[type="text"],
.shop-header__filters select {
    height: 2.4rem;
    min-width: 180px;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background-color: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    font-size: 0.9rem;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.shop-header__filters select {
    min-width: 150px;
    cursor: pointer;
}

.shop-header__filters input[type="text"]::placeholder {
    color: #9ca3af;
}

.shop-header__filters input[type="text"]:focus,
.shop-header__filters select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    background-color: #ffffff;
}

.shop-header__filters .btn-primary {
    height: 2.4rem;
    padding: 0 1.25rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* Store wrapper */
.store-shell {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* =========================
   BRAND STRIP (LONG LOGO)
   ========================= */
.brand-strip {
    width: 100%;
    padding: 0.9rem 0 0.4rem;
    display: flex;
    justify-content: center;
}

.brand-strip__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
}

.brand-strip__logo {
    display: block;
    width: 100%;
    max-width: min(1100px, 92vw);
    height: clamp(44px, 7vw, 110px);
    object-fit: contain;
}

/* =========================
   SPECIALS STRIP
   ========================= */
.specials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.25rem;
    margin: 0 0 1.5rem;
}

.special-card {
    border-radius: 0.9rem;
    padding: 1.1rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.special-card:hover {
    transform: translateY(-2px);
}

.special-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.4rem;
    color: inherit;
}

.special-card__text {
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0 0 0.9rem;
    color: inherit;
    opacity: 0.95;
    max-width: 44ch;
}

.special-card__btn {
    align-self: flex-start;
    margin-top: auto;
}

.special-card--main {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(135deg, var(--brand-blue), #1d4ed8 42%, #0f172a 100%);
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.72);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.55),
        0 0 0 1px rgba(226, 242, 107, 0.14);
}

.special-card--main:hover {
    box-shadow:
        0 22px 52px rgba(15, 23, 42, 0.58),
        0 0 0 1px rgba(226, 242, 107, 0.18);
}

.special-card--main .special-card__title,
.special-card--main .special-card__text {
    color: #ffffff;
}

.special-card--main .special-card__text {
    opacity: 0.92;
}

.special-card--daily {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 32%),
        linear-gradient(135deg, #5d0804 0%, var(--brand-red) 62%, #b10f07 100%);
    color: #ffffff;
    border-color: rgba(219, 23, 9, 0.85);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.5),
        0 0 0 1px rgba(219, 23, 9, 0.72),
        0 0 16px rgba(226, 242, 107, 0.18);
}

.special-card--daily:hover {
    box-shadow:
        0 20px 46px rgba(15, 23, 42, 0.54),
        0 0 0 1px rgba(219, 23, 9, 0.82),
        0 0 18px rgba(226, 242, 107, 0.22);
}

.special-card--daily .special-card__title,
.special-card--daily .special-card__text {
    color: #ffffff;
}

.special-card--daily .special-card__text {
    opacity: 0.94;
}

.special-card--prebuilt {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 28%, var(--brand-red) 100%);
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.65);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.46),
        0 0 0 1px rgba(219, 23, 9, 0.55),
        0 0 14px rgba(226, 242, 107, 0.14);
}

.special-card--prebuilt:hover {
    box-shadow:
        0 20px 48px rgba(15, 23, 42, 0.5),
        0 0 0 1px rgba(219, 23, 9, 0.65),
        0 0 16px rgba(226, 242, 107, 0.18);
}

.special-card--prebuilt .special-card__title,
.special-card--prebuilt .special-card__text {
    color: #ffffff;
}

.special-card--prebuilt .special-card__text {
    opacity: 0.93;
}

.special-card--daily .btn-secondary,
.special-card--prebuilt .btn-secondary {
    background-color: rgba(255, 255, 255, 0.96);
    color: #111827;
    border-color: rgba(255, 255, 255, 0.75);
}

.special-card--daily .btn-secondary:hover,
.special-card--prebuilt .btn-secondary:hover {
    background-color: #ffffff;
    color: #111827;
    border-color: #ffffff;
    text-decoration: none;
}

.special-card--main .btn-primary {
    box-shadow:
        0 10px 22px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(37, 99, 235, 0.28);
}

/* =========================
   PRODUCT ROW CAROUSEL
   ========================= */
.product-section {
    margin-top: 1.75rem;
    background: transparent;
}

.product-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.product-section__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.product-section p,
.product-section .text-muted,
.product-section__subtitle {
    color: #1f2937;
    font-weight: 600;
}

.product-section__controls {
    display: none;
}

.product-row-carousel {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
}

.product-row-carousel__track {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.25rem;
}

.product-row-carousel__track::-webkit-scrollbar {
    display: none;
}

.product-row-card {
    flex: 0 0 calc((100% - 4rem) / 5);
    min-width: 0;
    max-width: none;
    scroll-snap-align: start;
}

.product-row-card.card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.85);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    min-height: 100%;
}

.product-row-card .mt-2 {
    margin-top: auto;
}

@media (max-width: 1400px) {
    .product-row-card {
        flex: 0 0 calc((100% - 3rem) / 4);
    }
}

@media (max-width: 1100px) {
    .product-row-card {
        flex: 0 0 calc((100% - 2rem) / 3);
    }
}

/* =========================
   AUTH PAGES (LOGIN / REGISTER)
   ========================= */
.auth-page {
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem 4rem;
    background: rgba(15, 23, 42, 0.08);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin-top: 2rem;
    padding: 2.5rem 2.75rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.auth-title {
    margin: 0 0 1.75rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: #0f172a;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.auth-link {
    font-size: 0.85rem;
    color: #2563eb;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    font-size: 0.85rem;
    color: #b91c1c;
}

/* Embedded mode */
body[data-embedded="1"] .site-header,
body[data-embedded="1"] .site-footer {
    display: none !important;
}

body[data-embedded="1"] {
    background: transparent;
    padding-top: 0;
}

body[data-embedded="1"]::before {
    display: none;
}

body[data-embedded="1"] .auth-page {
    min-height: auto;
    padding: 1rem;
    background: transparent;
}

body[data-embedded="1"] .auth-card {
    margin-top: 0;
    max-width: 520px;
    box-shadow: none;
    border-radius: 18px;
}

/* =========================
   DASHBOARD (ADMIN / CLIENT)
   ========================= */
.dash-header {
    margin: 0.25rem 0 1rem;
}

.dash-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.dash-menu {
    position: sticky;
    top: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 0.9rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.dash-menu .card {
    padding: 0.9rem;
}

.dash-menu h3 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.dash-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dash-menu a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    color: #111827;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.dash-menu a:hover {
    text-decoration: none;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.dash-content .card {
    padding: 1.2rem;
}

.dash-content .card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

/* =========================
   TABLES (ADMIN)
   ========================= */
.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.92rem;
}

.table th,
.table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
}

.table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
}

.table tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ── Responsive table → cards on mobile ──────────────────────
   Usage: add class="table table--cards" and data-label="Col"
   on every <td>. thead is hidden; each row becomes a card.
   ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .table--cards thead           { display: none; }
    .table--cards,
    .table--cards tbody,
    .table--cards tr,
    .table--cards td              { display: block; width: 100%; }
    .table--cards tr {
        margin-bottom: 0.75rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(15,23,42,.06);
    }
    .table--cards td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.55rem 0.9rem;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.88rem;
    }
    .table--cards td:last-child   { border-bottom: none; }
    .table--cards td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        white-space: nowrap;
        flex-shrink: 0;
    }
    /* odd/even row colours still work per-card */
    .table--cards tr:nth-child(odd)  td { background: #fff; }
    .table--cards tr:nth-child(even) td { background: #f8fafc; }
    .table--cards tr:hover td          { background: #fef2f2; }
}

/* =========================
   ADMIN PAGES
   ========================= */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
}

.page-head h1 {
    font-size: 1.6rem;
}

.page-head__actions {
    display: flex;
    gap: 0.5rem;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 0;
}

.toolbar__left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* =========================
   CHAT FAB
   ========================= */
.chat-fab {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 14px 30px rgba(15, 23, 42, 0.45),
        0 0 0 1px rgba(219, 23, 9, 0.22),
        0 18px 44px var(--accent-soft);
    cursor: pointer;
    z-index: 400;
}

/* =========================
   CHAT MODAL
   ========================= */
/* ── Chat side panel (replaces modal) ── */
.chat-side-panel {
    position: fixed;
    bottom: 84px;
    right: 20px;
    width: 440px;
    height: 620px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15,23,42,.28);
    display: flex;
    flex-direction: column;
    z-index: 500;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    overflow: hidden;
}
.chat-side-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.chat-side-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 1rem;
    background: linear-gradient(135deg, #0f172a, #1e2d4a);
    color: #fff;
    flex: 0 0 auto;
}
.chat-side-panel__title {
    font-size: .92rem;
    font-weight: 700;
}
.chat-side-panel__close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color .15s;
}
.chat-side-panel__close:hover { color: #fff; }
.chat-side-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .75rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
@media (max-width: 480px) {
    .chat-side-panel {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 80px;
        height: 520px;
    }
}

.chat-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.chat-modal-overlay.open .chat-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.chat-modal {
    width: min(520px, 95vw);
    height: min(720px, 92vh);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.55);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

.chat-modal__header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 500;
    background: #ffffff;
    flex: 0 0 auto;
}

.chat-modal__close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.chat-modal__body {
    flex: 1 1 auto;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.chat-embed,
.chat-frame {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border: 0;
    display: block;
    background: #ffffff;
}

/* =========================
   CHAT EMBEDDED NAV BAR
   ========================= */
.chat-nav-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: #1a2744;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.chat-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transition: background 0.15s;
}
.chat-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
}
.chat-nav-btn.primary {
    background: #c0392b;
    color: #fff;
}
.chat-nav-btn.primary:hover {
    background: #a93226;
}
.chat-nav-bar .role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}
.chat-nav-bar__spacer {
    flex: 1 1 auto;
}

/* Section-specific nav bar colours */
.chat-nav--hub      { background: #1a2744; }
.chat-nav--sales    { background: #b91c1c; }
.chat-nav--ai       { background: #6d28d9; }
.chat-nav--internal { background: #0369a1; }
.chat-nav--dm       { background: #065f46; }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1024px) {
    body {
        padding-top: 70px;
    }

    body::before {
        background-image:
            linear-gradient(rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.24)),
            url("/image.php?id=site_bg_tablet");
    }

    .specials-grid {
        grid-template-columns: 1fr;
    }

    .special-card {
        min-height: auto;
    }

    .special-card__text {
        max-width: none;
    }
}

@media (max-width: 960px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field--span2 {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .product-row-card {
        flex: 0 0 calc((100% - 1rem) / 2);
    }
}

@media (max-width: 640px) {
    body {
        padding-top: 68px;
    }

    body::before {
        background-image:
            linear-gradient(rgba(15, 23, 42, 0.20), rgba(15, 23, 42, 0.20)),
            url("/image.php?id=site_bg_mobile");
        background-position: center top;
    }

    .brand-strip__logo {
        height: 42px;
        max-width: 320px;
    }

    .chat-fab {
        top: 6.75rem !important;
        right: 1rem !important;
    }
}

@media (max-width: 520px) {
    .product-row-card {
        flex: 0 0 100%;
    }
}

/* =========================
   PRODUCT CARD UPGRADE
   ========================= */
.product-card {
    position: relative;
    gap: 0.75rem;
    padding: 0.85rem;
    min-height: 100%;
}

.product-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3;
    background: #db1709;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.55rem;
    border-radius: 0.25rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    pointer-events: none;
    max-width: calc(100% - 1.5rem);
}


.product-card__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 0.65rem;
    min-height: 210px;
    padding: 1rem;
    overflow: hidden;
}

.product-card__image-wrap:hover {
    text-decoration: none;
}

.product-card__image-wrap img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 0;
}

.product-card__image-placeholder {
    color: #64748b;
    font-size: 0.9rem;
}

.product-card__title {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 700;
    min-height: 2.7em;
}

.product-card__title a {
    color: #1f2937;
    text-decoration: none;
}

.product-card__title a:hover {
    color: var(--brand-red);
    text-decoration: none;
}

.product-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

.product-card__specs {
    margin: 0;
    padding-left: 1rem;
    color: #374151;
    font-size: 0.82rem;
    line-height: 1.45;
    display: grid;
    gap: 0.25rem;
    min-height: 5.6em;
}

.product-card__stock {
    font-size: 0.86rem;
    font-weight: 700;
    margin-top: auto;
}

.product-card__stock--ok {
    color: #15803d;
}

.product-card__stock--low {
    color: #b91c1c;
}

.product-card__prices {
    display: grid;
    gap: 0.18rem;
}

.product-card__retail {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
}

.product-card__old {
    font-size: 0.9rem;
    color: #6b7280;
    text-decoration: line-through;
}

.product-card__dealer {
    font-size: 0.82rem;
    color: #0f4c81;
    font-weight: 700;
}

.product-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.product-card__btn {
    width: 100%;
}

/* =========================
   PRODUCT DETAIL PAGE
   ========================= */
.product-detail-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 1rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 1.5rem;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.product-detail__media {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.product-detail__image {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1rem;
}

.product-detail__image--placeholder {
    display: grid;
    place-items: center;
    min-height: 320px;
    background: #f8fafc;
    color: #64748b;
}

.product-detail__title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(219, 23, 9, 0.18);
}

.product-detail__meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.5rem;
    align-items: start;
}

.product-price-stack {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.product-price-stack__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: baseline;
}

.product-price-stack__label {
    font-weight: 700;
    color: #1f2937;
}

.product-price-stack__retail {
    color: #ea580c;
    font-size: 1.5rem;
    font-weight: 800;
}

.product-price-stack__dealer {
    color: #0f4c81;
    font-size: 1.1rem;
    font-weight: 700;
}

.product-price-stack__old {
    color: #6b7280;
    text-decoration: line-through;
}

.product-detail__line {
    margin-bottom: 0.45rem;
    color: #1f2937;
}

.product-detail__brand {
    color: var(--brand-red);
    font-weight: 700;
}

.product-stock-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.9rem 0 1rem;
}

.stock-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 700;
}

.stock-pill--ok {
    background: #dcfce7;
    color: #166534;
}

.stock-pill--low {
    background: #fee2e2;
    color: #991b1b;
}

.product-detail__short {
    margin: 1rem 0;
    color: #334155;
    line-height: 1.65;
}

.product-detail__specs {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.35rem;
    color: #334155;
    line-height: 1.5;
}

/* Qty stepper — shared by product page and product cards */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    height: 38px;
    width: 100%;
}
.qty-stepper__btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    background: #f1f5f9;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #374151;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.qty-stepper__btn:hover { background: #e2e8f0; }
.qty-stepper__btn:active { background: #cbd5e1; }
.qty-stepper__input {
    flex: 1 1 auto;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    text-align: center;
    font-size: .95rem;
    font-weight: 600;
    width: 100%;
    min-width: 0;
    background: #fff;
    color: #0f172a;
    outline: none;
    /* hide native number arrows */
    -moz-appearance: textfield;
}
.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product-card__stepper-form { margin-bottom: .5rem; }
.qty-stepper--card { height: 34px; }
.qty-stepper--card .qty-stepper__btn { flex: 0 0 34px; width: 34px; height: 34px; font-size: 1.1rem; }
.qty-stepper--card .qty-stepper__input { font-size: .875rem; }

.product-detail__buybox {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 1rem;
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
}

.product-detail__cart-btn,
.product-detail__compare-btn {
    width: 100%;
}

.product-detail__back-link {
    font-size: 0.9rem;
    font-weight: 600;
}

.product-detail__description {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.product-detail__description h2 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

@media (max-width: 960px) {
    .product-detail-card {
        grid-template-columns: 1fr;
    }

    .product-detail__meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .product-card__image-wrap {
        min-height: 180px;
    }

    .product-card__image-wrap img {
        height: 150px;
    }

    .product-detail__title {
        font-size: 1.3rem;
    }
}

/* =========================
   PRODUCT CAROUSEL CONTROLS
   ========================= */
.product-section__controls {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.product-carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

.product-carousel-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #ffffff;
    color: var(--brand-red);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.product-carousel-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

@media (max-width: 640px) {
    .product-section__header {
        align-items: flex-start;
    }

    .product-section__controls {
        width: 100%;
        justify-content: flex-end;
    }

    .product-carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}
/* ── Auth: OTP input ─────────────────────────────────────── */
.otp-input {
    font-size: 2rem !important;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-align: center;
    padding: 0.75rem 1rem !important;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: #475569;
    margin: -0.75rem 0 1.5rem;
    line-height: 1.6;
}

.auth-hint {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

/* ── mCaptcha widget wrapper ─────────────────────────────── */
#mcaptcha-widget {
    margin: 0.25rem 0;
}

/* ── Auth forms: compact layout on small phones ──────────── */
@media (max-width: 480px) {
    .auth-page {
        padding: 0.75rem 0.5rem 2rem;
    }
    .auth-card {
        padding: 1.25rem 1rem;
        margin-top: 0.5rem;
    }
    .auth-title {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }
    .auth-subtitle {
        font-size: 0.85rem;
    }
    .otp-input {
        font-size: 1.5rem !important;
        letter-spacing: 0.3em;
    }
    /* Shrink mCaptcha iframe — zoom affects layout unlike transform */
    #mcaptcha__widget-container {
        zoom: 0.75;
        /* Firefox fallback */
        transform: scale(0.75);
        transform-origin: top left;
        max-height: 175px;
        overflow: hidden;
    }
}

/* Password checkbox toggle */
.auth-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2563eb; /* matches your blue theme */
}

.auth-checkbox-row span {
    line-height: 1;
}

/* =========================================================
   Rich content pages (Contact / Blog)
   ========================================================= */

.page-card {
    max-width: 1100px;
    margin: 1.5rem auto 2rem;
    padding: 0;
    overflow: hidden;
    border-radius: 1.15rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
}

.page-rich-content {
    padding: 2rem 2rem 2.25rem;
    color: #1e293b;
}

.page-rich-content h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.page-rich-content h2 {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.55rem;
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.page-rich-content h3 {
    margin: 1.15rem 0 0.55rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.page-rich-content p {
    margin: 0 0 1rem;
    font-size: 1.02rem;
    line-height: 1.72;
    color: #334155;
}

.page-rich-content .muted {
    color: #475569;
    font-size: 1.02rem;
    font-weight: 600;
}

.page-rich-content ul,
.page-rich-content ol {
    margin: 0.5rem 0 1.15rem 1.25rem;
    padding: 0;
    color: #334155;
}

.page-rich-content li {
    margin: 0.35rem 0;
    line-height: 1.65;
}

.page-rich-content a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.18s ease, color 0.18s ease;
}

.page-rich-content a:hover {
    color: #1d4ed8;
    opacity: 0.92;
    text-decoration: underline;
}

.page-rich-content > p:first-of-type {
    font-size: 1.08rem;
}

.page-rich-content h2 + ul,
.page-rich-content h2 + ol {
    margin-top: 0.25rem;
}

/* highlighted intro strip */
.cms-content > p.muted:first-of-type {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(219, 23, 9, 0.10), rgba(37, 99, 235, 0.12));
    color: #0f172a;
    font-weight: 700;
    font-size: 0.96rem;
}

/* Make social/channel sections feel more intentional */
.cms-content--blog ul li a,
.cms-content--contact ul li a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.12rem 0;
}

/* Stronger list blocks under major headings */
.cms-content--blog h2 + ul,
.cms-content--contact h2 + ul {
    padding: 0.6rem 0 0.1rem 0.25rem;
    border-left: 3px solid rgba(37, 99, 235, 0.22);
    margin-left: 0;
    padding-left: 1rem;
}

/* Optional contact details emphasis */
.cms-content--contact p strong {
    color: #0f172a;
}

/* Better breathing room on smaller screens */
@media (max-width: 900px) {
    .page-card {
        margin: 1rem auto 1.5rem;
        border-radius: 1rem;
    }

    .page-rich-content {
        padding: 1.35rem 1.15rem 1.5rem;
    }

    .page-rich-content h1 {
        font-size: 2rem;
    }

    .page-rich-content h2 {
        font-size: 1.35rem;
    }

    .page-rich-content p,
    .page-rich-content li {
        font-size: 0.98rem;
    }
}

/* =========================================================
   Blog system
   ========================================================= */

.blog-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.blog-post-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.blog-post-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.blog-post-card__type {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(219, 23, 9, 0.10), rgba(37, 99, 235, 0.12));
    color: #0f172a;
    font-weight: 700;
    text-transform: capitalize;
}

.blog-post-card__title {
    margin: 0 0 0.45rem;
    font-size: 1.2rem;
    line-height: 1.2;
}

.blog-post-card__title a {
    color: #0f172a;
    text-decoration: none;
}

.blog-post-card__title a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.blog-post-card__author {
    margin: 0 0 0.75rem;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 600;
}

.blog-post-card__excerpt {
    color: #334155;
    margin-bottom: 0.95rem;
    line-height: 1.65;
}

.blog-post-card__link {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.blog-post-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 1.2rem;
    color: #475569;
    font-size: 0.95rem;
}

.blog-video-embed {
    margin: 1rem 0 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    background: #0f172a;
}

.blog-video-embed iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.blog-post-body {
    color: #334155;
    line-height: 1.75;
}

.blog-intro-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 900px) {
    .blog-post-grid {
        grid-template-columns: 1fr;
    }

    .blog-post-meta {
        flex-direction: column;
        gap: 0.4rem;
    }
}

/* ===== Floating Stack ===== */
.floating-stack {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 9999;
}

/* Social Icons */
.social-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icons a {
    width: 42px;
    height: 42px;
    background: #111827;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: 0.25s ease;
}

.social-icons a:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Modal height is fixed via CSS — iframe scrolls internally */

/* =========================
   FLOATING SOCIAL STACK
   ========================= */
.floating-contact-stack {
    position: fixed;
    top: 108px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 400;
}

.floating-socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.floating-socials__link {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    box-shadow:
        0 12px 26px rgba(15, 23, 42, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
    text-decoration: none;
}

.floating-socials__link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--brand-red), var(--brand-blue));
    box-shadow:
        0 16px 34px rgba(15, 23, 42, 0.42),
        0 0 0 1px rgba(219, 23, 9, 0.22),
        0 18px 44px var(--accent-soft);
}

.floating-socials__link svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

.chat-modal-overlay {
    padding: 1rem;
}

.chat-modal--frame {
    width: min(520px, 95vw);
    height: min(720px, 92vh);
}

.chat-modal__body--frame {
    overflow: hidden;
}

.chat-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #ffffff;
}

body[data-embedded="1"] {
    overflow-y: auto;
    overflow-x: hidden;
}

body[data-embedded="1"] .site-main {
    padding: 0;
}

/* Auth forms in modal */
body[data-embedded="1"] .auth-page {
    min-height: auto;
    padding: 0.85rem;
    background: transparent;
}

body[data-embedded="1"] .auth-card {
    width: 100%;
    max-width: none;
    margin-top: 0;
    padding: 1.25rem;
    box-shadow: none;
    border-radius: 12px;
}

body[data-embedded="1"] .auth-field textarea,
body[data-embedded="1"] .auth-field input[type="text"],
body[data-embedded="1"] .auth-field input[type="password"],
body[data-embedded="1"] .auth-field input[type="email"] {
    font-size: 0.95rem;
}

/* Chat shells in modal — strip decorative framing, let content fill naturally */
body[data-embedded="1"] .sales-client-shell,
body[data-embedded="1"] .thread-shell,
body[data-embedded="1"] .ai-shell,
body[data-embedded="1"] .chat-hub-shell {
    min-height: auto;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

body[data-embedded="1"] .sales-client-window,
body[data-embedded="1"] .thread-window,
body[data-embedded="1"] .ai-window {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

/* Hub grid: always 2 columns inside modal (iframe ~540px, 2×220px fits) */
body[data-embedded="1"] .chat-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
    .floating-contact-stack {
        right: 12px;
        gap: 0.6rem;
    }

    .floating-socials__link {
        width: 40px;
        height: 40px;
    }

    .chat-modal,
    .chat-modal--frame {
        width: min(95vw, 520px);
        height: min(90vh, 680px);
    }
}

/* ── Mobile: hide social icons, centre logo, hamburger on left ── */
@media (max-width: 860px) {
    /* Social icons hidden — links accessible via footer/about page */
    .floating-socials { display: none; }

    /* Move chat FAB to bottom-right corner on mobile — !important beats inline top:70px on admin topbar */
    .floating-contact-stack {
        top: auto !important;
        bottom: 1.25rem;
        right: 1rem;
    }

    /* [☰] [──logo centred──] [🛒] — login/signup in hamburger dropdown */
    .site-header {
        padding: 0.6rem 1rem;
    }
    .site-header__left {
        flex: 1;
        gap: 0;
    }
    .site-logo {
        flex: 1;
        display: flex;
        justify-content: center;
    }
    .site-nav {
        left: 0;
        right: 0;
        top: 100%;
    }
    /* Show cart only — auth buttons are in hamburger dropdown */
    .site-header__right {
        display: flex;
        align-items: center;
        gap: 0;
    }
    .site-header__right .btn {
        display: none;
    }
}

/* =========================================================
   Shop search / results
   ========================================================= */

.shop-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.4rem;
    padding: 0 1.15rem;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
}

.shop-results-shell {
    max-width: 1400px;
    margin: 0 auto 2rem;
}

.shop-results-card {
    padding: 1.25rem;
}

.shop-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.shop-results-toolbar {
    margin-bottom: 1rem;
}

.shop-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.product-grid-card {
    min-height: 100%;
}

.shop-empty-state {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.shop-empty-state h2 {
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.shop-empty-state__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .shop-results-card {
        padding: 1rem;
    }

    .shop-results-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   NEWSLETTER POPUP
   ========================= */
.nl-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.nl-popup-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.nl-popup {
    width: min(500px, 94vw);
    max-height: min(640px, 90vh);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.55);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}

.nl-popup-overlay.open .nl-popup {
    transform: translateY(0) scale(1);
}

.nl-popup__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.nl-popup__close {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0.2rem;
}

.nl-popup__close:hover {
    color: #0f172a;
}

.nl-popup__body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

.nl-popup__intro {
    margin: 0 0 1rem;
    color: #475569;
    font-size: 0.95rem;
}

.nl-popup__posts-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin: 0 0 0.65rem;
}

.nl-popup__posts {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.nl-popup__post {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.nl-popup__post-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
    text-decoration: none;
    display: block;
    margin-bottom: 0.3rem;
}

.nl-popup__post-title:hover {
    color: #db1709;
}

.nl-popup__post-excerpt {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.nl-popup__empty {
    padding: 0.5rem 0 1rem;
    color: #64748b;
    font-size: 0.95rem;
}

.nl-popup__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    background: #f8fafc;
    flex-wrap: wrap;
}

.nl-popup__dismiss {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.nl-popup__dismiss:hover {
    color: #0f172a;
}
/* ── Hero Carousel ─────────────────────────────────────────────────── */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide {
    cursor: pointer;
}

.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    padding: 0.45rem 0.9rem;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
    transition: background 0.2s;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(0, 0, 0, 0.65);
}

.hero-prev { left: 1rem; }
.hero-next { right: 1rem; }

.hero-dots {
    position: absolute;
    bottom: 0.75rem;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    z-index: 10;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s;
}

.hero-dot.active {
    background: #fff;
}

@media (max-width: 600px) {
    .hero-carousel { height: 280px; }
    .hero-prev, .hero-next { font-size: 1.2rem; padding: 0.3rem 0.65rem; }
}
