:root {
    --eth-teal: #0E7C8B;
    --eth-teal-deep: #0A5A66;
    --eth-orange: #E2641E;
    --eth-page: #EEF2F6;
    --eth-card: #FFFFFF;
    --eth-text: #1E2A32;
    --eth-muted: #64748B;
    --eth-border: #D6DEEA;
}

html, body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    /* A soft tinted page background reads more modern than a flat fill. */
    background-color: var(--eth-page);
    background-image:
        radial-gradient(1200px 600px at 100% -10%, rgba(14, 124, 139, 0.06), transparent 60%),
        radial-gradient(900px 500px at -10% 0%, rgba(226, 100, 30, 0.05), transparent 55%);
    background-attachment: fixed;
    color: var(--eth-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* dvh tracks the *visible* viewport, so the page never extends behind the
       mobile browser's bottom toolbar (which used to hide the last button). */
    min-height: 100dvh;
}

main {
    flex: 1 0 auto;
}

.eth-main {
    /* Extra room at the bottom + the device safe-area inset so the final action
       button is never tucked under the mobile browser chrome / home indicator. */
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 575.98px) {
    .eth-main {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
}

/* ---------- Brand / Navbar ---------- */
.eth-navbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(214, 222, 234, 0.7);
    box-shadow: 0 2px 16px rgba(14, 124, 139, 0.06);
    padding-top: env(safe-area-inset-top, 0px);
}

.eth-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--eth-teal) !important;
    letter-spacing: -0.5px;
}

.eth-brand .dot {
    color: var(--eth-orange);
}

/* ---------- Logo wordmark (recreation of the ethniv logo) ---------- */
.eth-logo {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    line-height: 1;
}
.eth-logo-img { height: 32px; width: auto; display: block; }
.eth-logo-lg .eth-logo-img { height: 54px; }
.eth-logo-word {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: -0.5px;
    line-height: 1;
    white-space: nowrap;
}
.eth-logo-word .lg-t { color: var(--eth-teal); }
.eth-logo-word .lg-o { color: var(--eth-orange); }
.eth-logo-word .lg-i {
    position: relative;
    display: inline-block;
}
/* Leaf accent sits where the i's dot would be. */
.eth-logo-word .lg-leaf {
    position: absolute;
    left: 50%;
    top: -0.34em;
    width: 0.46em;
    height: 0.46em;
    transform: translateX(-46%) rotate(40deg);
    color: var(--eth-teal);
}
/* Large variant for the login screen. */
.eth-logo-lg .eth-logo-word { font-size: 2.6rem; }

.eth-brand .brand-sub {
    font-size: .7rem;
    font-weight: 600;
    color: var(--eth-muted);
    margin-left: .35rem;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.eth-navbar .nav-link {
    color: var(--eth-text);
    font-weight: 600;
    border-radius: 10px;
    padding: .45rem .85rem !important;
    margin: 0 .1rem;
}

.eth-navbar .nav-link:hover {
    color: var(--eth-teal);
    background: rgba(14, 124, 139, 0.07);
}

.eth-navbar .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--eth-teal), var(--eth-teal-deep));
    box-shadow: 0 4px 12px rgba(14, 124, 139, 0.25);
}

.eth-user {
    font-size: .85rem;
    color: var(--eth-muted);
    font-weight: 600;
}

/* ---------- Buttons ---------- */
.eth-btn,
.btn-eth {
    background: linear-gradient(135deg, var(--eth-teal), var(--eth-teal-deep));
    border: 1px solid var(--eth-teal-deep);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: .65rem 1.25rem;
    box-shadow: 0 6px 16px rgba(14, 124, 139, 0.22);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.eth-btn:hover,
.btn-eth:hover {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(14, 124, 139, 0.28);
}

.eth-btn:active,
.btn-eth:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(14, 124, 139, 0.2);
}

