/* =========================================================
   THEME TOKENS
   Palette/type inspired by the EdusoftERP reference (green
   #4caf50 primary, deep navy #13294b chrome, blue accent,
   Apple system type, soft pill buttons, colour-tinted glow shadows).
   Every component below is built from these variables.
   ========================================================= */

:root {
    --brand: #3c9a46;
    --brand-bright: #4caf50;
    --brand-dark: #2c7233;
    --brand-glow: rgba(76, 175, 80, .35);

    --navy: #13294b;
    --navy-2: #0d1c33;
    --navy-glow: rgba(19, 41, 75, .16);

    --blue: #247dfe;
    --coral: #ef5b3d;
    --accent-orange: #f5811f;

    --bg: #f5f7f9;
    --surface: #ffffff;
    --ink: #16233a;
    --ink-soft: #45526a;
    --muted: #707888;
    --border: #e3e8ee;
}


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    /* Segoe UI Semibold. The Semibold face is named first so Windows uses
       that exact cut; font-weight 600 below asks for the same weight on
       platforms that resolve it from a family rather than a named face
       (Apple's SF, Android's Roboto), so the page reads the same weight
       everywhere rather than only on Windows. All system fonts - nothing
       is downloaded. */
    font-family: 'Segoe UI Semibold', 'Segoe UI', -apple-system, BlinkMacSystemFont,
                 Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   NAVBAR
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: var(--navy);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
    width: min(1280px, calc(100% - 40px));

    min-height: 70px;

    margin: auto;

    display: flex;
    align-items: center;

    gap: 24px;
}

.brand {
    flex-shrink: 0;

    font-size: 23px;
    font-weight: 800;

    letter-spacing: -0.8px;

    color: #fff;
}

.nav-search {
    flex: 1;

    max-width: 560px;

    display: flex;
}

.nav-search input {
    width: 100%;
    min-width: 0;

    height: 42px;

    padding: 0 16px;

    border: 1px solid transparent;

    border-right: none;

    border-radius: 999px 0 0 999px;

    outline: none;

    background: #f7f7f8;

    transition:
            background .2s ease,
            border-color .2s ease;
}

.nav-search input:focus {
    background: white;
    border-color: var(--brand);
}

.nav-search button {
    border: 0;

    padding: 0 18px;

    background: var(--brand);
    color: white;

    border-radius: 0 999px 999px 0;

    cursor: pointer;

    transition: background .2s ease;
}

.nav-search button:hover {
    background: var(--brand-dark);
}

.nav-links {
    margin-left: auto;

    display: flex;

    align-items: center;

    gap: 18px;

    white-space: nowrap;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;

    color: #fff;

    transition: opacity .2s ease, transform .2s ease;
}

.nav-links a:hover {
    opacity: .85;
    transform: translateY(-1px);
}

.nav-cart {
    display: inline-flex;

    align-items: center;

    gap: 6px;
}

.cart-count {
    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    background: var(--brand-bright);
    color: white;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 700;
}

.cart-count-bump {
    animation: cartCountBump .4s ease;
}

@keyframes cartCountBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.add-cart-bulge {
    animation: addCartBulge .35s ease;
}

/* Uses the standalone `scale` property (not `transform: scale()`) so it
   composites independently of the `.magnetic` hover-follow effect, which
   writes to `transform` directly via GSAP - animating the same property
   here would fight it and glitch while hovering. */
@keyframes addCartBulge {
    0% { scale: 1; }
    40% { scale: 1.15; }
    100% { scale: 1; }
}

.is-hidden {
    display: none !important;
}

.cart-control {
    margin-top: 9px;
}

.qty-stepper {
    display: flex;
    align-items: stretch;
    height: 42px;
    border: 2px solid var(--brand-bright);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

/* The shop-grid card's stepper sits directly in .cart-control (the
   product page's larger one is wrapped in .product-qty-row instead),
   so this only shrinks the compact card version to match its button. */
.cart-control > .qty-stepper {
    height: 36px;
}

.cart-control > .qty-stepper .qty-value {
    font-size: 12px;
}

.qty-btn {
    flex: 1;
    display: grid;
    place-items: center;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
    transition: background .15s ease;
}

.qty-btn:hover:not(:disabled) {
    background: #eaf6ea;
}

.qty-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.qty-decrement {
    border-right: 1px solid #cdeacd;
}

.qty-increment {
    border-left: 1px solid #cdeacd;
}

.qty-value {
    flex: 1.2;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.logout-form {
    margin: 0;
}

.logout-button {
    border: 0;

    background: none;

    cursor: pointer;

    color: #fff;

    padding: 0;

    font-size: 14px;
}

.profile-menu {
    position: relative;
}

.profile-trigger {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 999px;
}

.profile-trigger::-webkit-details-marker {
    display: none;
}

.profile-trigger:hover {
    background: rgba(255,255,255,.08);
}

.profile-avatar {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    background: var(--brand-bright);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
}

.profile-name {
    font-size: 14px;
    color: #fff;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    background: var(--navy-2);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    z-index: 20;
}

.profile-dropdown .logout-button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 10px;
}

.profile-dropdown .logout-button:hover {
    background: rgba(255,255,255,.08);
}

/* =========================================================
   HERO
   ========================================================= */

.hero-section {
    position: relative;

    width: min(1280px, calc(100% - 40px));

    min-height: 430px;

    margin: 32px auto 0;

    padding: 75px 72px;

    overflow: hidden;

    /* one squared-off corner is the brand's signature shape */
    border-radius: 32px 32px 32px 6px;

    background:
            radial-gradient(
                    circle at 80% 20%,
                    rgba(76,175,80,.20),
                    transparent 32%
            ),
            linear-gradient(
                    135deg,
                    var(--navy) 0%,
                    #1c3660 52%,
                    var(--navy-2) 100%
            );

    color: white;

    display: flex;

    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 700px;
}

.hero-eyebrow {
    display: inline-block;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2.5px;

    color: var(--brand-bright);
}

.hero-content h1 {
    margin: 16px 0 0;

    font-size: clamp(34px, 6vw, 72px);

    font-weight: 700;

    line-height: 1.05;

    letter-spacing: -2px;
}

.hero-content p {
    margin: 22px 0 28px;

    max-width: 560px;

    color: #cdd6e4;

    font-size: clamp(14px, 2vw, 17px);

    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
}

.hero-glow {
    position: absolute;

    width: 480px;
    height: 480px;

    right: -90px;
    top: -100px;

    border-radius: 50%;

    background:
            radial-gradient(
                    circle,
                    rgba(76,175,80,.25),
                    transparent 65%
            );

    pointer-events: none;
}

.hero-section.has-banner-image {
    background-size: cover;
    background-position: center;
}

.hero-section.has-banner-image::before,
.hero-section.has-banner-video::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(13,28,51,.82) 0%, rgba(13,28,51,.5) 55%, rgba(13,28,51,.18) 100%);
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-audio {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-audio-label {
    font-size: 13px;
    font-weight: 600;
    color: #cdd6e4;
    white-space: nowrap;
}

.hero-audio audio {
    height: 36px;
    max-width: 320px;
}

.hero-banner-edit {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 3;
}

.hero-banner-edit-trigger {
    list-style: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.hero-banner-edit-trigger::-webkit-details-marker {
    display: none;
}

.hero-banner-edit-trigger:hover {
    background: rgba(255,255,255,.24);
}

.hero-banner-edit-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(260px, calc(100vw - 44px));
    background: var(--navy-2);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    color: #fff;
}

.hero-banner-edit-panel form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-banner-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px dashed rgba(255,255,255,.3);
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
}

