:root {
    --bg: #f6fbf7;
    --bg-soft: #ebf7ef;
    --surface: #ffffff;
    --surface-alt: #f3f9ff;
    --text: #132134;
    --muted: #50627c;
    --line: #d5e7da;
    --primary: #2d8f4e;
    --primary-2: #5bbd78;
    --green: #2d8f4e;
    --accent-blue: #2c77c9;
    --red: #d63b3b;
    --gold: #d8a32f;
    --shadow: 0 14px 32px rgba(36, 93, 52, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(91, 189, 120, 0.2), transparent 45%),
        radial-gradient(circle at 90% 0%, rgba(44, 119, 201, 0.12), transparent 35%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

body.floating-cart-open {
    overflow: hidden;
}

main {
    min-height: calc(100vh - 240px);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 7vw;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(120deg, #15311f, #1f3f2d);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.logo-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface);
    box-shadow: var(--shadow);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #f2fff6;
}

.logo span {
    color: var(--red);
}

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

.header-actions a {
    text-decoration: none;
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 10px;
    width: 38px;
    height: 36px;
    cursor: pointer;
}

.btn-outline,
.btn-filled,
.btn-secondary,
button.btn-outline,
button.btn-filled,
button.btn-secondary {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    border-radius: 999px;
    font-size: 13px;
    padding: 9px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1px solid rgba(45, 143, 78, 0.45);
}

.btn-filled {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(45, 143, 78, 0.35);
    font-weight: 600;
}

.btn-secondary,
.action-btn-secondary {
    background: #fff;
    color: var(--red) !important;
    border: 1px solid rgba(214, 59, 59, 0.45) !important;
}

.btn-outline:hover,
.btn-filled:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.header-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.35);
    color: #f2fff6;
    background: rgba(255, 255, 255, 0.06);
}

.header-actions .btn-filled {
    background: linear-gradient(135deg, #2d8f4e, #5bbd78);
}

.toggle-group {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
}

.toggle-group input {
    display: none;
}

.toggle-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.2s ease;
}

.toggle-group input:checked + .toggle-option {
    background: linear-gradient(135deg, var(--green), #73c069);
    color: #fff;
    box-shadow: 0 8px 18px rgba(82, 168, 79, 0.25);
    font-weight: 600;
}

.delivery-only.hidden {
    display: none !important;
}

.hero {
    text-align: center;
    padding: 54px 7vw 26px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero p,
.restaurant-desc,
.menu-card p,
th,
.muted {
    color: var(--muted);
}

.restaurant-subtitle {
    color: var(--muted);
    font-size: 14px;
}

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    padding: 10px 7vw 60px;
}

.coupon-section {
    padding: 10px 7vw 20px;
}

.coupon-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.coupon-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.coupon-grid::-webkit-scrollbar {
    height: 0;
}

.coupon-card {
    background: #fff;
    border: 1px dashed rgba(31, 125, 216, 0.5);
    border-radius: 18px;
    padding: 14px;
    cursor: pointer;
    flex: 0 0 220px;
    max-width: 220px;
    box-shadow: var(--shadow);
}

.coupon-offer,
.coupon-modal-close,
.category-section-title,
.menu-price,
.card-btn,
.restaurant-meta span.highlight,
.restaurant-badge,
.menu-card .menu-tags {
    color: var(--primary);
}

.coupon-modal {
    position: fixed;
    inset: 0;
    background: rgba(18, 33, 52, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.coupon-modal.is-open {
    display: flex;
}

.coupon-modal-inner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    width: min(420px, 92vw);
    box-shadow: var(--shadow);
}

.coupon-modal-close {
    float: right;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.coupon-modal-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0;
    padding: 10px;
    border: 1px dashed rgba(31, 125, 216, 0.5);
    border-radius: 12px;
}

.restaurant-card,
.form-container,
.menu-card,
.cart-wrapper,
.checkout-wrapper,
.card,
.alert {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.restaurant-card {
    position: relative;
    border-radius: 24px;
    padding: 22px;
    cursor: pointer;
    overflow: hidden;
}

.restaurant-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(48, 168, 242, 0.16), transparent 58%);
    pointer-events: none;
}

.restaurant-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e9f5ff;
    display: inline-block;
    margin-bottom: 10px;
}

.restaurant-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.restaurant-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}

.restaurant-card:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 125, 216, 0.55);
}

.card-btn {
    margin-top: 16px;
    gap: 8px;
    border: 1px solid rgba(31, 125, 216, 0.35);
    background: #f4faff;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.form-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 30px;
    border-radius: 24px;
}

.form-container h2 {
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.input-control,
.form-group input,
.qty-input,
.checkout-wrapper input,
.checkout-wrapper textarea,
.checkout-wrapper select,
input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    outline: none;
}

.qty-input {
    width: 60px;
    border-radius: 999px;
    text-align: center;
}