.btn-eth-orange {
    background: linear-gradient(135deg, var(--eth-orange), #c9531a);
    border: 1px solid #c9531a;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(226, 100, 30, 0.22);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn-eth-orange:hover {
    filter: brightness(1.05);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(226, 100, 30, 0.28);
}

.eth-btn-outline {
    background: #fff;
    border: 1.5px solid var(--eth-teal);
    color: var(--eth-teal);
    font-weight: 700;
    border-radius: 12px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.eth-btn-outline:hover {
    background: var(--eth-teal);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(14, 124, 139, 0.2);
}

/* Selected state for btn-check toggles (Yes/No, variant value chips):
   the chosen option fills with the brand colour, unchosen stay outlined. */
.btn-check:checked + .eth-btn-outline,
.btn-check:active + .eth-btn-outline {
    background: var(--eth-teal);
    border-color: var(--eth-teal);
    color: #fff;
}

.btn-check:focus-visible + .eth-btn-outline {
    box-shadow: 0 0 0 .2rem rgba(13, 110, 110, .25);
}

.btn-block-eth {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

/* ---------- Cards ---------- */
.eth-card {
    background: var(--eth-card);
    border: 1px solid var(--eth-border);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(30, 42, 50, 0.04), 0 8px 24px rgba(30, 42, 50, 0.06);
}

/* Product/draft list cards sit inside a .row grid — give those a gentle lift so
   they feel interactive, without disturbing the static form cards. */
.row > [class*="col"] > .eth-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.row > [class*="col"] > .eth-card:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 124, 139, 0.35);
    box-shadow: 0 14px 30px rgba(14, 124, 139, 0.12);
}

.eth-card .card-section-title {
    font-weight: 700;
    color: var(--eth-text);
}

.eth-card .card-section-sub {
    font-size: .85rem;
    color: var(--eth-muted);
}

.eth-hero {
    background: linear-gradient(135deg, var(--eth-teal) 0%, var(--eth-teal-deep) 100%);
    color: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(10, 90, 102, 0.25);
}

.eth-hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: .7rem;
    font-weight: 700;
    opacity: .85;
}

.section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(14, 124, 139, 0.1);
    color: var(--eth-teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex: 0 0 auto;
}

/* ---------- Dashboard ---------- */
.eth-hero-compact {
    padding: 1.15rem 1.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}
/* subtle decorative glow in the hero corner */
.eth-hero-compact::after {
    content: "";
    position: absolute; top: -40%; right: -10%;
    width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
    pointer-events: none;
}
.eth-hero-compact h3 { font-size: 1.4rem; }
.hero-cta { position: relative; z-index: 1; white-space: nowrap; }

/* compact, colour-coded stat tiles */
.stat-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    height: 100%;
    background: #fff;
    border: 1px solid var(--eth-border);
    border-radius: 14px;
    padding: .8rem .9rem;
    box-shadow: 0 1px 2px rgba(30, 42, 50, 0.04), 0 6px 18px rgba(30, 42, 50, 0.05);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(30, 42, 50, 0.09);
}
.stat-card .stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex: 0 0 auto;
}
.stat-link { text-decoration: none; color: inherit; }
.stat-link:hover { color: inherit; }
.stat-card .stat-arrow {
    margin-left: auto;
    color: var(--eth-muted);
    opacity: 0;
    transition: opacity .15s ease, transform .15s ease;
}
.stat-link:hover .stat-arrow { opacity: 1; transform: translateX(2px); }
.stat-num { font-size: 1.6rem; font-weight: 800; line-height: 1.05; color: var(--eth-text); }
.stat-num-sm { font-size: 1.05rem; }
.stat-label { font-size: .76rem; font-weight: 600; color: var(--eth-muted); }

.stat-live   .stat-icon { background: rgba(22, 163, 74, 0.12);  color: #16A34A; }
.stat-review .stat-icon { background: rgba(217, 119, 6, 0.12);  color: #D97706; }
.stat-draft  .stat-icon { background: rgba(234, 88, 12, 0.12);  color: #EA580C; }
.stat-status .stat-icon { background: rgba(14, 124, 139, 0.12); color: var(--eth-teal); }

/* quick-action cards */
.action-card {
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 124, 139, 0.35);
    box-shadow: 0 12px 26px rgba(14, 124, 139, 0.12);
    color: inherit;
}
.action-card .action-arrow { transition: transform .15s ease; }
.action-card:hover .action-arrow { transform: translateX(3px); color: var(--eth-teal) !important; }

.dash-section-title {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--eth-muted);
    margin: 0;
}

/* Getting-started checklist */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
    display: flex;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--eth-border);
}
.checklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.checklist li:first-child { padding-top: 0; }
.checklist .check {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    background: #f1f5f9;
    color: var(--eth-muted);
    border: 1px solid var(--eth-border);
}
.checklist li.done .check {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.4);
    color: #16A34A;
}
.checklist li.done .fw-semibold { color: var(--eth-muted); }
.checklist-link {
    display: inline-block;
    margin-top: .35rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--eth-teal);
    text-decoration: none;
}
.checklist-link:hover { color: var(--eth-teal-deep); }

