:root {
    color-scheme: dark;
    --bg: #14110f;
    --surface: #1b1714;
    --surface-2: #221d19;
    --surface-3: #2a241f;
    --border: #3a312a;
    --text: #f0e7d8;
    --muted: #b6a895;
    --accent: #cfb07a;
    --danger: #b85454;
    --success-bg: #1d2a20;
    --success-text: #c8e0cb;
    --error-bg: #31201f;
    --error-text: #efc1bc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(20, 17, 15, 0.82), rgba(20, 17, 15, 0.92)),
        radial-gradient(circle at top, rgba(207, 176, 122, 0.08), transparent 34%),
        #14110f;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    padding: 24px;
}

.shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 32px;
}

.shell-top {
    margin-bottom: 12px;
}

.site-bar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.site-bar__label,
.site-bar__meta,
.site-bar__title {
    margin: 0;
}

.site-bar__title a {
    color: var(--text);
    text-decoration: none;
}

.site-bar__label {
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.site-bar__title {
    font-size: 24px;
    color: var(--text);
}

.site-bar__contacts {
    text-align: right;
}

.site-bar__meta {
    color: var(--muted);
    line-height: 1.6;
}

.hero,
.admin-header,
.cocktail-topline,
.menu-heading,
.category-item,
.order-head,
.checkout-bar,
.cart-item,
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.hero {
    padding: 0 0 20px;
    border-bottom: 1px solid var(--border);
}

.hero-wide,
.admin-header,
.cart-section {
    margin-bottom: 24px;
}

.hero-copy {
    max-width: 640px;
}

.admin-header.compact {
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

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

h1 {
    margin-bottom: 12px;
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 500;
    line-height: 1.02;
}

h2 {
    margin-bottom: 6px;
    font-size: 20px;
    font-weight: 500;
}

h3 {
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 500;
}

.lead,
.description,
.strength,
.card-category,
.field span,
.quantity-label span {
    color: var(--muted);
}

.toolbar,
.card-actions,
.filter-row,
.cart-actions,
.order-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.button-link,
button,
input,
select,
textarea {
    font: inherit;
}

.button-link,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.button-link.secondary {
    background: transparent;
}

.button-link.danger {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

.js-add-to-cart-button.is-added {
    background: var(--success-bg);
    border-color: #30533a;
    color: var(--success-text);
    transform: scale(1.03);
}

.cart-counter,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
}

.cart-counter {
    text-decoration: none;
}

.cart-counter.cart-bump {
    animation: cartPulse 0.55s ease;
}

.status-badge.is-issued {
    color: var(--success-text);
    background: var(--success-bg);
}

.status-badge.is-pending {
    color: var(--accent);
}

.notice,
.empty-state,
.menu-card,
.cocktail-card,
.category-item,
.admin-form,
.cart-list,
.order-card {
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.notice {
    margin: 0 0 20px;
    padding: 12px 14px;
}

.notice.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.notice.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.empty-state {
    padding: 20px;
}

.filter-form {
    margin-bottom: 24px;
    max-width: 420px;
}

.admin-controls {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    border-radius: 18px;
    margin-bottom: 24px;
}

.admin-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.admin-calculator {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 16px;
}

.admin-calculator h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}

.calc-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.calc-total {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--accent);
    font-weight: 600;
}

.calc-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(110px, 110px) minmax(110px, 110px) minmax(110px, 110px) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.calc-row:last-child {
    border-bottom: 0;
}

.calc-row-field {
    min-width: 0;
}

.calc-row label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.calc-row input,
.calc-row select {
    background: var(--surface-2);
    border-color: var(--border);
    border-radius: 10px;
}

.calc-row .button-link.danger {
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

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

.cocktail-card {
    border-radius: 18px;
    padding: 18px;
}

.cocktail-card img {
    border-radius: 14px;
}

.cocktail-topline {
    gap: 12px;
}

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

    .calc-row .button-link.danger {
        width: 100%;
        min-width: auto;
        border-radius: 12px;
    }
}

.catalog-grid,
.cocktail-grid,
.category-list,
.admin-form,
.order-list {
    display: grid;
    gap: 16px;
}

.catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
    justify-content: start;
}

.menu-card {
    overflow: hidden;
}

.menu-media {
    padding: 14px 14px 0;
}

.menu-image,
.cocktail-image {
    display: block;
    width: 100%;
    object-fit: cover;
    background: #100d0b;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.menu-image {
    height: 180px;
}

.menu-body {
    padding: 14px;
}

.cocktail-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    padding: 16px;
}

.cocktail-image {
    height: 200px;
}

.price {
    white-space: nowrap;
    color: var(--accent);
}

.field,
.quantity-label {
    display: grid;
    gap: 8px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 16px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 10px 12px;
}

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

.quantity-form {
    min-width: 92px;
}

.quantity-label input {
    width: 92px;
}

.category-item,
.order-card,
.cart-list {
    padding: 16px;
}

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

.cart-item,
.order-item-row {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child,
.order-item-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.checkout-bar {
    margin-top: 16px;
}

/* Блок із застереженням (використовує змінні вашої темної теми) */
.checkout-warning {
    max-width: 500px;
    text-align: left;
    margin: 0;
    padding: 14px 16px;
    background: var(--error-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--danger);
    color: var(--error-text);
    font-size: 14px;
    line-height: 1.5;
}

/* Рядок із сумою та кнопкою */
.checkout-actions {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
    justify-content: flex-end;
}

/* Робимо фінальну суму більшою та акцентною */
.checkout-actions .js-cart-total {
    font-size: 22px;
    color: var(--accent);
}

/* Акцентна, максимально помітна кнопка оплати */
.button-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    
    /* Шляхетний темно-зелений оксамитовий колір для темної теми */
    background: #1e3d2f; 
    color: #e2f3e7;
    border: 1px solid #2d5a45;
    
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Ефекти при взаємодії з кнопкою */
.button-checkout:hover {
    background: #254d3b;
    border-color: var(--accent); /* Підсвічування рамки вашим золотавим акцентом */
    color: #ffffff;
    box-shadow: 0 0 12px rgba(207, 176, 122, 0.15); /* М'яке золотаве світіння */
}

.button-checkout:active {
    transform: scale(0.98);
}

/* Адаптація під мобільні екрани (до 760px, як у вашому CSS) */
@media (max-width: 760px) {
    .checkout-bar {
        align-items: stretch !important; /* Перебиваємо стандартний flex-start з .checkout-bar */
    }

    .checkout-warning {
        max-width: 100%;
    }

    .checkout-actions {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .checkout-actions .js-cart-total {
        text-align: center;
    }

    .button-checkout {
        width: 100%;
    }
}


@keyframes cartPulse {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 760px) {
    body {
        padding: 12px;
    }

    .shell {
        padding: 20px;
    }

    .hero,
    .site-bar,
    .admin-header,
    .cocktail-topline,
    .menu-heading,
    .category-item,
    .field-row,
    .cocktail-card,
    .order-head,
    .checkout-bar,
    .cart-item,
    .section-heading {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .menu-image,
    .cocktail-image {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .site-bar__contacts {
        text-align: left;
    }
}

/* Fixed cart button in bottom left corner */
.fixed-cart-footer {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
}

.fixed-cart-footer .cart-counter {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fixed-cart-footer .cart-counter:hover {
    background: var(--surface-3);
    color: var(--accent);
    border-color: var(--accent);
}

.fixed-cart-footer .cart-counter.cart-bump {
    animation: cartPulse 0.55s ease;
}
