:root {
    --page-bg: #ffffff;
    --surface: #ffffff;
    --soft: #d9d9d9;
    --line: #bababa;
    --hero-overlay: rgba(255, 255, 255, 0.02);
    --text: #111111;
    --muted: #4b4b4b;
    --accent: #bb5a67;
    --accent-dark: #9d4652;
    --blue: #1f45ff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

button,
input,
select {
    font: inherit;
}

.page-shell {
    width: min(100%, 1520px);
    margin: 0 auto;
    background: var(--surface);
    min-height: 100vh;
    padding: 16px 18px 30px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
}

.site-title,
.site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    background: #f2f2f2;
    border: 1px solid #c7c7c7;
    color: #000;
    text-decoration: none;
}

.site-title {
    flex: 1.8;
    justify-content: flex-start;
    padding: 0 18px;
    font-size: clamp(1.2rem, 1.7vw, 1.8rem);
    font-style: italic;
    font-weight: 700;
    text-decoration: underline;
}

.site-nav {
    flex: 1.25;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.site-nav a {
    font-size: 0.9rem;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 410px;
    margin-top: 10px;
    background: url("pexels-tiana-18128-2956376.jpg") center/cover no-repeat;
    overflow: hidden;
    border: 1px solid #d9d9d9;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), var(--hero-overlay) 45%, rgba(255, 255, 255, 0.02));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
    padding: 74px 0 0 92px;
    color: #fff;
}

.hero-content h1 {
    margin: 0 0 42px;
    font-size: clamp(1.55rem, 2.55vw, 2.35rem);
    line-height: 1.18;
    font-style: italic;
}

.hero-button {
    display: inline-block;
    padding: 16px 30px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
}

.search-section,
.featured-section,
.checkout-section,
.site-footer {
    margin-top: 22px;
}

.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-label,
.section-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 24px;
    background: var(--soft);
    font-size: 0.95rem;
    font-weight: 700;
}

.section-label.wide {
    width: 100%;
    justify-content: flex-start;
}

.section-label.small {
    min-width: 124px;
    padding: 0 18px;
}

.section-banner {
    display: flex;
    width: min(100%, 560px);
    margin: 0 auto 18px;
    font-size: 1.05rem;
}

.search-row {
    margin-top: 14px;
}

.search-row input {
    width: min(100%, 355px);
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: #fff;
}

.category-pills {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.category-pill {
    position: relative;
    min-height: 64px;
    border: 0;
    border-radius: 999px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.36)),
        var(--bg-image) center/cover no-repeat;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.search-status {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.ghost-button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 6px;
}

.product-card {
    border: 1px solid var(--line);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card.is-hidden {
    display: none;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
}

.product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1.25 / 1;
    object-fit: cover;
}

.product-info {
    padding: 9px 11px 11px;
}

.product-name {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

.product-price {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
}

.add-button {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.add-button:hover,
.hero-button:hover,
.confirm-button:hover {
    filter: brightness(0.95);
}

.checkout-section {
    display: grid;
    grid-template-columns: 0.42fr 0.58fr;
    gap: 22px;
    align-items: start;
}

.method-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.method-button {
    min-height: 44px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}

.method-button.active {
    background: var(--soft);
}

.checkout-column {
    background: var(--soft);
    padding: 16px 16px 20px;
}

.checkout-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cart-summary-text {
    margin: 0;
    font-size: 0.92rem;
}

.cart-items {
    margin-top: 14px;
    min-height: 72px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px;
}

.cart-line,
.checkout-total,
.split-fields {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.cart-line {
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.cart-line:last-child {
    border-bottom: 0;
}

.remove-item {
    border: 0;
    background: transparent;
    color: #7d1a23;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.checkout-total {
    margin-top: 14px;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 800;
}

.payment-panel {
    display: none;
    margin-top: 16px;
}

.payment-panel.active {
    display: block;
}

.payment-panel h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.payment-panel p {
    margin: 6px 0;
    font-size: 0.88rem;
}

.payment-panel input,
.payment-panel select {
    width: 100%;
    height: 40px;
    margin-top: 8px;
    padding: 0 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #c95a63;
    color: #fff;
}

.payment-panel input::placeholder {
    color: rgba(255, 255, 255, 0.9);
}

.payment-panel select {
    appearance: none;
    cursor: pointer;
}

.split-fields input {
    width: 100%;
}

.confirm-button {
    width: 100%;
    margin-top: 18px;
    min-height: 44px;
    border: 0;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.payment-message {
    min-height: 24px;
    margin: 14px 0 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.payment-message.success {
    color: #166534;
}

.payment-message.error {
    color: #9f1239;
}

.empty-state {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    background: #d8d8d8;
    padding: 22px 20px 24px;
    text-align: center;
}

.site-footer h3 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.site-footer p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 14px 18px;
    background: #111;
    color: #fff;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .site-header,
    .checkout-section {
        grid-template-columns: 1fr;
        display: grid;
    }

    .site-nav,
    .category-pills,
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        padding: 54px 24px 0;
    }
}

@media (max-width: 620px) {
    .page-shell {
        padding: 14px;
    }

    .site-nav,
    .category-pills,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .search-header {
        flex-direction: column;
        align-items: stretch;
    }

    .site-title,
    .site-nav a,
    .section-label,
    .section-banner {
        min-height: 50px;
    }

    .hero {
        min-height: 320px;
    }

    .hero-content {
        max-width: 340px;
        padding: 38px 18px 0;
    }

    .hero-button {
        padding: 14px 20px;
        font-size: 1rem;
    }
}