/* Fill the viewport on desktop so the dashboard doesn't trail off into blank space. */
@media (min-width: 992px) {
    .dash-wrap {
        display: flex;
        flex-direction: column;
        min-height: calc(100dvh - 200px);
    }
    .dash-lower { flex: 1 1 auto; }
    .dash-lower .action-card { flex: 1 1 0; }
}

/* ---------- Forms ---------- */
.form-label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--eth-text);
}

.req::after {
    content: " *";
    color: var(--eth-orange);
    font-weight: 700;
}

/* Info tooltip icon next to field labels. */
.info-i {
    color: var(--eth-teal);
    cursor: help;
    font-size: .9rem;
    margin-left: .15rem;
    vertical-align: -1px;
}
.info-i:hover { color: var(--eth-teal-deep); }

.form-control, .form-select {
    border-radius: 12px;
    border: 1px solid var(--eth-border);
    padding: .6rem .85rem;
    background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:hover, .form-select:hover {
    border-color: #b9c4d6;
}

.form-control:focus, .form-select:focus {
    border-color: var(--eth-teal);
    box-shadow: 0 0 0 .22rem rgba(14, 124, 139, 0.16);
}

.input-group-text {
    background: #f4f7fa;
    border-color: var(--eth-border);
    color: var(--eth-muted);
    border-radius: 12px;
}

/* ---------- Badges / statuses ---------- */
.eth-badge-draft { background: #FCE9D6; color: #B25318; }
.eth-badge-review { background: #FFF3CD; color: #8A6D00; }
.eth-badge-live { background: #D7F5E3; color: #1B7A48; }

.badge.eth-badge-draft, .badge.eth-badge-review, .badge.eth-badge-live {
    font-weight: 700;
    border-radius: 8px;
}

/* ---------- Loading overlay ---------- */
.eth-overlay {
    position: fixed;
    inset: 0;
    /* Below the sticky navbar (z-index 1020) so the nav stays crisp & visible,
       above page content so the form area is clearly dimmed while working. */
    z-index: 1010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(238, 242, 246, 0.5);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    animation: ethOverlayIn .15s ease;
}
.eth-overlay.show { display: flex; }
.eth-overlay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
    background: #fff;
    border: 1px solid var(--eth-border);
    border-radius: 18px;
    padding: 1.6rem 2rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    min-width: 180px;
}
.eth-overlay-card .spinner-border {
    width: 2.4rem;
    height: 2.4rem;
    border-width: .28rem;
    color: var(--eth-teal);
}
.eth-overlay-text {
    font-weight: 700;
    font-size: .92rem;
    color: var(--eth-text);
    letter-spacing: .2px;
}
@keyframes ethOverlayIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Gallery image with delete ---------- */
.more-img-wrap { position: relative; display: inline-block; line-height: 0; }
.more-img-del {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 26px;
    height: 26px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: .72rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: background .15s ease, transform .15s ease;
}
.more-img-del:hover { background: #b91c1c; transform: scale(1.08); }
.more-img-del:disabled { opacity: .5; cursor: default; }

/* ---------- Image zoom lightbox ---------- */
img[data-zoom] { cursor: zoom-in; }
.eth-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.85);
    animation: ethOverlayIn .15s ease;
}
.eth-lightbox.show { display: flex; }
.eth-lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    cursor: default;
}
.eth-lightbox-close {
    position: absolute;
    top: calc(1rem + env(safe-area-inset-top, 0px));
    right: 1.25rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.eth-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }

/* ---------- Current-stock highlight ---------- */
.eth-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(14, 124, 139, 0.12);
    color: var(--eth-teal-deep);
    border: 1px solid rgba(14, 124, 139, 0.25);
    font-weight: 700;
    font-size: .85rem;
    border-radius: 9px;
    padding: .25rem .6rem;
    line-height: 1.2;
}
.eth-stock-pill .num { font-size: 1.05rem; font-weight: 800; }

