:root {
    --bg: #fff8ed;
    --card: #ffffff;
    --text: #101827;
    --muted: #64748b;
    --line: #f2dcc6;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --dark: #111827;
    --green: #16a34a;
    --red: #dc2626;
    --shadow: 0 18px 50px rgba(15, 23, 42, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hero {
    background: radial-gradient(circle at 85% 0%, rgba(249,115,22,.24), transparent 42%), linear-gradient(135deg, #121827, #273244);
    color: #fff;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    padding: 18px 16px 30px;
    box-shadow: var(--shadow);
}

.hero-top {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    width: 92px;
    height: auto;
    background: rgba(255,255,255,.96);
    border-radius: 18px;
    padding: 8px;
}

.admin-link {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.2);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(255,255,255,.08);
}

.hero-content {
    max-width: 1120px;
    margin: 28px auto 0;
}

.open-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, .17);
    border: 1px solid rgba(74, 222, 128, .35);
    color: #bbf7d0;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

.hero h1 {
    font-size: clamp(36px, 10vw, 72px);
    letter-spacing: -2px;
    line-height: .95;
    margin: 16px 0 10px;
}

.hero p {
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

.category-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 16px;
    background: rgba(255,248,237,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.category-nav a {
    flex: 0 0 auto;
    color: var(--dark);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.catalog {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 16px;
}

.category-section {
    scroll-margin-top: 82px;
    margin-bottom: 34px;
}

.section-title h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.5px;
}

.section-title p {
    margin: 6px 0 16px;
    color: var(--muted);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.product-click {
    appearance: none;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    padding: 14px;
    text-align: left;
    width: 100%;
    height: 100%;
}

.product-info h3 {
    margin: 0 0 7px;
    font-size: 19px;
    letter-spacing: -.2px;
}

.product-info p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info strong {
    color: var(--orange-dark);
    font-size: 18px;
}

.product-click img {
    width: 160px;
    height: 130px;
    object-fit: cover;
    border-radius: 18px;
}

.cart-fab {
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 32px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), #f43f5e);
    padding: 16px 18px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(249, 115, 22, .32);
    font-weight: 900;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, .58);
    padding: 18px;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: #fff;
    border-radius: 28px;
    box-shadow: var(--shadow);
    position: relative;
}

.close-btn {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    font-size: 28px;
    line-height: 1;
}

.close-btn.dark {
    position: static;
    background: #f1f5f9;
    color: var(--dark);
}

.modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
}

.modal-body {
    padding: 20px;
}

.modal-body h2 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -.5px;
}

.modal-body p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.5;
}

.modal-base {
    display: block;
    color: var(--orange-dark);
    font-size: 22px;
    margin-bottom: 16px;
}

.complement-group {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    margin: 14px 0;
    background: #fffdf8;
}

.complement-group.invalid {
    border-color: var(--red);
    background: #fff1f2;
}

.group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.group-title span {
    font-size: 12px;
    font-weight: 900;
    color: var(--orange-dark);
    background: #ffedd5;
    padding: 6px 9px;
    border-radius: 999px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid #f7e7d7;
    color: var(--dark);
}

.option-row input {
    transform: scale(1.15);
    margin-right: 8px;
}

.option-row strong {
    color: var(--orange-dark);
    white-space: nowrap;
}

.obs-label,
.checkout-form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
    color: var(--dark);
}

textarea,
input,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    background: #fff;
    color: var(--dark);
    outline: none;
}

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

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

.qty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 18px 0;
}

.qty-row button,
.cart-controls button {
    border: 0;
    background: #f1f5f9;
    color: var(--dark);
    border-radius: 12px;
    min-width: 38px;
    height: 38px;
    font-weight: 900;
}

.qty-row span {
    font-size: 20px;
    font-weight: 900;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(135deg, var(--orange), #f43f5e);
    color: #fff;
    padding: 15px 18px;
    border-radius: 16px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(249, 115, 22, .24);
}

.primary-btn.full {
    width: 100%;
}

.primary-btn:disabled {
    opacity: .7;
    cursor: wait;
}

.cart-drawer {
    position: fixed;
    z-index: 55;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(440px, 100%);
    background: #fff;
    box-shadow: -18px 0 60px rgba(15, 23, 42, .18);
    transform: translateX(105%);
    transition: transform .22s ease;
    padding: 18px;
    overflow-y: auto;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.cart-head h2 {
    margin: 0;
    font-size: 28px;
}

.cart-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.empty-cart {
    border: 1px dashed var(--line);
    color: var(--muted);
    text-align: center;
    padding: 24px;
    border-radius: 18px;
    margin-bottom: 14px;
}

.cart-items {
    display: grid;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #fffdf8;
}

.cart-item h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.cart-item p,
.cart-item small {
    display: block;
    color: var(--muted);
    margin: 0 0 8px;
    line-height: 1.35;
}

.cart-item strong {
    color: var(--orange-dark);
}

.cart-controls {
    display: grid;
    justify-items: center;
    gap: 7px;
}

.cart-controls .remove {
    width: auto;
    min-width: auto;
    padding: 0 10px;
    color: var(--red);
    font-size: 12px;
}

.checkout-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.delivery-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.delivery-tabs label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: #fffdf8;
    font-weight: 900;
}

.cart-summary {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fffdf8;
    border-radius: 18px;
    padding: 14px;
}

.cart-summary div {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
}

.cart-summary .grand {
    color: var(--dark);
    font-size: 20px;
    font-weight: 900;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.install-warning {
    max-width: 520px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow);
}

.install-warning img {
    width: 110px;
}

.install-warning small {
    display: block;
    color: var(--muted);
    margin-top: 16px;
    word-break: break-word;
}

@media (max-width: 760px) {
    .product-list {
        grid-template-columns: 1fr;
    }

    .product-click {
        grid-template-columns: 1fr 112px;
        padding: 12px;
    }

    .product-click img {
        width: 112px;
        height: 112px;
    }

    .product-info h3 {
        font-size: 17px;
    }

    .product-info p {
        -webkit-line-clamp: 2;
        font-size: 13px;
    }

    .modal-backdrop {
        padding: 0;
    }

    .modal-card {
        max-height: 94vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .modal-img {
        height: 210px;
    }

    .hero {
        border-bottom-left-radius: 22px;
        border-bottom-right-radius: 22px;
    }
}