.hero-banner-upload:hover {
    border-color: var(--brand-bright);
}

.hero-banner-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.hero-banner-edit-panel input[type="text"] {
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 13px;
}

.hero-banner-edit-panel button[type="submit"] {
    padding: 10px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-bright);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.hero-banner-edit-panel .alert {
    margin-bottom: 10px;
    font-size: 12px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 22px;

    border-radius: 999px;

    font-size: 14px;

    font-weight: 600;

    transition:
            transform .2s ease,
            box-shadow .2s ease,
            background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--brand-bright);
    color: #fff;

    box-shadow:
            0 10px 26px var(--brand-glow);
}

.btn-primary:hover {
    background: var(--brand-bright);
    color: var(--accent-orange);
}

.btn-secondary {
    background: rgba(255,255,255,.1);

    border: 1px solid rgba(255,255,255,.24);

    color: white;
}


/* =========================================================
   SHOP
   ========================================================= */

.shop-section {
    width: min(1480px, calc(100% - 28px));

    margin: 64px auto 80px;
}

.shop-top {
    display: flex;

    align-items: end;

    justify-content: space-between;

    gap: 25px;

    margin-bottom: 25px;
}

.section-label {
    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;

    color: var(--brand);
}

.shop-top h2 {
    margin: 8px 0 7px;

    font-size: clamp(24px, 4vw, 34px);

    font-weight: 700;

    line-height: 1.15;

    letter-spacing: -1px;
}

.shop-top p {
    margin: 0;

    color: var(--muted);

    font-size: 15px;
}

.product-count {
    color: var(--muted);

    font-size: 14px;

    white-space: nowrap;
}


/* =========================================================
   FILTER BAR
   ========================================================= */

.filter-bar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 24px;

    padding: 13px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 18px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;

    gap: 9px;

    align-items: center;
}

.filter-form select {
    height: 40px;

    padding: 0 32px 0 14px;

    border: 1px solid var(--border);

    border-radius: 999px;

    background: white;

    color: var(--ink);

    outline: none;

    cursor: pointer;
}

.filter-button {
    height: 40px;

    padding: 0 18px;

    border: 0;

    border-radius: 999px;

    background: var(--brand-bright);

    color: white;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition: background .2s ease;
}

.filter-button:hover {
    background: var(--brand-dark);
}

.results-text {
    font-size: 13px;

    color: var(--muted);
}


/* =========================================================
   PRODUCT GRID
   ========================================================= */

.product-grid {
    display: grid;

    grid-template-columns:
            repeat(6, minmax(0, 1fr));

    gap: 14px;
}


/* =========================================================
   PRODUCT CARD
   Compact by design: the card's job is to be scannable and
   clickable, not to repeat everything the product page already
   shows on click — so it trades description text for a denser,
   richer-feeling grid instead.
   ========================================================= */

.product-card {
    position: relative;

    min-width: 0;

    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    overflow: hidden;

    box-shadow: 0 2px 10px rgba(19, 41, 75, .05);

    transition:
            transform .24s ease,
            box-shadow .24s ease,
            border-color .24s ease,
            filter .2s ease;
}

.product-card:hover {
    transform: translateY(-6px);

    border-color: var(--brand-bright);

    box-shadow:
            0 22px 44px var(--navy-glow);
    filter: saturate(1.05);
}


/* =========================================================
   SHOP GRID (Shops near you)
   ========================================================= */

.shop-grid {
    display: grid;

    grid-template-columns:
            repeat(4, minmax(0, 1fr));

    gap: 14px;
}

.shop-card {
    display: block;

    min-width: 0;

    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 16px;

    text-decoration: none;

    color: inherit;

    box-shadow: 0 2px 10px rgba(19, 41, 75, .05);

    transition:
            transform .24s ease,
            box-shadow .24s ease,
            border-color .24s ease;
}

.shop-card:hover {
    transform: translateY(-6px);

    border-color: var(--brand-bright);

    box-shadow: 0 22px 44px var(--navy-glow);
}

.shop-card-logo {
    width: 48px;
    height: 48px;

    border-radius: 12px;

    object-fit: cover;

    margin-bottom: 10px;
}

.shop-card-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--brand-bright);
    color: white;

    font-weight: 700;
    font-size: 1.1rem;
}

