﻿:root {
    --bg-1: #fff8fb;
    --bg-2: #f7eefa;
    --card: rgba(255, 255, 255, 0.88);
    --stroke: rgba(255, 193, 217, 0.45);
    --text: #2f2630;
    --muted: #756578;
    --primary: #f48fb1;
    --primary-strong: #ec6da0;
    --lilac: #e9daf4;
    --cream: #fff9ef;
    --ok: #2f9e44;
    --danger: #d94848;
    --shadow: 0 10px 30px rgba(196, 128, 162, 0.18);
    --radius: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, #ffeaf5 0%, transparent 40%),
                radial-gradient(circle at bottom left, #f0e8ff 0%, transparent 45%),
                linear-gradient(180deg, var(--bg-1), var(--bg-2));
    min-height: 100vh;
}

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

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

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

.app-shell {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 14px 14px 110px;
}

.glass {
    background: var(--card);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
}

.topbar {
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.logo-media {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffdbe9, #f2dffc);
    font-weight: 800;
    color: #8c3c63;
}

.logo-image {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #f0dce9;
    padding: 3px;
}

.logo-text {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    line-height: 1.1;
}

.icon-btn {
    border: 0;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    position: relative;
}

.icon {
    font-size: 1.1rem;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--primary-strong);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    display: grid;
    place-items: center;
    padding: 0 4px;
}

.hero-card {
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}

.hero-card h1 {
    margin: 0;
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
}

.hero-card p {
    margin: 8px 0;
    color: var(--muted);
}

.hero-card small {
    color: #8b758f;
}

.category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
}

.chip {
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #efd3e1;
    background: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.chip.active {
    background: linear-gradient(135deg, #ffcde2, #f0dcff);
    border-color: #efb8d3;
}

.main-content {
    display: grid;
    gap: 12px;
}

.section-title {
    margin: 0;
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
}

.products-list {
    display: grid;
    gap: 12px;
}

.product-card {
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 10px;
    cursor: pointer;
}

.product-thumb {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: #f6edf8;
}

.product-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-name {
    font-weight: 800;
    font-size: 1rem;
    margin: 2px 0 6px;
    line-height: 1.2;
}

.product-ingredients,
.product-description {
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.35;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.price-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.price {
    font-weight: 800;
    color: #a13a67;
}

.price-old {
    color: #8f8192;
    text-decoration: line-through;
    font-size: 0.78rem;
    font-weight: 700;
}

.badges {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 6px;
}

.badge {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8edf2;
    color: #8e4b6b;
    font-weight: 700;
}

.badge.highlight {
    background: #ffe2a8;
    color: #7a4f00;
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.mini-btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.btn-secondary {
    color: #4f3d53;
    background: #f3e9fa;
}

.btn-ghost {
    color: #5d4860;
    background: #fff;
    border: 1px solid #e8d7ee;
}

.bottom-card {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 452px;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 40;
}

.bottom-card p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.footer-actions {
    display: flex;
    gap: 6px;
}

.mini-btn {
    background: #fff;
    padding: 8px 10px;
    font-size: 0.75rem;
    border: 1px solid #ead8ef;
}

.cart-drawer {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: min(92vw, 420px);
    background: #fff;
    z-index: 120;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

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

.cart-drawer header,
.cart-drawer footer {
    padding: 16px;
    border-bottom: 1px solid #f1e6f1;
}

.cart-drawer footer {
    border-bottom: 0;
    border-top: 1px solid #f1e6f1;
    margin-top: auto;
}

.cart-drawer h2 {
    margin: 0;
    font-size: 1.1rem;
}

.cart-items {
    padding: 14px;
    display: grid;
    gap: 10px;
    overflow-y: auto;
}

.cart-item {
    border: 1px solid #f0e1ef;
    border-radius: 14px;
    padding: 10px;
    display: grid;
    gap: 6px;
}

.cart-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.qty-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.qty-btn {
    border: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f5ebf8;
    font-weight: 800;
    cursor: pointer;
}

.remove-link {
    background: transparent;
    border: 0;
    color: var(--danger);
    font-weight: 700;
    cursor: pointer;
}

.cart-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(46, 21, 39, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 110;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.checkout-card,
.panel-card,
.empty-state {
    border-radius: var(--radius);
    padding: 14px;
}

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

label {
    font-weight: 700;
    font-size: 0.88rem;
}

.input,
textarea,
select {
    width: 100%;
    border: 1px solid #ead8ef;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    font-size: 16px;
}

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

.inline-actions {
    display: flex;
    gap: 8px;
}

.order-item-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px dashed #ead8ef;
}

.total-box {
    margin-top: 10px;
    background: #fff;
    border: 1px solid #f0e3f5;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(46, 21, 39, 0.45);
}

.modal.active {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 16px;
    animation: modalIn 0.2s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalIn {
    from { transform: translateY(20px); opacity: 0.3; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 12px;
}

.modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.modal-desc,
.modal-ing {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.quantity-picker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 14px;
}

.quantity-value {
    font-weight: 800;
    min-width: 24px;
    text-align: center;
}

/* Admin */
body.admin-body {
    background: linear-gradient(180deg, #fff9fd, #efe6f6);
}

.admin-shell {
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.admin-top {
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.admin-top h1 {
    margin: 0;
    font-size: 1.25rem;
}

.admin-grid {
    display: grid;
    gap: 14px;
}

.admin-card {
    border-radius: var(--radius);
    padding: 14px;
}

.admin-card h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.admin-form-grid {
    display: grid;
    gap: 10px;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #f0e4f2;
    vertical-align: top;
    font-size: 0.88rem;
}

.status-pill {
    display: inline-block;
    font-size: 0.75rem;
    border-radius: 999px;
    padding: 4px 8px;
    font-weight: 800;
}

.status-ativo {
    background: #dff4e4;
    color: #1f7a34;
}

.status-pausado {
    background: #ffe8e8;
    color: #b83d3d;
}

.alert {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

.alert-success {
    background: #dff4e4;
    color: #1f7a34;
}

.alert-error {
    background: #ffe8e8;
    color: #b83d3d;
}

.login-shell {
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    border-radius: var(--radius);
    padding: 18px;
}

.login-card h1 {
    margin: 0 0 4px;
    font-family: 'Fraunces', serif;
}

.login-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.hidden {
    display: none !important;
}
