:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #102033;
    --muted: #667085;
    --line: #e6e9f0;
    --dark: #111827;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --green: #16a34a;
    --red: #dc2626;
    --shadow: 0 24px 70px rgba(15, 23, 42, .10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding-top: 102px;
    padding-bottom: 78px;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, .16), transparent 35%),
        radial-gradient(circle at top right, rgba(37, 99, 235, .12), transparent 34%),
        var(--bg);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

.page-shell,
.nav,
.footer-inner {
    width: min(1660px, calc(100% - 32px));
    margin: 0 auto;
}

.nav {
    position: fixed;
    top: 14px;
    left: 50%;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid rgba(230, 233, 240, .85);
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
    transform: translateX(-50%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--dark), #374151);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 10px 12px;
    border-radius: 999px;
    color: #344054;
    font-weight: 700;
    font-size: 14px;
}

.nav-links a:hover {
    background: #f2f4f7;
}

.nav-button {
    color: white !important;
    background: var(--dark);
}

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 24px;
}

.pill {
    display: inline-flex;
    justify-content: center;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 4px;
    color: white;
    background: var(--primary);
    font-size: 12px;
}

.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 58px;
    color: var(--muted);
    font-size: 14px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, .65fr);
    gap: 22px;
    align-items: stretch;
}

.hero-copy,
.hero-panel,
.auth-card,
.side-card,
.summary-card,
.checkout-card,
.table-card,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: clamp(36px, 5vw, 58px);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 16px;
    font-size: clamp(42px, 5vw, 72px);
    line-height: .94;
    letter-spacing: -.07em;
}

h2 {
    margin-bottom: 10px;
    font-size: 28px;
    letter-spacing: -.04em;
}

h3 {
    margin-bottom: 8px;
    letter-spacing: -.025em;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.hero-copy p {
    max-width: 760px;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

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

.btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 12px 28px rgba(249, 115, 22, .25);
}

.btn.dark {
    color: white;
    background: var(--dark);
}

.btn.ghost {
    color: var(--dark);
    border-color: var(--line);
    background: white;
}

.btn.small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.btn.full {
    width: 100%;
}

.hero-panel {
    overflow: hidden;
    padding: 26px;
    background:
        linear-gradient(145deg, rgba(17, 24, 39, .96), rgba(31, 41, 55, .95)),
        #111827;
    color: white;
}

.hero-panel p,
.hero-panel span {
    color: rgba(255, 255, 255, .76);
}

.panel-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 42px;
    font-weight: 700;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 7px rgba(34, 197, 94, .16);
}

.truck-card {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    background: rgba(255, 255, 255, .08);
}

.truck-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 20px;
    background: rgba(249, 115, 22, .22);
    font-size: 36px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric-grid div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
}

.metric-grid strong {
    display: block;
    font-size: 27px;
}

.metric-grid span {
    font-size: 13px;
}

.section {
    margin-top: 34px;
}

.section.compact {
    margin-top: 28px;
}

.section-head,
.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.link {
    border: 0;
    background: none;
    color: var(--primary-dark);
    cursor: pointer;
    font-weight: 800;
}

.link.danger {
    color: var(--red);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 14px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
    gap: 16px;
}

.category-card,
.product-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .07);
    transition: transform .15s ease, box-shadow .15s ease;
}

.category-card:hover,
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, .10);
}

.category-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
}

.category-card span,
.product-image,
.cart-thumb,
.detail-visual {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .5), transparent 28%),
        linear-gradient(135deg, var(--dark), #334155);
    color: white;
}

.category-card span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 16px;
    font-weight: 800;
}

.product-card {
    overflow: hidden;
}

.product-image {
    position: relative;
    display: grid;
    place-items: center;
    height: 218px;
    overflow: hidden;
    font-size: 72px;
    font-weight: 900;
}

.product-image img,
.detail-visual img,
.cart-thumb img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image span,
.detail-visual span,
.cart-thumb span {
    position: relative;
    z-index: 1;
}