/* ---------- Listing step progress (S1 · S2 · S3) ---------- */
.step-prog { margin-bottom: .75rem; }
.step-prog .step-row { display: flex; gap: 6px; }
.step-chip {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 0;
    font-size: .72rem;
    font-weight: 700;
    border-radius: 7px;
    border: 1px solid var(--eth-border);
    background: #F1F5F9;
    color: var(--eth-muted);
}
.step-cap {
    margin-top: 5px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--acc, var(--eth-muted));
}
/* accent per product status */
.acc-live   { --acc: #16A34A; --acc-rgb: 22, 163, 74; }
.acc-review { --acc: #D97706; --acc-rgb: 217, 119, 6; }
.acc-draft  { --acc: #EA580C; --acc-rgb: 234, 88, 12; }

.step-chip.done {
    background: rgba(var(--acc-rgb), 0.14);
    border-color: rgba(var(--acc-rgb), 0.40);
    color: var(--acc);
}
.step-chip.current {
    background: rgba(var(--acc-rgb), 0.06);
    border-color: rgba(var(--acc-rgb), 0.50);
    border-width: 1.5px;
    color: var(--acc);
}

.live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22c55e; display: inline-block;
    animation: blink 1.2s infinite;
}
@keyframes blink { 0%,100% {opacity:1;} 50% {opacity:.3;} }

/* ---------- Auth ---------- */
.auth-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--eth-teal) 0%, var(--eth-teal-deep) 100%);
    padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.auth-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    width: 100%;
    max-width: 430px;
    padding: 2.25rem;
}

.otp-box {
    background: rgba(14, 124, 139, 0.08);
    border: 1px dashed var(--eth-teal);
    border-radius: 12px;
    padding: .75rem 1rem;
    color: var(--eth-teal-deep);
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
}

/* ---------- Stepper ---------- */
.stepper {
    display: flex;
    align-items: center;
    gap: .25rem;
    overflow-x: auto;
    padding: .5rem 0 1rem;
}

.stepper .step {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.stepper .bubble {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
    background: #fff; border: 2px solid var(--eth-border); color: var(--eth-muted);
}

.stepper .step.done .bubble { background: var(--eth-teal); border-color: var(--eth-teal); color: #fff; }
.stepper .step.current .bubble { background: #fff; border-color: var(--eth-teal); color: var(--eth-teal); box-shadow: 0 0 0 4px rgba(14,124,139,.15); }
.stepper .step .label { font-size: .8rem; font-weight: 600; color: var(--eth-muted); white-space: nowrap; }
.stepper .step.current .label, .stepper .step.done .label { color: var(--eth-text); }
.stepper .bar { width: 28px; height: 2px; background: var(--eth-border); flex: 0 0 auto; }
.stepper .bar.done { background: var(--eth-teal); }

/* ---------- Category grid ---------- */
.cat-card {
    background: #fff;
    border: 1px solid var(--eth-border);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all .15s ease;
    height: 100%;
    text-decoration: none;
    color: var(--eth-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}

.cat-card:hover {
    border-color: var(--eth-teal);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(14,124,139,.12);
    color: var(--eth-teal-deep);
}

.cat-card .cat-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, var(--eth-teal), var(--eth-teal-deep));
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}

.cat-card .cat-name { font-weight: 700; font-size: .92rem; }

/* ---------- Image pickers ---------- */
.img-drop {
    border: 2px dashed var(--eth-border);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    background: #fafcfe;
}

.img-thumb {
    width: 90px; height: 90px; object-fit: cover;
    border-radius: 12px; border: 1px solid var(--eth-border);
}

.logo-preview {
    width: 116px; height: 116px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--eth-border);
}

/* ---------- Preview mockup ---------- */
.listing-preview {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--eth-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(30, 42, 50, 0.04), 0 18px 40px rgba(30, 42, 50, 0.10);
}

.listing-preview .img-area {
    height: 240px;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(14, 124, 139, 0.10), transparent 55%),
        linear-gradient(135deg, #eef3f8 0%, #e3eaf2 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}

.listing-preview .img-area img { width: 100%; height: 100%; object-fit: cover; }

.listing-preview .img-area::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.14), transparent);
    pointer-events: none;
}

