/* =====================================================================
   SoleMate - main stylesheet
   Sections: 1 variables  2 base  3 header  4 buttons/forms  5 hero
             6 product cards  7 shop  8 product page  9 cart/checkout
            10 account 11 admin 12 footer 13 toast 14 responsive
   ===================================================================== */

/* -- 1. variables ---------------------------------------------------- */
:root {
    --ink:        #0f1524;
    --ink-soft:   #1b2336;
    --body:       #5a6376;
    --line:       #e6e9f0;
    --bg:         #ffffff;
    --bg-soft:    #f6f7fb;
    --brand:      #ff5722;
    --brand-dark: #e8410f;
    --brand-soft: #fff1ec;
    --gold:       #f5b301;
    --green:      #12a150;
    --red:        #e5484d;
    --blue:       #2563eb;

    --radius:     16px;
    --radius-sm:  10px;
    --shadow-sm:  0 2px 8px rgba(15, 21, 36, .06);
    --shadow:     0 10px 30px rgba(15, 21, 36, .09);
    --shadow-lg:  0 24px 60px rgba(15, 21, 36, .16);
    --font:       'Poppins', 'Segoe UI', system-ui, sans-serif;
    --head:       'Sora', 'Poppins', system-ui, sans-serif;
    --t:          .25s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
    --ink:      #f2f4f8;
    --ink-soft: #e2e6ef;
    --body:     #a2abbd;
    --line:     #262c3d;
    --bg:       #10131c;
    --bg-soft:  #171b27;
    --brand-soft: #2a1a13;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
    --shadow:    0 10px 30px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

/* -- 2. base --------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background var(--t), color var(--t);
}

h1, h2, h3, h4, h5 { font-family: var(--head); color: var(--ink); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: min(1240px, 92%); margin-inline: auto; }
.section    { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.bg-soft    { background: var(--bg-soft); }
.text-center { text-align: center; }
.hidden     { display: none !important; }

.section-head { margin-bottom: 34px; }
.section-head p { max-width: 560px; }
.section-head.text-center p { margin-inline: auto; }

.eyebrow {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

/* -- 3. header ------------------------------------------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 74px;
}

.logo {
    font-family: var(--head);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.02em;
}
.logo span { color: var(--brand); }
.logo-mark {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), #ff8a3d);
    color: #fff; border-radius: 10px; font-size: 1rem;
    box-shadow: 0 6px 16px rgba(255, 87, 34, .35);
}

.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a {
    font-weight: 500; font-size: .95rem; color: var(--body);
    position: relative; padding: 4px 0; transition: color var(--t);
}
.nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: -2px;
    width: 0; height: 2px; background: var(--brand);
    border-radius: 2px; transition: width var(--t);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--bg-soft); border: 1px solid var(--line);
    color: var(--ink); cursor: pointer; position: relative;
    transition: all var(--t); font-size: 1rem;
}
.icon-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateY(-2px); }

.badge {
    position: absolute; top: -6px; right: -6px;
    min-width: 20px; height: 20px; padding: 0 5px;
    background: var(--brand); color: #fff;
    border-radius: 999px; font-size: .68rem; font-weight: 700;
    display: grid; place-items: center; border: 2px solid var(--bg);
}

.menu-toggle { display: none; }

/* user dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 10px);
    min-width: 208px; background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all var(--t); z-index: 300;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a, .dropdown-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: .92rem; color: var(--ink-soft);
    background: none; border: 0; cursor: pointer;
    font-family: var(--font); text-align: left; transition: background var(--t);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-soft); color: var(--brand); }
.dropdown-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head strong { display: block; color: var(--ink); font-size: .95rem; }
.dropdown-head small { color: var(--body); font-size: .78rem; }

/* -- 4. buttons and forms -------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
    font-family: var(--font); font-weight: 600; font-size: .95rem;
    cursor: pointer; transition: all var(--t); white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(255, 87, 34, .3); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 87, 34, .4); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { transform: translateY(-2px); opacity: .9; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 16px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.input, .select, .textarea {
    width: 100%; padding: 12px 15px; font-family: var(--font); font-size: .94rem;
    color: var(--ink); background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    transition: all var(--t);
}
.input:focus, .select:focus, .textarea:focus {
    outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 87, 34, .12);
}
.textarea { resize: vertical; min-height: 110px; }
.field-error { color: var(--red); font-size: .78rem; margin-top: 5px; display: block; }
.input.is-invalid { border-color: var(--red); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 16px; }
.alert-error   { background: rgba(229, 72, 77, .12);  color: var(--red); }
.alert-success { background: rgba(18, 161, 80, .12);  color: var(--green); }
.alert-info    { background: rgba(37, 99, 235, .1);   color: var(--blue); }

/* -- 5. hero --------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(255, 87, 34, .18), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(37, 99, 235, .12), transparent 60%),
        var(--bg-soft);
    padding: 80px 0 90px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero h1 { margin-bottom: 18px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { font-size: 1.05rem; max-width: 500px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 38px; margin-top: 44px; }
.hero-stats strong { display: block; font-family: var(--head); font-size: 1.7rem; color: var(--ink); }
.hero-stats span { font-size: .82rem; }

.hero-visual { position: relative; }
.hero-visual img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    /* the gradient stays visible if the photo cannot be downloaded */
    background: linear-gradient(140deg, #ffd9c9, #ffe9d3 45%, #dfe6f5);
    border-radius: 30px; box-shadow: var(--shadow-lg);
    transform: rotate(-3deg); transition: transform .6s var(--t);
}
.hero-visual:hover img { transform: rotate(0); }
.float-card {
    position: absolute; background: var(--bg); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 12px 16px;
    display: flex; align-items: center; gap: 11px; font-size: .84rem;
    animation: bob 4s ease-in-out infinite;
}
.float-card strong { display: block; color: var(--ink); font-size: .95rem; }
.float-card.one { bottom: 26px; left: -16px; }
.float-card.two { top: 26px; right: -10px; animation-delay: 1.4s; }
.float-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }

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