.shop-card-name {
    margin: 0 0 4px;

    font-size: 1rem;
    font-weight: 600;
}

.shop-address {
    margin: 0 0 6px;

    font-size: .85rem;
    color: var(--muted);
}

.shop-distance {
    display: inline-block;

    font-size: .8rem;
    font-weight: 600;
    color: var(--brand-bright);
}

@media (max-width: 900px) {
    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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


/* =========================================================
   PRODUCT IMAGE
   ========================================================= */

.product-image {
    position: relative;

    display: block;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #eef1f4;
}

.product-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
            transform .45s cubic-bezier(.2,.7,.2,1);
}

/* Superseded by the tilt-aware parallax rule in fluid3d.css, which
   folds this same zoom into a transform that also includes the
   pointer-driven translate - two separate rules setting `transform`
   on the same element would just have one silently override the
   other instead of combining. */

/* =========================================================
   PRODUCT BODY
   ========================================================= */

.product-body {
    padding: 11px 12px 13px;
}

.product-meta {
    display: flex;

    gap: 5px;

    align-items: center;

    color: var(--muted);

    font-size: 9px;

    margin-bottom: 5px;
}

.dot {
    color: #bbb;
}

.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    font-size: 13.5px;

    font-weight: 600;

    letter-spacing: -.05px;

    line-height: 1.32;

    margin-bottom: 0;

    color: var(--ink);
}

.product-description {
    /* The card stays scannable; the full description lives on the
       product page a click away, not duplicated here. */
    display: none;
}

.rating-row {
    display: flex;

    gap: 3px;

    align-items: center;

    margin-top: 5px;

    font-size: 10.5px;

    color: var(--ink-soft);
}

.stars {
    font-size: 10.5px;
    color: #f5b400;
}

.rating-text {
    color: var(--muted);
    margin-left: 1px;
}


/* =========================================================
   PRICE
   ========================================================= */

.price-row {
    display: flex;

    align-items: baseline;

    gap: 6px;

    margin-top: 7px;
}

.current-price {
    font-size: 15px;

    font-weight: 700;

    letter-spacing: -.2px;

    color: var(--brand);
}

.price-row del {
    font-size: 10.5px;

    color: #999;
}


/* =========================================================
   STOCK
   ========================================================= */

.stock-row {
    min-height: 15px;

    margin-top: 4px;

    font-size: 9.5px;
}

.stock-available {
    color: var(--brand);

    font-weight: 700;
}

.stock-low {
    color: #b3720a;
}

.stock-out {
    color: var(--coral);

    font-weight: 700;
}


/* =========================================================
   ADD TO CART
   ========================================================= */

.cart-form {
    margin: 0;
}

.add-cart-button {
    position: relative;

    width: 100%;

    height: 36px;

    border: 0;

    border-radius: 999px;

    background: var(--brand-bright);
    color: white;

    font-size: 11.5px;

    font-weight: 700;

    cursor: pointer;

    transition:
            background .2s ease,
            transform .2s ease,
            box-shadow .2s ease;
}

.add-cart-button:hover:not(:disabled) {
    background: var(--brand-dark);

    transform: translateY(-1px);

    box-shadow: 0 10px 22px var(--brand-glow);
}

.add-cart-button:disabled {
    background: #c9cdd4;

    cursor: not-allowed;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    padding: 90px 20px;

    text-align: center;

    background: white;

    border: 1px solid var(--border);

    border-radius: 24px;
}

.empty-icon {
    font-size: 38px;

    margin-bottom: 10px;
}

.empty-state h3 {
    margin: 0 0 7px;

    font-size: clamp(20px, 4vw, 25px);

    letter-spacing: -.4px;
}

.empty-state p {
    margin: 0 0 20px;

    color: var(--muted);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    margin-top: 100px;

    background: var(--navy);

    color: white;
}

.footer-main {
    width: min(1280px, calc(100% - 40px));

    margin: auto;

    display: grid;

    grid-template-columns:
            2fr 1fr 1fr 1fr;

    gap: 40px;

    padding: 60px 0 55px;
}

.footer-logo {
    display: block;

    font-size: 23px;

    font-weight: 800;

    letter-spacing: -.5px;

    margin-bottom: 14px;

    color: var(--brand-bright);
}

.footer-brand p {
    max-width: 330px;

    margin: 0;

    color: #b7c1d1;

    line-height: 1.65;

    font-size: 13px;
}

.footer-column {
    display: flex;

    flex-direction: column;

    gap: 11px;
}

.footer-column h4 {
    margin: 0 0 6px;

    font-size: 13px;

    color: white;
}

.footer-column a {
    color: #a9b4c5;

    font-size: 13px;

    transition: color .2s ease;
}

.footer-column a:hover {
    color: var(--brand-bright);
}

.footer-bottom {
    width: min(1280px, calc(100% - 40px));

    margin: auto;

    padding: 18px 0;

    border-top: 1px solid rgba(255,255,255,.1);

    display: flex;
    flex-wrap: wrap;

    justify-content: space-between;

    gap: 10px 20px;

    color: #8b96a8;

    font-size: 11px;
}

