:root {
    --bg: #f4f4f4;
    --surface: #ffffff;
    --surface-2: #eaeaea;
    --text: #111111;
    --muted: #555555;
    --border: #d1d1d1;
    --primary: #ff5500;
    --primary-hover: #cc4400;
    --success: #2e7d32;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.narrow {
    width: min(760px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.logo-box {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

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

.nav a,
.header-actions a {
    font-size: 14px;
    font-weight: 600;
}

.nav a.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero {
    position: relative;
    min-height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.2), rgba(0,0,0,.75));
}

.hero-content {
    position: relative;
    padding: 120px 0 80px;
    color: #fff;
}

.hero h1 {
    margin: 0;
    font-size: clamp(46px, 9vw, 110px);
    line-height: .9;
    letter-spacing: -.04em;
    max-width: 900px;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    margin-top: 24px;
    max-width: 640px;
    color: rgba(255,255,255,.8);
    font-size: 18px;
}

.eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .25em;
    margin-bottom: 18px;
    color: rgba(255,255,255,.78);
}

.eyebrow.dark {
    color: var(--muted);
}

.hero-actions,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 32px;
}

.hero-actions.center {
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: .2s ease;
}

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

.btn-block {
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    border-color: rgba(255,255,255,.4);
    color: #fff;
}

.btn-secondary.dark-border {
    border-color: var(--text);
    color: var(--text);
}

.btn-dark {
    background: var(--text);
    color: #fff;
}

.section {
    padding: 72px 0;
}

.section h1,
.section h2,
.section h3 {
    margin: 0;
    letter-spacing: -.03em;
}

.section h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.section h2 {
    font-size: clamp(28px, 4vw, 46px);
}

.grid {
    display: grid;
    gap: 24px;
}

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

.category-card,
.product-card,
.step-card,
.card,
.summary-box,
.auth-box,
.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
}

.category-card {
    min-height: 250px;
    display: flex;
    align-items: end;
    padding: 24px;
}

.category-card-body {
    width: 100%;
}

.small-label,
.product-meta,
.label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    background: var(--surface-2);
}

.product-card-body {
    padding: 18px;
}

.product-card h3 {
    margin: 10px 0 14px;
    font-size: 20px;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.cta-section {
    padding: 0 0 72px;
}

.cta-box {
    background: var(--primary);
    color: #fff;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-box h3 {
    font-size: clamp(26px, 4vw, 44px);
    max-width: 720px;
}

.toolbar {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    border: 1px solid var(--border);
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
}

.chip.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

select,
input,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: #fff;
    font: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.empty-state {
    padding: 64px 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    background: #fff;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--muted);
}

.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.price-large {
    font-size: 34px;
    font-weight: 800;
    margin: 18px 0;
}

.product-description {
    color: var(--muted);
    line-height: 1.7;
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 24px 0;
}

.product-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.qty-box {
    display: flex;
    border: 1px solid var(--text);
    height: 48px;
}

.qty-box button {
    width: 48px;
    border: 0;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
}

.qty-box input {
    width: 70px;
    border: 0;
    text-align: center;
}

.cart-layout,
.checkout-layout,
.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.summary-box,
.card,
.auth-box,
.order-card {
    padding: 24px;
}

.summary-row,
.summary-total,
.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.summary-row {
    margin-bottom: 14px;
    color: var(--muted);
}

.summary-total {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 18px;
    font-size: 20px;
    font-weight: 800;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 18px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 16px;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.cart-item-name {
    font-size: 18px;
    font-weight: 700;
}

.cart-item-meta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-inline {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
}

.qty-inline button {
    width: 36px;
    height: 36px;
    border: 0;
    background: #fff;
    cursor: pointer;
}

.qty-inline span {
    display: inline-grid;
    place-items: center;
    width: 42px;
}

.remove-btn {
    background: transparent;
    border: 0;
    color: #c62828;
    cursor: pointer;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.auth-box {
    max-width: 560px;
    margin: 0 auto;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: auto;
    min-height: auto;
}

.success-box {
    background: #fff;
    border: 1px solid var(--border);
    padding: 56px 24px;
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--success);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.status-badge {
    background: var(--success);
    color: #fff;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.order-items {
    list-style: none;
    padding: 0;
    margin: 18px 0;
}

.order-items li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

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

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

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

.site-footer {
    margin-top: 72px;
    background: var(--text);
    color: #fff;
    padding: 56px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li + li {
    margin-top: 10px;
}

.footer-logo {
    margin-bottom: 14px;
}

.muted {
    color: var(--muted);
}

.site-footer .muted {
    color: rgba(255,255,255,.6);
}

@media (max-width: 992px) {
    .grid-4,
    .product-detail,
    .cart-layout,
    .checkout-layout,
    .admin-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-detail,
    .cart-layout,
    .checkout-layout,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }
}

@media (max-width: 640px) {
    .grid-4,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 28px;
    }

    .header-inner {
        height: auto;
        padding: 14px 0;
        flex-wrap: wrap;
    }
}

/* Auth & form utilities */
.form-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

.table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