/* feature strip */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); transition: all var(--t);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feature i { font-size: 1.3rem; color: var(--brand); }
.feature strong { display: block; color: var(--ink); font-size: .95rem; }
.feature small { font-size: .82rem; }

/* category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-tile {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(140deg, #ffd9c9, #e6ebf7);
    aspect-ratio: 3 / 4; box-shadow: var(--shadow-sm); transition: all var(--t);
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--t); }
.cat-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.cat-tile:hover img { transform: scale(1.08); }
.cat-tile figcaption {
    position: absolute; inset: auto 0 0 0; padding: 18px 16px;
    background: linear-gradient(transparent, rgba(8, 11, 20, .85));
    color: #fff; font-family: var(--head); font-weight: 600;
}
.cat-tile figcaption small { display: block; font-weight: 400; opacity: .8; font-size: .76rem; }

/* -- 6. product cards ------------------------------------------------ */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    transition: all var(--t); display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-7px); box-shadow: var(--shadow); border-color: transparent; }

.card-media {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden;
    background: linear-gradient(140deg, #f5f1ef, #e8ecf6);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--t); }
.card:hover .card-media img { transform: scale(1.07); }

.tag {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 5px 11px; border-radius: 999px;
    font-size: .7rem; font-weight: 700; letter-spacing: .04em;
    background: var(--brand); color: #fff;
}
.tag.out { background: var(--ink); }
.tag.low { background: var(--gold); color: #231a00; }

.card-quick {
    position: absolute; inset: auto 12px 12px 12px;
    display: flex; gap: 8px; opacity: 0; transform: translateY(12px);
    transition: all var(--t);
}
.card:hover .card-quick { opacity: 1; transform: translateY(0); }
.card-quick .btn { flex: 1; padding: 10px; font-size: .82rem; }

.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); font-weight: 600; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--ink); }
.card-title:hover { color: var(--brand); }
.stars { color: var(--gold); font-size: .78rem; display: flex; gap: 3px; align-items: center; }
.stars small { color: var(--body); margin-left: 4px; }
.price-row { display: flex; align-items: baseline; gap: 9px; margin-top: auto; padding-top: 8px; }
.price { font-family: var(--head); font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.price-old { font-size: .85rem; color: var(--body); text-decoration: line-through; }

/* -- 7. shop page ---------------------------------------------------- */
.page-head { background: var(--bg-soft); padding: 40px 0; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: .84rem; display: flex; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: var(--brand); }

.shop-layout { display: grid; grid-template-columns: 265px 1fr; gap: 30px; align-items: start; }
.filters {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px; position: sticky; top: 94px;
}
.filter-block { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-block:last-child { border: 0; margin: 0; padding: 0; }
.filter-block h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: .9rem; cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.check span.count { margin-left: auto; font-size: .76rem; color: var(--body); }

.size-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    min-width: 42px; padding: 8px 10px; text-align: center;
    border: 1px solid var(--line); border-radius: 10px;
    font-size: .85rem; cursor: pointer; background: var(--bg);
    color: var(--ink); transition: all var(--t); font-family: var(--font);
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

.shop-toolbar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.shop-toolbar .result-count { font-size: .9rem; }
.shop-toolbar .spacer { margin-left: auto; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination button {
    min-width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--bg); color: var(--ink);
    cursor: pointer; font-family: var(--font); transition: all var(--t);
}
.pagination button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pagination button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

.empty { text-align: center; padding: 60px 20px; }
.empty i { font-size: 3rem; color: var(--line); margin-bottom: 14px; display: block; }
.empty h3 { margin-bottom: 8px; }

/* skeleton loading */
.skeleton {
    border-radius: var(--radius); background: var(--bg-soft);
    position: relative; overflow: hidden; height: 330px;
}
.skeleton::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
    animation: shimmer 1.4s infinite;
}
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* -- 8. product detail ----------------------------------------------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.detail-media {
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    background: linear-gradient(140deg, #ffd9c9, #e6ebf7);
}
.detail-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.detail h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 10px; }
.detail .price-row { margin: 16px 0; }
.detail .price { font-size: 1.9rem; }
.save-chip { background: rgba(18, 161, 80, .12); color: var(--green); padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button {
    width: 40px; height: 42px; border: 0; background: var(--bg);
    color: var(--ink); cursor: pointer; font-size: 1.05rem; transition: background var(--t);
}
.qty button:hover { background: var(--bg-soft); color: var(--brand); }
.qty span { width: 44px; text-align: center; font-weight: 600; color: var(--ink); }

.meta-list { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: .9rem; }
.meta-list div { display: flex; gap: 10px; }
.meta-list b { color: var(--ink-soft); min-width: 96px; font-weight: 600; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab-btn {
    padding: 12px 20px; border: 0; background: none; cursor: pointer;
    font-family: var(--font); font-weight: 600; font-size: .92rem; color: var(--body);
    border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--t);
}
.tab-btn.active { color: var(--brand); border-color: var(--brand); }

.review {
    padding: 18px; border: 1px solid var(--line);
    border-radius: var(--radius); margin-bottom: 12px; background: var(--bg);
}
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.avatar {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); font-weight: 700; font-family: var(--head);
}
.star-input { display: flex; gap: 6px; font-size: 1.5rem; color: var(--line); }
.star-input i { cursor: pointer; transition: color var(--t), transform var(--t); }
.star-input i:hover { transform: scale(1.15); }
.star-input i.on { color: var(--gold); }

/* -- 9. cart and checkout -------------------------------------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 370px; gap: 30px; align-items: start; }
.cart-row {
    display: grid; grid-template-columns: 96px 1fr auto; gap: 16px;
    padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
    margin-bottom: 14px; background: var(--bg); align-items: center;
}
.cart-row img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-row .rm { background: none; border: 0; color: var(--body); cursor: pointer; font-size: .85rem; transition: color var(--t); }
.cart-row .rm:hover { color: var(--red); }

.summary {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 24px; position: sticky; top: 94px;
}
.summary h3 { margin-bottom: 18px; }
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: .93rem; }
.sum-row.total {
    border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px;
    font-size: 1.15rem; font-weight: 700; color: var(--ink); font-family: var(--head);
}
.ship-bar { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.ship-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #ff9a5c); transition: width .4s; }

.steps { display: flex; gap: 10px; justify-content: center; margin-bottom: 34px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--body); }
.step b {
    width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
    background: var(--bg-soft); border: 1px solid var(--line); font-size: .8rem;
}
.step.on { color: var(--ink); font-weight: 600; }
.step.on b { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-line { width: 46px; height: 1px; background: var(--line); align-self: center; }

.pay-option {
    display: flex; gap: 13px; align-items: flex-start; padding: 15px;
    border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer; margin-bottom: 10px; transition: all var(--t);
}
.pay-option:hover { border-color: var(--brand); }
.pay-option.active { border-color: var(--brand); background: var(--brand-soft); }
.pay-option input { accent-color: var(--brand); margin-top: 4px; }
.pay-option strong { display: block; color: var(--ink); font-size: .95rem; }
.pay-option small { font-size: .82rem; }

.success-box { max-width: 540px; margin: 0 auto; text-align: center; padding: 50px 30px; }
.success-ring {
    width: 88px; height: 88px; margin: 0 auto 22px; border-radius: 50%;
    display: grid; place-items: center; font-size: 2.3rem;
    background: rgba(18, 161, 80, .12); color: var(--green);
    animation: pop .5s cubic-bezier(.2, 1.5, .4, 1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* -- 10. account / auth ---------------------------------------------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 74px); }
.auth-art {
    position: relative; color: #fff;
    background: linear-gradient(150deg, #1b2336, #3a2418 70%, #7a3a14);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 50px; overflow: hidden;
}
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.auth-art > div { position: relative; z-index: 2; }
.auth-art h2 { color: #fff; margin-bottom: 10px; }
.auth-art p { color: rgba(255, 255, 255, .8); max-width: 380px; }
.auth-form { display: grid; place-items: center; padding: 50px 24px; }
.auth-card { width: min(430px, 100%); }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.demo-box {
    background: var(--bg-soft); border: 1px dashed var(--line);
    border-radius: var(--radius-sm); padding: 12px 14px; font-size: .83rem; margin-bottom: 18px;
}
.demo-box code { color: var(--brand); font-weight: 600; }

.tabs-pill { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 5px; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs-pill button {
    padding: 9px 20px; border: 0; border-radius: 999px; background: none;
    font-family: var(--font); font-weight: 600; font-size: .88rem;
    color: var(--body); cursor: pointer; transition: all var(--t);
}
.tabs-pill button.active { background: var(--bg); color: var(--brand); box-shadow: var(--shadow-sm); }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

.order-card { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.order-top {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
    padding: 16px 18px; background: var(--bg-soft); font-size: .88rem;
}
.order-top .spacer { margin-left: auto; }
.order-body { padding: 16px 18px; }
.order-line { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: .9rem; }
.order-line img { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; }

.chip {
    padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 600; text-transform: capitalize;
}
.chip.pending   { background: rgba(245, 179, 1, .15);  color: #a67c00; }
.chip.confirmed { background: rgba(37, 99, 235, .12);  color: var(--blue); }
.chip.shipped   { background: rgba(124, 58, 237, .12); color: #7c3aed; }
.chip.delivered { background: rgba(18, 161, 80, .13);  color: var(--green); }
.chip.cancelled { background: rgba(229, 72, 77, .12);  color: var(--red); }

/* -- 11. admin ------------------------------------------------------- */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 74px); }
.admin-side { background: var(--bg-soft); border-right: 1px solid var(--line); padding: 24px 16px; }
.admin-side h4 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--body); margin: 18px 10px 8px; }
.admin-nav button {
    display: flex; align-items: center; gap: 11px; width: 100%;
    padding: 11px 13px; border: 0; background: none; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: .92rem; font-weight: 500; color: var(--ink-soft);
    cursor: pointer; text-align: left; transition: all var(--t);
}
.admin-nav button:hover { background: var(--bg); }
.admin-nav button.active { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(255, 87, 34, .3); }
.admin-main { padding: 30px; overflow-x: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; display: flex; gap: 15px; align-items: center; transition: all var(--t);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 1.2rem; background: var(--brand-soft); color: var(--brand); }
.stat-icon.g { background: rgba(18, 161, 80, .12); color: var(--green); }
.stat-icon.b { background: rgba(37, 99, 235, .12); color: var(--blue); }
.stat-icon.y { background: rgba(245, 179, 1, .15); color: #a67c00; }
.stat strong { display: block; font-family: var(--head); font-size: 1.5rem; color: var(--ink); line-height: 1.2; }
.stat span { font-size: .82rem; }

.table-wrap { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 13px 16px; text-align: left; font-size: .89rem; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-weight: 600; color: var(--ink-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-soft); }
td img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }

