:root {
    --primary: #f5a400;
    --secondary: #ffb52e;
    --bg: #ffffff;
    --soft: #f7f7f7;
    --text: #111111;
    --muted: #666666;
    --success: #22c55e;
    --danger: #ef4444;
    --line: #e9e9e9;
    --shadow: 0 16px 45px rgba(17, 17, 17, .09);
    --radius: 8px;
    font-family: Inter, Poppins, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--soft); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .primary-btn, .primary-small, .floating-cart { cursor: pointer; }

.customer-shell { display: grid; min-height: 100vh; place-items: start center; padding: 18px; }
.phone-frame {
    width: min(100%, 430px);
    min-height: calc(100vh - 36px);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.app-screen { position: relative; min-height: calc(100vh - 36px); padding: 18px 16px 104px; background: var(--bg); }
.mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mobile-header div { min-width: 0; flex: 1; }
.mobile-header strong { display: block; font-size: 18px; }
.mobile-header small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-header.overlay { position: absolute; z-index: 5; inset: 16px 16px auto; }
.icon-btn, .cart-dot, .add-btn {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: var(--radius);
    background: var(--soft);
    font-weight: 800;
}
.cart-dot, .add-btn { background: var(--primary); color: #111; }
.cart-icon {
    position: relative;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #111;
    box-shadow: 0 8px 18px rgba(245, 164, 0, .28);
}
.cart-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #111;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cart-icon b {
    position: absolute;
    top: -8px;
    right: -8px;
    display: grid;
    min-width: 23px;
    height: 23px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(239, 68, 68, .25);
}
.home-search {
    display: block;
    margin: 0 0 12px;
}
.home-search input[type="hidden"] { display: none; }
.home-search input[name="q"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px;
    background: #fff;
    font-weight: 700;
}
.hero-banner {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    min-height: 0;
    padding: 0;
    border-radius: 14px;
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}
.hero-banner h1 { margin: 7px 0; max-width: 290px; font-size: 30px; line-height: 1.02; letter-spacing: 0; }
.hero-banner p { margin: 0 0 16px; max-width: 240px; color: #2a2a2a; }
.primary-btn, .primary-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius);
    background: #111;
    color: #fff;
    font-weight: 800;
}
.slider-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0; }
.slider-dots span { width: 7px; height: 7px; border-radius: 99px; background: #ddd; }
.slider-dots .active { width: 22px; background: var(--primary); }
.horizontal-list, .filter-row, .suggestions { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.category-pill, .filter-row button, .suggestions button, .kit-grid a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 10px 12px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0,0,0,.04);
}
.category-pill span { display: block; margin-bottom: 6px; font-size: 21px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 12px; }
.section-head h2, .detail-body h2, .smart-box h2 { margin: 0; font-size: 19px; }
.section-head a { color: var(--primary); font-weight: 800; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,.05);
}
.product-art { display: flex; height: 132px; align-items: flex-end; padding: 10px; color: #fff; font-weight: 800; background-repeat: no-repeat; background-position: center; }
.product-art span { padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,.28); font-size: 12px; }
.product-info { padding: 10px; }
.product-info strong { display: -webkit-box; min-height: 38px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; }
.product-info p { display: -webkit-box; min-height: 35px; margin: 6px 0 10px; overflow: hidden; color: var(--muted); -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price-row b { font-size: 15px; }
.add-btn { width: 34px; height: 34px; font-size: 22px; transition: transform .18s ease; }
.add-btn.added { transform: scale(1.15); background: var(--success); color: #fff; }
.combo-card, .club-card, .loyalty-card, .profile-card, .status-card, .summary-card, .smart-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--soft);
    border: 1px solid var(--line);
}
.combo-card { background: linear-gradient(135deg, #111, #30291a 52%, var(--primary)); color: #fff; }
.combo-card span { display: inline-block; padding: 5px 8px; border-radius: 999px; background: var(--danger); font-size: 12px; font-weight: 900; }
.combo-card h2 { margin: 12px 0 6px; }
.combo-card p { margin: 0 0 10px; color: #f8f8f8; }
.kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-order { width: 100%; margin-top: 18px; min-height: 48px; border: 0; border-radius: var(--radius); background: #111; color: #fff; font-weight: 900; }
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 9;
    width: min(calc(100% - 52px), 398px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    transform: translateX(-50%);
    box-shadow: var(--shadow);
}
.bottom-nav a { display: grid; place-items: center; gap: 2px; min-width: 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.bottom-nav span { font-size: 17px; }
.bottom-nav .active { color: var(--primary); }
.floating-cart {
    position: sticky;
    bottom: 82px;
    z-index: 8;
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #111;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(245,164,0,.32);
}
.search-bar { display: grid; grid-template-columns: 1fr 130px; gap: 8px; margin-bottom: 12px; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    background: #fff;
}
textarea { min-height: 92px; resize: vertical; }
.detail-art { display: flex; height: 310px; align-items: flex-end; padding: 24px; margin: -18px -16px 0; color: #fff; font-size: 30px; font-weight: 900; }
.detail-body { padding-top: 18px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row span { padding: 6px 9px; border-radius: 999px; background: #fff4d5; color: #8a5c00; font-size: 12px; font-weight: 900; }
.detail-body h1 { margin: 14px 0 6px; font-size: 28px; line-height: 1.08; }
.detail-body p { color: var(--muted); }
.detail-price { display: flex; align-items: baseline; gap: 10px; margin: 16px 0; }
.detail-price strong { font-size: 28px; }
.detail-price del { color: var(--muted); }
.qty-control { display: inline-grid; grid-template-columns: 42px 48px 42px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.qty-control button { height: 42px; border: 0; background: var(--soft); font-weight: 900; }
.qty-control span { text-align: center; font-weight: 900; }
.cart-list { display: grid; gap: 10px; }
.cart-item, .order-card, .profile-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.cart-item, .order-card { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.mini-art { width: 56px; height: 56px; border-radius: var(--radius); }
.cart-item small, .order-card small { display: block; color: var(--muted); }
.cart-actions { display: grid; gap: 5px; justify-items: end; font-size: 12px; }
.cart-actions a { color: var(--danger); font-weight: 800; }
.coupon-box { display: grid; grid-template-columns: 1fr 92px; gap: 8px; margin-top: 14px; }
.coupon-box button { border: 0; border-radius: var(--radius); background: #111; color: #fff; font-weight: 800; }
.summary-card { display: grid; gap: 12px; }
.summary-card div { display: flex; justify-content: space-between; gap: 12px; }
.summary-card .total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 20px; }
.checkout-form { display: grid; gap: 12px; }
.checkout-form label { display: grid; gap: 6px; color: var(--muted); font-weight: 700; }
.choice-grid { display: grid; gap: 8px; }
.choice-grid label { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.choice-grid input { width: auto; min-height: auto; }
.status-card a { color: var(--success); font-weight: 900; }
.timeline { list-style: none; padding: 0; margin: 18px 0; }
.timeline li { position: relative; min-height: 42px; padding-left: 32px; color: var(--muted); font-weight: 800; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #ddd; }
.timeline li.done { color: var(--text); }
.timeline li.done::before { background: var(--success); }
.fake-map, .mini-map { display: grid; min-height: 180px; place-items: center; border-radius: var(--radius); background: linear-gradient(135deg,#e5e7eb,#fff,#d1fae5); color: var(--muted); font-weight: 900; }
.avatar { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; background: #111; color: #fff; font-weight: 900; }
.loyalty-card div { height: 10px; overflow: hidden; border-radius: 99px; background: #e5e5e5; }
.loyalty-card div span { display: block; height: 100%; background: var(--primary); }
.account-menu { display: grid; gap: 8px; margin-top: 16px; }
.account-menu a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font-weight: 800;
}
.account-menu a small { color: var(--muted); font-size: 12px; font-weight: 600; }
.account-menu a b { grid-row: 1 / span 2; grid-column: 2; font-size: 20px; }
.account-profile small { display: block; color: var(--muted); font-weight: 700; }
.loyalty-head { display: flex !important; height: auto !important; justify-content: space-between; background: transparent !important; }
.account-list-card {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.account-list-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245,164,0,.18); }
.account-list-card div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.account-list-card p { margin: 0; font-weight: 800; }
.account-list-card small { color: var(--muted); }
.account-list-card span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary);
    color: #111;
    font-size: 11px;
    font-weight: 900;
}
.account-list-card a { color: var(--success); font-weight: 900; }


.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--soft); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px; background: #111; color: #fff; }
.brand-mark { display: grid; width: 46px; height: 46px; place-items: center; margin-bottom: 10px; border-radius: var(--radius); background: var(--primary); color: #111; font-weight: 900; }
.admin-sidebar nav { display: grid; gap: 6px; margin-top: 28px; }
.admin-sidebar a { padding: 11px 12px; border-radius: var(--radius); color: #d7d7d7; font-weight: 750; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(245,164,0,.16); color: #fff; }
.admin-main { min-width: 0; }
.admin-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
}
.store-toggle { display: flex; align-items: center; gap: 8px; font-weight: 900; color: var(--success); }
.store-toggle span { width: 10px; height: 10px; border-radius: 50%; background: var(--success); }
.primary-small { min-height: 40px; background: var(--primary); color: #111; }
.admin-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #111; color: #fff; font-weight: 900; }
.admin-page { padding: 24px; }
.admin-title { margin-bottom: 18px; }
.admin-title h1 { margin: 0; font-size: 32px; letter-spacing: 0; }
.admin-title p { margin: 6px 0 0; color: var(--muted); }
.metrics-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 14px; }
.metric-card, .panel, .promo-admin-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 28px rgba(0,0,0,.04);
}
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card strong { display: block; margin: 10px 0 5px; font-size: 24px; }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin-top: 14px; }
.wide { grid-column: span 2; }
.panel h2 { margin: 0 0 14px; font-size: 18px; }
.bar-chart { display: flex; align-items: end; gap: 12px; height: 220px; padding-top: 20px; }
.bar-chart span { flex: 1; min-width: 24px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg,var(--primary),#111); }
.donut { width: 150px; height: 150px; margin: 10px auto; border-radius: 50%; background: conic-gradient(var(--primary) 0 61%, #111 61% 82%, #e5e5e5 82%); }
.progress-line { display: grid; gap: 7px; margin: 12px 0; color: var(--muted); font-weight: 800; }
.progress-line b { height: 8px; border-radius: 999px; background: linear-gradient(90deg,var(--primary),#111); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.status-badge { display: inline-flex; padding: 6px 8px; border-radius: 999px; background: #eee; font-size: 12px; font-weight: 900; }
.status-badge.novo { background: #fff4d5; color: #8a5c00; }
.status-badge.entregue { background: #dcfce7; color: #166534; }
.status-badge.preparando, .status-badge.saiu-para-entrega { background: #e0f2fe; color: #075985; }
.ghost-btn, .toolbar button, .action-grid button { min-height: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 800; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.toolbar input { max-width: 360px; }
.drawer { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fffaf0; }
.action-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.form-grid h2, .form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: grid; gap: 6px; color: var(--muted); font-weight: 750; }
.cards-row, .report-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; }
.driver-card { display: grid; gap: 8px; }
.driver-card small { color: var(--muted); }
.promo-admin-card span { display: inline-block; padding: 6px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 900; }
.promo-admin-card h2 { margin: 12px 0 8px; }

@media (max-width: 1100px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .admin-sidebar nav { grid-template-columns: repeat(3, 1fr); }
    .metrics-grid, .dashboard-grid, .cards-row, .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wide { grid-column: span 1; }
}

@media (max-width: 680px) {
    .customer-shell { padding: 0; }
    .phone-frame, .app-screen { width: 100%; min-height: 100vh; border: 0; border-radius: 0; }
    .bottom-nav { bottom: 10px; width: calc(100% - 20px); }
    .admin-header, .form-grid, .metrics-grid, .dashboard-grid, .cards-row, .report-grid { grid-template-columns: 1fr; }
    .admin-sidebar nav { grid-template-columns: 1fr 1fr; }
    .admin-page { padding: 16px; overflow-x: auto; }
}

.customer-menu { position: relative; }
.customer-menu summary { list-style: none; }
.customer-menu summary::-webkit-details-marker { display: none; }
.customer-menu nav {
    position: absolute;
    z-index: 20;
    top: 50px;
    left: 0;
    width: 230px;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.customer-menu nav a {
    padding: 11px 12px;
    border-radius: var(--radius);
    font-weight: 800;
}
.customer-menu nav a:hover { background: var(--soft); }
.filter-row a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 10px 12px;
    font-weight: 700;
}
.quick-order {
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-search-form { display: block; width: 100%; }
.admin-search-form input { width: 100%; }
.toolbar form { display: flex; gap: 10px; width: min(560px, 100%); }
.toolbar form input { flex: 1; }
.suggestions a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 10px 12px;
    font-weight: 700;
}

.admin-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--line);
}
.product-image-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}
.product-image-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
}
.product-image-preview span {
    color: var(--muted);
    font-size: 13px;
    word-break: break-all;
}

.banner-slider {
    display: grid;
    gap: 10px;
}
.banner-slider .hero-banner:not(.active) {
    display: none;
}

.active-filter {
    background: var(--primary) !important;
    color: #111 !important;
    border-color: var(--primary) !important;
}
.selected-row td {
    background: #fff8e6;
}
.order-editor {
    margin-top: 14px;
}
@media print {
    .admin-sidebar, .admin-header, .toolbar, .action-grid, .panel:not(.order-editor) { display: none !important; }
    .admin-shell { display: block; }
    .admin-page { padding: 0; }
    .order-editor { box-shadow: none; border: 0; }
}

.product-art[style*="background-image"] {
    background-color: #f4f4f4;
}
.product-art[style*="background-image"] span {
    background: rgba(17,17,17,.52);
}