.preview-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .4rem; color: #8aa0b5;
}
.preview-empty i { font-size: 2.8rem; opacity: .8; }
.preview-empty span { font-size: .82rem; font-weight: 600; }

.listing-preview .origin-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    background: var(--eth-orange); color: #fff;
    font-size: .72rem; font-weight: 700;
    padding: .3rem .65rem; border-radius: 9px;
    box-shadow: 0 4px 12px rgba(226, 100, 30, 0.35);
}

/* Gallery thumbnails */
.preview-thumbs {
    display: flex; gap: .5rem; flex-wrap: wrap;
    padding: .75rem 1rem 0;
}
.preview-thumb {
    width: 54px; height: 54px; object-fit: cover;
    border-radius: 10px; border: 2px solid var(--eth-border);
    cursor: pointer; transition: border-color .15s ease, transform .15s ease;
}
.preview-thumb:hover { transform: translateY(-2px); }
.preview-thumb.active { border-color: var(--eth-teal); }

.preview-info { padding: 1rem 1.25rem 1.25rem; }
.preview-store-label {
    color: var(--eth-teal);
    font-size: .7rem; font-weight: 700;
    letter-spacing: 1.3px; text-transform: uppercase;
    margin-bottom: .35rem;
}
.preview-name {
    font-size: 1.45rem; font-weight: 800; line-height: 1.2;
    color: var(--eth-text); margin: 0 0 .5rem;
}
.preview-price-row { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .5rem; }
.preview-currency { color: var(--eth-muted); font-size: .9rem; font-weight: 600; }
.preview-from { color: var(--eth-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.preview-variant-name { margin-top: -.15rem; margin-bottom: .35rem; font-size: .82rem; font-weight: 600; color: var(--eth-teal-deep); }
.preview-variant-name i { color: var(--eth-teal); margin-right: .25rem; }
.preview-desc { color: var(--eth-muted); font-size: .9rem; line-height: 1.5; margin: 0 0 .85rem; }

.preview-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.preview-tag {
    font-size: .74rem; font-weight: 600;
    color: var(--eth-teal-deep);
    background: rgba(14, 124, 139, 0.08);
    border: 1px solid rgba(14, 124, 139, 0.2);
    border-radius: 999px;
    padding: .25rem .7rem;
}

.preview-divider { border-color: var(--eth-border); opacity: 1; margin: 1rem 0; }

.preview-meta {
    display: flex; flex-wrap: wrap; gap: .35rem 1.1rem;
    font-size: .82rem; color: var(--eth-muted); font-weight: 500;
}
.preview-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.preview-meta i { color: var(--eth-teal); }

.price-lg { color: var(--eth-orange); font-weight: 800; font-size: 1.75rem; line-height: 1; }

.eth-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid var(--eth-border);
    color: var(--eth-muted);
    font-size: .85rem;
    padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
    text-align: center;
}

.section-head {
    display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem;
}
.section-head h5 { margin: 0; }

/* ---------- Variant tabs (folder style) ---------- */
.variant-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--eth-teal);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.variant-tab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #eef2f6;
    border: 1px solid var(--eth-border);
    border-bottom: 0;
    border-radius: 11px 11px 0 0;
    padding: .62rem 1.5rem;
    margin-bottom: -2px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--eth-muted);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