.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding-top: 10px; }
.bar-chart div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; }
.bar-chart i {
    width: 100%; display: block; border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--brand), #ffab7d); min-height: 4px;
    transition: height .6s var(--t);
}
.bar-chart span { font-size: .75rem; }

/* modal */
.modal {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(10, 14, 24, .55); backdrop-filter: blur(4px);
    display: grid; place-items: center; padding: 20px;
    opacity: 0; visibility: hidden; transition: all var(--t);
}
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
    background: var(--bg); border-radius: var(--radius); width: min(620px, 100%);
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
    transform: translateY(18px); transition: transform var(--t);
}
.modal.open .modal-card { transform: translateY(0); }
.modal-head { display: flex; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin-right: auto; }
.modal-body { padding: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* -- 12. footer ------------------------------------------------------ */
.footer { background: var(--ink); color: rgba(255, 255, 255, .68); padding: 60px 0 0; margin-top: 60px; }
[data-theme="dark"] .footer { background: #0a0d15; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer a { font-size: .9rem; transition: color var(--t); }
.footer a:hover { color: var(--brand); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 34px; padding-bottom: 40px; }
.footer-grid ul { display: grid; gap: 9px; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer p { font-size: .9rem; max-width: 320px; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .08); transition: all var(--t);
}
.socials a:hover { background: var(--brand); color: #fff; transform: translateY(-3px); }
.newsletter { display: flex; gap: 8px; margin-top: 14px; }
.newsletter input {
    flex: 1; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06); color: #fff; font-family: var(--font); font-size: .88rem;
}
.newsletter input::placeholder { color: rgba(255, 255, 255, .45); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem;
}

/* -- 13. toast ------------------------------------------------------- */
.toast-wrap { position: fixed; top: 88px; right: 20px; z-index: 900; display: grid; gap: 10px; }
.toast {
    background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--brand);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    padding: 13px 18px; font-size: .9rem; color: var(--ink);
    min-width: 260px; max-width: 340px; display: flex; gap: 10px; align-items: center;
    animation: slide-in .3s cubic-bezier(.2, 1.3, .4, 1);
}
.toast.ok  { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.out { animation: slide-out .3s forwards; }
@keyframes slide-in  { from { transform: translateX(120%); opacity: 0; } }
@keyframes slide-out { to   { transform: translateX(120%); opacity: 0; } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* -- 14. responsive -------------------------------------------------- */
@media (max-width: 1080px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .cat-grid     { grid-template-columns: repeat(3, 1fr); }
    .stat-grid    { grid-template-columns: repeat(2, 1fr); }
    .footer-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .menu-toggle { display: grid; }
    .nav-links {
        position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--line);
        padding: 10px 6%; margin: 0;
        transform: translateY(-140%); transition: transform var(--t); z-index: 190;
    }
    .nav-links.open { transform: translateY(0); box-shadow: var(--shadow); }
    .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }

    .hero-grid, .detail, .auth-wrap { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .auth-art { min-height: 220px; padding: 30px; }
    .shop-layout, .cart-layout { grid-template-columns: 1fr; }
    .filters, .summary { position: static; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-side { border-right: 0; border-bottom: 1px solid var(--line); }
    .admin-nav { display: flex; gap: 8px; overflow-x: auto; }
    .admin-nav button { white-space: nowrap; }
}

@media (max-width: 620px) {
    .product-grid, .product-grid.cols-3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .features, .stat-grid, .footer-grid, .grid-2 { grid-template-columns: 1fr; }
    .section { padding: 48px 0; }
    .hero { padding: 48px 0 60px; }
    .hero-stats { gap: 22px; }
    .card-quick { opacity: 1; transform: none; position: static; margin: 0 16px 16px; }
    .cart-row { grid-template-columns: 70px 1fr; }
    .cart-row img { width: 70px; height: 70px; }
    .admin-main { padding: 18px; }
    .toast-wrap { left: 16px; right: 16px; }
    .toast { max-width: none; }
}