.product-body {
    padding: 20px;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.product-body p {
    min-height: 50px;
    font-size: 14px;
}

.product-footer,
.detail-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-footer strong,
.detail-price-row strong {
    font-size: 22px;
}

.stock,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.stock.good {
    color: #166534;
    background: #dcfce7;
}

.stock.bad {
    color: #991b1b;
    background: #fee2e2;
}

.status-badge {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-badge.large {
    min-height: 42px;
    padding: 0 18px;
}

.page-heading {
    margin-bottom: 18px;
}

.page-heading h1 {
    margin-bottom: 8px;
    font-size: clamp(36px, 4vw, 56px);
}

.toolbar {
    margin-bottom: 20px;
}

.catalog-filter {
    display: grid;
    grid-template-columns: 1fr 260px auto auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    outline: none;
    color: var(--text);
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .12);
}

.auth-layout,
.checkout-layout,
.cart-layout,
.order-detail-grid,
.profile-layout,
.detail-layout {
    display: grid;
    gap: 22px;
}

.auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .65fr);
    align-items: stretch;
}

.auth-card,
.side-card,
.checkout-card,
.summary-card,
.table-card,
.empty-state {
    padding: 28px;
}

.auth-card.narrow {
    max-width: none;
}

.form {
    display: grid;
    gap: 16px;
}

.form label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-weight: 800;
    font-size: 14px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.small-note {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 14px;
}

.check-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 24px 0 0;
    list-style: none;
}

.check-list li {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    color: #344054;
    font-weight: 700;
}

.detail-layout {
    grid-template-columns: minmax(420px, .9fr) minmax(0, 1.1fr);
    align-items: stretch;
}

.detail-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 500px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-visual span {
    font-size: 132px;
    font-weight: 900;
}

.detail-copy {
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow);
}

.add-cart-form {
    display: grid;
    grid-template-columns: 160px auto;
    align-items: end;
    gap: 14px;
    margin-top: 30px;
}

.add-cart-form label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 800;
}

.cart-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
}

.cart-list {
    display: grid;
    gap: 14px;
}

.cart-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 172px 120px 90px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.cart-thumb {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 78px;
    overflow: hidden;
    border-radius: 18px;
    font-size: 34px;
    font-weight: 900;
}

.cart-info h3 {
    margin-bottom: 3px;
}

.cart-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

.quantity-form {
    display: flex;
    gap: 8px;
}

.cart-line-total {
    font-weight: 900;
}

.summary-card {
    position: sticky;
    top: 104px;
}

.summary-card h2 {
    font-size: 22px;
}

.summary-line,
.mini-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.summary-line.total {
    border-bottom: 0;
    font-size: 20px;
}

.summary-card .btn {
    margin-top: 12px;
}

.checkout-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
}

.table-card {
    overflow-x: auto;
}

.table-card h2 {
    padding-bottom: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

.order-detail-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
}

.address {
    color: var(--text);
    line-height: 1.8;
}

.profile-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
}

.empty-state {
    display: grid;
    justify-items: center;
    margin: 32px auto;
    max-width: 720px;
    text-align: center;
}

.flash-wrap {
    position: fixed;
    top: 92px;
    right: 24px;
    z-index: 40;
    display: grid;
    gap: 10px;
}

.flash {
    min-width: 280px;
    padding: 14px 16px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
    font-weight: 800;
    transition: .3s ease;
}

.flash-success {
    color: #166534;
    border-left: 5px solid var(--green);
}

.flash-danger {
    color: #991b1b;
    border-left: 5px solid var(--red);
}

.flash-warning {
    color: #92400e;
    border-left: 5px solid #f59e0b;
}

@media (max-width: 1100px) {
    .hero,
    .auth-layout,
    .detail-layout,
    .cart-layout,
    .checkout-layout,
    .order-detail-grid,
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: static;
    }

    .cart-row {
        grid-template-columns: 90px 1fr;
    }

    .quantity-form,
    .cart-line-total,
    .cart-row form {
        grid-column: 2;
    }

    .catalog-filter {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body {
        padding-top: 92px;
        padding-bottom: 96px;
    }

    .page-shell,
    .nav,
    .footer-inner {
        width: min(100% - 22px, 1660px);
    }

    .nav {
        align-items: flex-start;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        left: 12px;
        right: 12px;
        top: 72px;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: white;
    }

    .nav-links.open {
        display: flex;
    }

    .hero-copy {
        padding: 30px;
    }

    h1 {
        font-size: 40px;
    }

    .two-col,
    .three-col,
    .metric-grid,
    .add-cart-form {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        min-height: 76px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 4px;
    }
}