.input-control:focus,
.form-group input:focus,
.checkout-wrapper input:focus,
.checkout-wrapper textarea:focus,
.checkout-wrapper select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31, 125, 216, 0.12);
}

.btn-primary,
.action-btn {
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
    color: #fff !important;
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    padding: 10px 0;
    border-radius: 999px;
    margin-top: 8px;
}

.btn-compact {
    width: auto;
    padding: 10px 16px;
    margin-top: 0;
}

.alert {
    color: var(--text);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.menu-wrapper {
    padding: 40px 7vw 60px;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.category-section-title {
    margin: 18px 0 10px;
    font-size: 22px;
}

.category-block {
    margin-bottom: 18px;
}

.menu-card {
    border-radius: 20px;
    padding: 16px;
}

.menu-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.menu-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.menu-price {
    font-weight: 600;
    font-size: 14px;
}

.cart-wrapper,
.checkout-wrapper {
    max-width: 860px;
    margin: 40px auto;
    padding: 28px;
    border-radius: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
}

th {
    text-align: left;
}

.total-row td {
    border-bottom: none;
    font-weight: 600;
}

.summary {
    margin: 12px 0;
    padding-left: 18px;
}

.summary li {
    margin-bottom: 4px;
    font-size: 14px;
}

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

.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 80px);
}

.admin-nav {
    background: #f0f7ff;
    border-right: 1px solid var(--line);
    padding: 20px;
}

.admin-nav a {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

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

.admin-main {
    padding: 24px;
}

.card {
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.site-footer {
    margin-top: 22px;
    padding: 28px 7vw 26px;
    background: linear-gradient(140deg, #15311f, #112a1b);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    gap: 20px;
}

.footer-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.footer-brand h4,
.footer-col h5 {
    color: #f2fff6;
    margin-bottom: 8px;
}

.footer-brand p {
    color: #d7f0de;
    font-size: 13px;
    line-height: 1.45;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a,
.footer-contact a {
    color: #9fd9ff;
    text-decoration: none;
    font-size: 14px;
}

.footer-contact {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 14px;
}

.footer-contact p {
    color: #d7f0de;
    font-size: 13px;
    margin-bottom: 2px;
}

.site-subfooter {
    padding: 12px 7vw 24px;
    background: #112a1b;
    color: #b6d8c2;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.floating-cart-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--red), #ed5b5b);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 30px rgba(214, 59, 59, 0.32);
    cursor: pointer;
}

.floating-cart-count {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.floating-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(19, 33, 52, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 130;
}

.floating-cart-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.floating-cart-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: min(420px, 96vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--line);
    transform: translateX(102%);
    transition: transform 0.25s ease;
    z-index: 140;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    overflow-y: auto;
}

.floating-cart-panel.is-open {
    transform: translateX(0);
}

.floating-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.floating-close {
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
}

.floating-order-type {
    display: flex;
    gap: 8px;
}

.floating-type-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}

.floating-type-btn.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.floating-cart-meta {
    color: var(--muted);
    font-size: 12px;
}

.floating-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: var(--surface-alt);
}

.floating-item-main {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.floating-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.floating-item-controls button,
.floating-item-controls input {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 8px;
    background: #fff;
}

.floating-item-controls input {
    width: 56px;
    text-align: center;
}

.floating-item-controls .remove {
    margin-left: auto;
    color: var(--red);
}

.floating-coupon-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
}

.floating-summary {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-summary div {
    display: flex;
    justify-content: space-between;
}

.floating-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.floating-actions .btn-secondary {
    grid-column: 1 / -1;
}

.floating-feedback {
    min-height: 18px;
    font-size: 12px;
    color: var(--green);
}

.floating-feedback.error {
    color: var(--red);
}

.floating-empty {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .site-footer {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .logo {
        font-size: 16px;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 6px;
        background: rgba(10, 25, 16, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 12px;
        padding: 10px;
    }

    .header-actions.is-open {
        display: flex;
    }

    .header-actions a {
        text-align: center;
        border-radius: 10px;
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
    }

    .header-actions .btn-outline,
    .header-actions .btn-filled {
        border-radius: 10px;
        box-shadow: none;
    }

    .menu-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero h1 {
        font-size: 29px;
    }

    .cart-wrapper,
    .checkout-wrapper {
        margin: 18px 4vw;
        padding: 16px;
    }

    .checkout-grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .floating-cart-panel {
        top: auto;
        bottom: 0;
        width: 100%;
        height: min(82vh, 640px);
        border-left: none;
        border-top: 1px solid var(--line);
        border-radius: 20px 20px 0 0;
        transform: translateY(104%);
    }

    .floating-cart-panel.is-open {
        transform: translateY(0);
    }

    .floating-coupon-form {
        grid-template-columns: 1fr;
    }

    .floating-actions {
        grid-template-columns: 1fr;
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.policy-list {
    list-style: none;
    padding-left: 0;
    margin-top: 12px;
}

.policy-list li {
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