.variant-tab i { font-size: 1rem; }
.variant-tab:hover:not(.active) { color: var(--eth-teal-deep); background: #e6edf3; }
.variant-tab.active {
    background: var(--eth-teal);
    border-color: var(--eth-teal);
    color: #fff;
    font-weight: 700;
}

/* ---------- Variant images gallery ---------- */
.variant-img-gallery {
    max-height: 290px;
    overflow-y: auto;
    padding: .25rem .35rem 0 0;
    border-top: 1px solid var(--eth-border);
    margin-top: .25rem;
    padding-top: .85rem;
}
.vimg-group { margin-bottom: .9rem; }
.vimg-group:last-child { margin-bottom: 0; }
.vimg-group-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--eth-text);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.vimg-count {
    font-size: .68rem;
    font-weight: 700;
    color: var(--eth-teal-deep);
    background: rgba(14, 124, 139, 0.1);
    border-radius: 999px;
    padding: .05rem .4rem;
}
.vimg-grid { display: flex; flex-wrap: wrap; gap: .55rem; }
.vimg-cell { position: relative; width: 74px; height: 74px; }
.vimg-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--eth-border);
    cursor: zoom-in;
}
.vimg-del {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform .15s ease, background .15s ease;
}
.vimg-del:hover { background: #b91c1c; transform: scale(1.1); }

/* ---------- Add attribute value control ---------- */
.attr-add {
    display: inline-flex;
    align-items: center;
    margin-top: .7rem;
    max-width: 320px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--eth-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.attr-add:focus-within { border-color: var(--eth-teal); box-shadow: 0 0 0 .18rem rgba(14, 124, 139, 0.12); }
.attr-add-icon { color: var(--eth-muted); padding-left: .6rem; font-size: .95rem; flex: 0 0 auto; }
.attr-add-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: .45rem .55rem;
    font-size: .85rem;
    color: var(--eth-text);
}
.attr-add-input::placeholder { color: var(--eth-muted); }
.attr-add-btn {
    flex: 0 0 auto;
    border: 0;
    background: var(--eth-teal);
    color: #fff;
    font-weight: 700;
    font-size: .82rem;
    padding: .45rem 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
}
.attr-add-btn:hover { background: var(--eth-teal-deep); }
.attr-add-input:disabled { opacity: .6; }

/* ---------- Product status filter pills ---------- */
.product-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #fff;
    border: 1px solid var(--eth-border);
    border-radius: 999px;
    padding: .45rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--eth-text);
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.filter-pill:hover { border-color: var(--eth-teal); color: var(--eth-teal-deep); }
.filter-pill .badge {
    background: #eef2f6;
    color: var(--eth-muted);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    padding: .15rem .45rem;
}
.filter-pill .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.filter-live .dot   { background: #16A34A; }
.filter-review .dot { background: #D97706; }
.filter-draft .dot  { background: #EA580C; }
.filter-pill.active {
    background: var(--eth-teal);
    border-color: var(--eth-teal);
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 124, 139, 0.22);
}
.filter-pill.active .badge { background: rgba(255, 255, 255, 0.25); color: #fff; }
.filter-pill.active .dot { background: #fff; }

/* ---------- Product list card ---------- */
.product-card { overflow: hidden; }

.product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(14, 124, 139, 0.10), transparent 55%),
        linear-gradient(135deg, #eef3f8 0%, #e3eaf2 100%);
    overflow: hidden;
}
.product-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.product-card:hover .product-media-img { transform: scale(1.06); }

.product-media-empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    color: #94a3b8;
}
.product-media-empty i { font-size: 2.4rem; opacity: .8; }
.product-media-empty span { font-size: .78rem; font-weight: 600; letter-spacing: .3px; }

/* Status badge floating over the image. */
.product-media-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}
.product-media-badge .badge {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    padding: .4rem .6rem;
}
/* Soft gradient scrim along the bottom so any badge/text stays legible. */
.product-media::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 38%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.12), transparent);
    pointer-events: none;
}

.product-body { padding: .8rem .85rem; }
.product-body .fw-bold { font-size: .95rem; }
.product-upc {
    display: inline-block;
    font-size: .72rem;
    color: var(--eth-muted);
    background: #f4f7fa;
    border: 1px solid var(--eth-border);
    border-radius: 6px;
    padding: .1rem .4rem;
    margin-bottom: .4rem;
    align-self: flex-start;
}

/* ---------- Modern polish ---------- */
h1, h2, h3, h4, h5 { letter-spacing: -0.01em; }

/* Slightly crisper stepper bubbles. */
.stepper .bubble { box-shadow: 0 2px 6px rgba(30, 42, 50, 0.06); transition: all .15s ease; }
.stepper .step.done .bubble { box-shadow: 0 4px 12px rgba(14, 124, 139, 0.25); }

/* Lift the category tiles' icon a touch for depth. */
.cat-card .cat-icon { box-shadow: 0 8px 18px rgba(14, 124, 139, 0.22); }

/* Smooth, consistent radius on Bootstrap alerts to match the card system. */
.alert { border-radius: 14px; }

/* Respect users who prefer less motion — disable the hover lifts/animations. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
    .row > [class*="col"] > .eth-card:hover,
    .btn-eth:hover, .eth-btn:hover, .btn-eth-orange:hover, .eth-btn-outline:hover,
    .cat-card:hover { transform: none; }
}