.footer-attribution {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-attribution-icon {
    display: block;
    border-radius: 4px;
}


/* =========================================================
   RESPONSIVE — NAV / HERO / GRID
   ========================================================= */

@media (max-width: 1400px) {

    .product-grid {
        grid-template-columns:
                repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {

    .product-grid {
        grid-template-columns:
                repeat(4, minmax(0, 1fr));
    }

    .nav-search {
        max-width: 380px;
    }
}


@media (max-width: 850px) {

    .nav-inner {
        flex-wrap: wrap;

        padding: 13px 0;
    }

    .nav-search {
        order: 3;

        max-width: none;

        width: 100%;
    }

    .nav-links {
        gap: 13px;
    }

    .hero-section {
        padding: 55px 42px;
    }

    .product-grid {
        grid-template-columns:
                repeat(3, minmax(0, 1fr));
    }

    .footer-main {
        grid-template-columns:
                repeat(2, 1fr);
    }
}


@media (max-width: 600px) {

    .nav-inner {
        width: min(100% - 24px, 1280px);
    }

    .nav-links {
        width: 100%;

        justify-content: space-between;
    }

    .hero-section {
        width: calc(100% - 24px);

        min-height: auto;

        margin-top: 12px;

        padding: 36px 24px;

        border-radius: 26px 26px 26px 6px;
    }

    .shop-section {
        width: calc(100% - 24px);

        margin-top: 45px;
    }

    .shop-top {
        align-items: start;

        flex-direction: column;
    }

    .filter-bar {
        align-items: stretch;

        flex-direction: column;
    }

    .filter-form {
        width: 100%;

        flex-direction: column;
    }

    .filter-form select,
    .filter-button {
        width: 100%;
    }

    .product-grid {
        grid-template-columns:
                repeat(2, minmax(0, 1fr));
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 380px) {

    .brand {
        font-size: 19px;
    }

    .hero-section {
        padding: 28px 18px;
    }

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

    .product-image {
        aspect-ratio: 1.15 / 1;
    }
}


/* =========================================================
   CART X — SHARED PAGE UI
   ========================================================= */

.container{width:min(1240px,calc(100% - 40px));margin:0 auto;padding:48px 0 80px}
.container.narrow{max-width:1040px}
main{min-height:calc(100vh - 160px)}
.muted{color:var(--muted)}
.small{font-size:12px}
.section-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px 20px;margin-bottom:24px}
.section-head h1,.section-head h2{margin:0;letter-spacing:-.8px;font-weight:700}
.eyebrow{display:inline-block;color:var(--brand);font-size:11px;font-weight:700;letter-spacing:2px;text-transform:uppercase}
.full{width:100%}
.btn.dark,
.btn.outline{background:#fff;border:1px solid var(--border);color:var(--ink)}
.btn.dark:hover,
.btn.outline:hover{border-color:var(--accent-orange);color:var(--accent-orange)}
.btn.danger{background:#fff;border:1px solid #e14b3d;color:#e14b3d}
.btn.danger:hover{background:#e14b3d;border-color:#e14b3d;color:#fff}
.btn.sm{min-height:34px;padding:0 16px;font-size:13px}

/* Square icon-only action (e.g. the per-order invoice download in the
   admin tables) - keeps table rows compact where a labelled button
   would crowd them. The label lives in title/aria-label instead. */
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--ink);cursor:pointer;transition:border-color .2s,color .2s,transform .2s}
.icon-btn:hover{border-color:var(--accent-orange);color:var(--accent-orange);transform:translateY(-1px)}

/* Slide toggle for boolean fields (e.g. a coupon/shop's "Active" flag) -
   a real checkbox underneath (so it still posts a normal form value,
   including the _active field-marker convention used alongside it),
   just visually replaced by the slider. */
.switch{position:relative;display:inline-flex;align-items:center;width:40px;height:22px;flex:none;cursor:pointer}
.switch input[type="checkbox"]{position:absolute;opacity:0;width:0;height:0}
.switch-slider{position:absolute;inset:0;background:var(--border);border-radius:999px;transition:background .2s ease}
.switch-slider::before{content:"";position:absolute;left:3px;top:3px;width:16px;height:16px;background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s ease}
.switch input:checked+.switch-slider{background:var(--accent-orange)}
.switch input:checked+.switch-slider::before{transform:translateX(18px)}
.switch input:focus-visible+.switch-slider{box-shadow:0 0 0 3px rgba(245,129,31,.35)}

/* A <label class="btn file-btn"> wrapping a real file input: the input
   itself is invisible but still fills and sits on top of the label, so
   it stays clickable and keyboard/screen-reader accessible - the label
   just supplies the button's visible appearance. */
.file-btn{position:relative;display:inline-flex;overflow:hidden;cursor:pointer}
.file-btn input[type="file"]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}

.pending-badge{display:inline-block;margin-left:8px;padding:3px 10px;border-radius:999px;background:#fff4e5;color:#9a6a13;font-size:11px;font-weight:700;letter-spacing:.2px;animation:pending-pulse 2.2s ease-in-out infinite}
@keyframes pending-pulse{0%,100%{opacity:1}50%{opacity:.6}}
.row-pending{background:#fffaf2}

.approval-list{display:flex;flex-direction:column;gap:16px}
.approval-card{transition:transform .25s cubic-bezier(.2,.7,.2,1),box-shadow .25s ease}
.approval-card:hover{box-shadow:0 16px 40px var(--navy-glow)}
.approval-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
.approval-actions{display:flex;gap:10px;margin-top:16px}
.approval-actions form{display:contents}
.alert{background:#fff1f0;border:1px solid #f3c9c2;color:#9a3521;border-radius:14px;padding:12px 16px;margin:0 0 18px}
.success-msg{background:#eaf7ec;border:1px solid #c8e6cc;color:#256b30;border-radius:14px;padding:12px 16px;margin:0 0 18px}
.empty{background:#fff;border:1px solid var(--border);border-radius:24px;padding:60px 24px;text-align:center}
.empty.large{padding:96px 24px}
.product-detail{display:grid;grid-template-columns:1.08fr .92fr;gap:54px;align-items:center}
.detail-image{aspect-ratio:1/1;max-height:620px;background:#fff;border:1px solid var(--border);border-radius:28px;overflow:hidden}
.detail-image img{width:100%;height:100%;object-fit:cover;transition:opacity .2s ease}
.gallery-thumbs{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.gallery-thumb{width:64px;height:64px;padding:0;border:2px solid transparent;border-radius:14px;overflow:hidden;cursor:pointer;background:#fff;flex:none;transition:border-color .2s ease,transform .2s ease}
.gallery-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.gallery-thumb:hover{transform:translateY(-2px)}
.gallery-thumb.is-active{border-color:var(--brand-bright)}
.detail-info h1{font-size:clamp(30px,5vw,52px);font-weight:700;line-height:1.08;letter-spacing:-1.2px;margin:10px 0 16px}
.lead{color:var(--ink-soft);font-size:17px;line-height:1.7}
.detail-price{display:flex;gap:10px;align-items:baseline;margin:24px 0}
.detail-price span{font-size:30px;font-weight:700;letter-spacing:-.5px;color:var(--brand)}
.detail-price del{color:#999}
.stock{font-weight:700}
.buy-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.buy-row input{width:85px;height:44px;border:1px solid var(--border);border-radius:12px;padding:0 12px;background:#fff}
.buy-row button{position:relative}
.product-qty-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.product-qty-stepper{max-width:220px}
.reviews{margin-top:55px}
.reviews h2{letter-spacing:-.6px;font-weight:700}
.review{background:#fff;border:1px solid var(--border);border-radius:18px;padding:18px;margin:12px 0}
.review p{color:var(--ink-soft);line-height:1.6}
.cart-layout{display:grid;grid-template-columns:1fr 340px;gap:24px}
.cart-list{background:#fff;border:1px solid var(--border);border-radius:22px;padding:8px}
.cart-item{display:flex;flex-wrap:wrap;gap:16px;padding:16px;border-bottom:1px solid #eef1f4}
.cart-item:last-child{border-bottom:0}
.cart-item img{width:92px;height:92px;object-fit:cover;border-radius:16px;background:#eef1f4}
.cart-main{flex:1;min-width:160px;display:flex;flex-direction:column;gap:6px}
.cart-main .title{font-weight:700;font-size:17px}
.cart-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:auto}
.cart-bottom input{width:62px;height:36px;border:1px solid var(--border);border-radius:10px;padding:0 8px}
.cart-bottom strong{margin-left:auto;color:var(--brand)}
.link-btn{border:0;background:none;color:var(--muted);cursor:pointer;padding:4px 0}
.link-btn:hover{color:var(--coral)}
.summary{background:#fff;border:1px solid var(--border);border-radius:22px;padding:22px;height:max-content}
.summary h2{margin-top:0;font-weight:700}
.summary>div{display:flex;justify-content:space-between;gap:14px;margin:13px 0}
.summary .grand{font-size:21px;color:var(--brand);font-weight:700}
.summary hr{border:0;border-top:1px solid #eef1f4;margin:18px 0}
.coupon{display:flex;gap:8px;margin-bottom:18px}
.coupon input{flex:1;min-width:0;height:40px;border:1px solid var(--border);border-radius:999px;padding:0 14px}
.coupon-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:-8px 0 18px}
.coupon-chip{border:1px dashed var(--brand);background:#fff;color:var(--brand);border-radius:999px;padding:5px 12px;font-size:12px;font-weight:700;cursor:pointer;transition:background .2s ease,color .2s ease}
.coupon-chip:hover{background:var(--brand);color:#fff}
.checkout-grid{display:grid;grid-template-columns:1fr 320px;gap:24px}
.form-card{background:#fff;border:1px solid var(--border);border-radius:22px;padding:24px}
.form-card h2{letter-spacing:-.4px;font-weight:700}
.form-card>input,.form-card .two input,.form-card .two select{width:100%;height:44px;border:1px solid var(--border);border-radius:12px;padding:0 12px;margin:6px 0;background:#fff}
.form-card>textarea{border:1px solid var(--border);border-radius:12px;padding:10px 12px;margin:6px 0;background:#fff;font-size:13px;line-height:1.5}
.form-card>div{margin:10px 0}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.payment-option{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:var(--bg);border:1px solid var(--border);border-radius:14px;padding:14px;margin:9px 0;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}
.payment-option span{margin-left:auto;color:var(--muted);font-size:12px}
.payment-option input[type="radio"]{accent-color:var(--accent-orange)}
.payment-option:has(input:checked){background:#fff;border-color:var(--accent-orange);box-shadow:0 0 0 3px rgba(245,129,31,.16)}
.disabled{opacity:.55}
.order-card{display:grid;grid-template-columns:1fr auto auto auto;gap:20px;align-items:center;background:#fff;border:1px solid var(--border);border-radius:18px;padding:18px;margin:10px 0}
.status{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:999px;background:#eef1f4;color:var(--ink-soft);font-size:11px;font-weight:700}
.status.status-up{background:rgba(76,175,80,.14);color:var(--brand-dark)}
.status.status-down{background:rgba(225,75,61,.14);color:#e14b3d}

/* Usage meter (memory/CPU) on the Application health page - a thin
   filled pill rather than a number alone, so a superadmin scanning the
   page catches "nearly full" at a glance. */
.meter{height:8px;border-radius:999px;background:var(--border);overflow:hidden;margin-top:8px}
.meter>span{display:block;height:100%;border-radius:999px;background:var(--brand-bright);transition:width .3s ease}
.meter.meter-warn>span{background:var(--accent-orange)}
.meter.meter-crit>span{background:#e14b3d}
.timeline{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:24px 0 50px}
.timeline>div{height:8px;border-radius:999px;background:#dfe4ea;position:relative}
.timeline>div.done{background:var(--brand-bright)}
.timeline>div b{position:absolute;top:16px;left:0;font-size:11px;color:var(--muted);font-weight:400}
.order-summary{max-width:420px;margin:24px 0 0 auto}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:30px;background:radial-gradient(circle at top,#fff,#eef4ee)}
.auth-card{width:min(440px,100%);background:#fff;border:1px solid var(--border);border-radius:28px;padding:34px;box-shadow:0 24px 60px var(--navy-glow)}
.auth-card h1{font-size:clamp(26px,5vw,34px);font-weight:700;letter-spacing:-.8px;margin:18px 0 8px}
.auth-subtitle{color:var(--muted)}
.auth-card form input{width:100%;height:46px;border:1px solid var(--border);border-radius:12px;padding:0 12px;margin:7px 0}
.auth-card form button{width:100%;height:46px;margin-top:8px;border:0;border-radius:999px;background:var(--brand-bright);color:#fff;font-weight:700;cursor:pointer;transition:background .2s ease}
.auth-card form button:hover{background:var(--brand-dark)}
.password-field{position:relative}
.password-field input{padding-right:44px!important}
.auth-card form .toggle-password{position:absolute;top:50%;right:6px;transform:translateY(-50%);width:36px;height:36px;margin:0;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;border-radius:10px;font-weight:400}
.auth-card form .toggle-password:hover{color:var(--brand);background:var(--bg)}
.toggle-password .icon-eye-off{display:none}
.toggle-password.is-visible .icon-eye{display:none}
.toggle-password.is-visible .icon-eye-off{display:block}
.auth-links{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:18px;font-size:13px;color:var(--muted)}
.auth-divider{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:1px}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.dev-link{background:var(--bg);border:1px solid var(--border);border-radius:14px;padding:12px;margin:14px 0;word-break:break-word;font-size:12px}
.center{text-align:center}
.center-card{text-align:center}
.success-icon{width:72px;height:72px;border-radius:50%;background:var(--brand-bright);color:#fff;display:grid;place-items:center;font-size:32px;margin:0 auto 18px}
.admin-shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}
.admin-side{background:var(--navy);color:#fff;padding:24px 18px;display:flex;flex-direction:column;gap:6px}
.admin-side a{color:#c3ccd9;padding:11px 14px;border-radius:12px}
.admin-side a:hover,.admin-side a.active{background:rgba(255,255,255,.08);color:var(--brand-bright)}
/* The one deliberate crossing point between CartX's own admin and CartX
   Business - visually set apart (bordered box, dimmer text) from the
   section's own feature links below it, so the two apps never look like
   one merged menu. */
.admin-side-switcher{border:1px solid rgba(255,255,255,.14);border-radius:12px;padding:6px;margin-bottom:14px;display:flex;flex-direction:column;gap:2px}
.admin-side-switcher a{font-size:12.5px;color:#8f9bad;padding:8px 10px}
.admin-side-switcher a:hover{color:var(--brand-bright);background:rgba(255,255,255,.06)}
.admin-profile{margin:0;margin-top:auto;padding-top:12px;border-top:1px solid rgba(255,255,255,.1);position:relative}
.admin-profile-trigger{list-style:none;display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:12px;cursor:pointer;color:#fff}
.admin-profile-trigger::-webkit-details-marker{display:none}
.admin-profile-trigger:hover{background:rgba(255,255,255,.08)}
.admin-avatar{width:28px;height:28px;flex:none;border-radius:50%;background:var(--brand-bright);color:#fff;display:grid;place-items:center;font-size:13px;font-weight:600}
.admin-profile-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.admin-profile-menu{position:absolute;bottom:calc(100% + 6px);left:0;right:0;background:var(--navy-2);border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:6px;box-shadow:0 8px 24px rgba(0,0,0,.35)}
.admin-profile-menu form{margin:0;padding:0;border:0}
.admin-profile-menu .logout-button{display:block;width:100%;text-align:left;font:inherit;color:#c3ccd9;padding:9px 12px;border-radius:10px;background:none;border:0;cursor:pointer}
.admin-profile-menu .logout-button:hover{background:rgba(255,255,255,.08);color:#fff}
.admin-main{padding:38px;max-width:1440px;width:100%;min-width:0}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0}
.stats>a,.stats>div{display:block;background:#fff;border:1px solid var(--border);border-radius:18px;padding:20px}
.stats>a{cursor:pointer;transition:border-color .2s ease}
.stats>a:hover{border-color:var(--brand-bright)}
.stats span{display:block;color:var(--muted);font-size:12px}
.stats b{display:block;font-size:clamp(24px,4vw,34px);margin-top:4px;color:var(--navy)}
/* Same elevated-card language as the storefront's .product-card (soft
   resting shadow) - applied here once, globally, so every admin/POS/
   business screen shares one look rather than the POS pages alone. */
.panel{background:#fff;border:1px solid var(--border);border-radius:20px;padding:20px;margin:16px 0;overflow:auto;box-shadow:0 4px 16px rgba(19,41,75,.06)}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:12px;border-bottom:1px solid #eef1f4;text-align:left;white-space:nowrap}
.table th{color:var(--muted);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.4px}
.table tr{transition:background .15s ease}
.table tbody tr:hover{background:var(--bg)}
.admin-form{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.admin-form input,.admin-form select,.admin-form textarea{width:100%;padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:#fff;outline:none;transition:border-color .2s ease,box-shadow .2s ease}
.admin-form input:focus,.admin-form select:focus,.admin-form textarea:focus{border-color:var(--accent-orange);box-shadow:0 0 0 3px rgba(245,129,31,.16)}
.admin-form textarea{min-height:90px;grid-column:1/-1}
.small-input{width:80px;padding:7px;border:1px solid var(--border);border-radius:10px}
.order-status-select{padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:#fff}
.danger-text{border:0;background:none;color:var(--coral);cursor:pointer}
.danger-text:hover{text-decoration:underline}

@media(max-width:1000px){
 .product-detail{grid-template-columns:1fr;gap:28px}
 .cart-layout,.checkout-grid{grid-template-columns:1fr}
 .footer-main{grid-template-columns:repeat(2,1fr)}
 .admin-shell{grid-template-columns:1fr}
 .admin-side{flex-direction:row;flex-wrap:wrap;align-items:center;padding:14px 18px}
 .admin-profile{margin-top:0;margin-left:auto;padding-top:0;border-top:0}
 .stats{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){
 .container{width:calc(100% - 24px);padding:28px 0 60px}
 .nav-inner{width:calc(100% - 24px);flex-wrap:wrap;padding:12px 0}
 .nav-search{order:3;max-width:none;width:100%}
 .nav-links{width:100%;justify-content:space-between;gap:10px}
 .hero-section{width:calc(100% - 24px);padding:38px 24px;min-height:auto;border-radius:26px 26px 26px 6px}
 .filter-bar{flex-direction:column;align-items:stretch}
 .filter-form{width:100%;flex-direction:column}
 .filter-form select,.filter-button{width:100%}
 .order-card{grid-template-columns:1fr 1fr}
 .footer-main{grid-template-columns:1fr}
 .admin-main{padding:22px}
 .form-card,.auth-card,.summary{padding:20px}
 .admin-form{grid-template-columns:1fr}
 .stats{grid-template-columns:1fr}
}
@media(max-width:560px){
 .two{grid-template-columns:1fr}
 .cart-item img{width:76px;height:76px}
 .timeline{grid-template-columns:repeat(5,minmax(46px,1fr));gap:6px;overflow-x:auto;padding-bottom:14px}
 .timeline>div b{font-size:8.5px;white-space:nowrap}
 .footer-bottom{flex-direction:column}
 .order-card{grid-template-columns:1fr;text-align:left}
 .auth-page{padding:16px}
 .auth-card{padding:26px 22px}
}



/* =========================================================
   TOASTS (welcome-back message, sign-in prompts, etc.) + CONFETTI
   ========================================================= */

.welcome-toast,.toast{position:fixed;top:86px;left:50%;transform:translateX(-50%);z-index:5000;background:#fff;border:1px solid var(--border);border-radius:999px;padding:12px 22px;box-shadow:0 18px 40px var(--navy-glow);display:flex;align-items:center;gap:10px;font-weight:600;font-size:14px;color:var(--ink);animation:welcomeIn .5s cubic-bezier(.16,1,.3,1) both}
.welcome-toast.is-leaving,.toast.is-leaving{animation:welcomeOut .45s ease forwards}
.welcome-icon,.toast-icon{font-size:18px}
.toast a{color:var(--brand);font-weight:700;text-decoration:underline}

@keyframes welcomeIn{
    from{opacity:0;transform:translate(-50%,-14px)}
    to{opacity:1;transform:translate(-50%,0)}
}
@keyframes welcomeOut{
    to{opacity:0;transform:translate(-50%,-14px)}
}

.confetti-piece{position:fixed;top:-24px;width:8px;height:14px;z-index:4999;pointer-events:none;border-radius:2px;animation-name:confettiFall;animation-timing-function:cubic-bezier(.4,0,.6,1);animation-fill-mode:forwards}

@keyframes confettiFall{
    0%{top:-24px;transform:translateX(0) rotate(0deg);opacity:1}
    50%{transform:translateX(24px) rotate(360deg)}
    100%{top:110vh;transform:translateX(-14px) rotate(720deg);opacity:.9}
}

@media (max-width:600px){
    .welcome-toast,.toast{top:72px;font-size:13px;padding:10px 18px;width:calc(100% - 32px);justify-content:center}
}


/* ---- Storefront product badges ----
   Stacked opposite the discount badge so the two never collide. Muted
   solid fills rather than bright gradients: on a grid of many cards the
   badge should read as information, not decoration. */
.badge-stack {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    z-index: 2;
    pointer-events: none;
}

.tag-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .85);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}

.tag-bestseller { background: #b4690e; }
.tag-new        { background: var(--brand-dark); }
.tag-low        { background: #b3382a; }

/* ---- Hero brand slot ----
   Sits opposite the headline in the hero's flex row. margin-left:auto is
   what pushes it to the right edge; z-index clears the banner overlay
   that .has-banner-image draws over the whole section. */
.hero-logo {
    position: relative;
    z-index: 2;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 300px;
}

/* A soft pulsing halo behind the logo, independent of .hero-glow (which the
   neumorphism theme hides outright) - keeps the flat soft-UI hero from
   sitting completely still once the entrance fade finishes. */
.hero-logo::before {
    content: "";
    position: absolute;
    inset: -34px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 175, 80, .22), transparent 70%);
    animation: heroLogoGlow 5s ease-in-out infinite;
}

.hero-logo-img {
    max-width: 260px;
    max-height: 180px;
    object-fit: contain;
    animation: heroLogoFloat 5s ease-in-out infinite;
}

@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes heroLogoGlow {
    0%, 100% { opacity: .45; scale: 1; }
    50%      { opacity: .9;  scale: 1.1; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-logo-img,
    .hero-logo::before {
        animation: none;
    }
}

.hero-logo-admin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-logo-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px dashed rgba(255, 255, 255, .5);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.hero-logo-upload:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .12);
}

/* The input is driven by the label; submitting on change means the
   superadmin picks a file and it uploads, with no second click. */
.hero-logo-upload input[type="file"] {
    display: none;
}

.hero-logo-remove {
    border: 0;
    background: none;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.hero-logo-remove:hover {
    color: #fff;
}

@media (max-width: 900px) {
    /* Stacked hero on narrow screens: the brand slot would otherwise
       squeeze the headline into a couple of words per line. */
    .hero-logo {
        display: none;
    }
}

/* Shared disabled state for every .btn. Without this a disabled button
   looks identical to an active one, which reads as "click me" when it
   isn't - the bulk-delete action starts disabled until rows are ticked. */
.btn:disabled,
.btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* =====================================================================
   NAV ICONS
   One hue per destination, so a section is recognisable at a glance
   before the label is even read. Colour is carried by the icon alone -
   labels stay the existing ink/white, which keeps the chrome calm even
   with ten different hues on screen.
   ===================================================================== */

.admin-side a,
.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Sidebar entries are full-width rows rather than inline chips. */
.admin-side a {
    display: flex;
}

.nav-ico {
    flex: none;
    width: 18px;
    height: 18px;
    /* Icons keep their colour on hover/active while the label changes,
       so the row still reads as one element. */
    transition: transform .2s ease;
}

.admin-side a:hover .nav-ico,
.nav-links a:hover .nav-ico {
    transform: translateY(-1px) scale(1.08);
}

.ico-dashboard  { color: #4c8dff; }
.ico-products   { color: #9b6dff; }
.ico-orders     { color: #f5811f; }
.ico-returns    { color: #ef5b3d; }
.ico-customers  { color: #22b8a6; }
.ico-coupons    { color: #e8489b; }
.ico-shops      { color: #4caf50; }
.ico-settings   { color: #8c98a8; }
.ico-approvals  { color: #f0b429; }
.ico-health     { color: #ef5b3d; }
.ico-store      { color: #5ac8fa; }
.ico-cart       { color: #4caf50; }
.ico-wishlist   { color: #ff5f7e; }
.ico-revenue    { color: #16a34a; }
.ico-services   { color: #a855f7; }

/* Stat tiles get the same hue as their sidebar counterpart, so Orders is
   orange in both places rather than arbitrarily coloured twice. */
/* Two classes deep so this beats the existing `.stats span{display:block}`
   rule, which would otherwise flatten the icon+label row. */
.stats .stat-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats .stat-head .nav-ico {
    width: 16px;
    height: 16px;
}

/* ---- Profile dropdown items ----
   Matches .logout-button's box so every row in the menu lines up, and
   widens the menu since it now holds labels rather than one word. */
.profile-dropdown { min-width: 210px; }

.profile-dropdown-head {
    padding: 8px 12px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.profile-dropdown-name {
    display: block;
    color: #fff;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    color: #c3ccd9;
    font-size: 14px;
}

.profile-dropdown-item:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

/* ---- Address book + checkout address picker ---- */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.address-card { margin: 0; }

.address-card.is-default {
    border-color: var(--brand-bright);
}

.address-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.address-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 14px;
}

.address-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.address-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafbfc;
}

.address-picker-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* The picked address needs to stay visibly picked - without this the
   form fills in but nothing shows which entry it came from. */
.address-option.is-selected {
    border-color: var(--brand-bright);
    color: var(--brand-dark);
}

/* ---- Search typeahead ----
   Anchored to .nav-search, which needs position:relative for this to hang
   off it correctly. */
.nav-search { position: relative; }

.search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(19, 41, 75, .18);
    max-height: 60vh;
    overflow-y: auto;
}

.search-suggest.is-open { display: block; }

.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--ink);
}

.search-suggest-item:hover,
.search-suggest-item.is-active {
    background: #f2f6f3;
}

.search-suggest-item img {
    width: 38px;
    height: 38px;
    flex: none;
    object-fit: contain;
    border-radius: 8px;
    background: #f5f7f9;
}

.search-suggest-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.search-suggest-name {
    font-size: 13px;
    /* Long product names must not push the price off the row. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-suggest-meta {
    font-size: 11px;
    color: var(--muted);
}

.search-suggest-price {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---- Product detail action cluster ----
   .cart-control (add-to-cart/qty-stepper) and the wishlist button used to
   be bare siblings with no shared spacing rule, so on a narrow viewport -
   where .buy-row's own flex-wrap kicks in - they visually ran together.
   One column with a consistent gap keeps every row (and every wrap) evenly spaced. */
.product-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 20px;
}

.product-actions .cart-control {
    margin-top: 0;
}

.wishlist-form {
    margin: 0;
}

/* ---- AI shopping assistant widget ----
   Fixed bottom-right on every page (wired from the shared "scene"
   fragment), well clear of the toast/page-transition layers. */
.ai-assistant {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 4500;
}

.ai-assistant-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--brand-dark, #2c7233);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}

.ai-assistant-toggle:hover {
    transform: scale(1.06);
}

.ai-assistant-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: 320px;
    max-width: calc(100vw - 44px);
    height: 420px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-assistant-panel.is-hidden {
    display: none;
}

.ai-assistant-head {
    background: var(--brand-dark, #2c7233);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 13px;
}

.ai-assistant-head button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.ai-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f5f7fb;
}

.ai-msg {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.4;
}

.ai-msg-bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e0e5ee;
    color: #222;
    border-bottom-left-radius: 4px;
}

.ai-msg-user {
    align-self: flex-end;
    background: var(--brand-dark, #2c7233);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-msg.is-thinking {
    opacity: .6;
    font-style: italic;
}

.ai-assistant-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e0e5ee;
    background: #fff;
}

.ai-assistant-form input[type="text"] {
    flex: 1;
    border: 1px solid #d8deea;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12.5px;
    outline: none;
}

.ai-assistant-form input[type="text"]:focus {
    border-color: var(--brand-dark, #2c7233);
}

@media (max-width: 480px) {
    .ai-assistant-panel {
        width: calc(100vw - 32px);
        right: -6px;
    }
}

/* ---- Services hub ----
   Same card language as .product-card, but content is a name/description/
   status rather than a price row - these aren't purchasable products. */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.service-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e4e8f0);
    border-radius: 18px;
    padding: 28px 22px;
    text-align: center;
    transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .1);
}

.service-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
}

.service-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.service-card p {
    margin: 0;
    color: var(--muted, #6b7686);
    font-size: 13px;
    line-height: 1.5;
}

.service-status {
    display: inline-block;
    margin-top: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff6ea;
    color: #b4690e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.service-card-more {
    border-style: dashed;
    opacity: .75;
}

/* ---- Navbar weather + local-time widget ----
   Hidden until geolocation actually resolves (see nav-weather.js) -
   never reserves layout space or shows a loading flicker. */
.nav-weather {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-weather.is-hidden {
    display: none;
}

.nav-weather-icon {
    font-size: 14px;
    line-height: 1;
}

.nav-weather-sep {
    opacity: .5;
}

.nav-weather-place {
    opacity: .75;
    font-weight: 500;
}

.nav-weather-place:not(:empty)::before {
    content: "· ";
    opacity: .5;
}

@media (max-width: 900px) {
    .nav-weather {
        display: none !important;
    }
}
