:root {
    --brand-primary: #1f2937;
    --brand-secondary: #16a34a;
    --header-bg: #1f2937;
    --header-text: #ffffff;
    --cart-button-bg: #1f2937;
    --cart-button-text: #ffffff;
    --add-cart-bg: #16a34a;
    --add-cart-text: #ffffff;
    --footer-bg: #1f2937;
    --footer-text: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border-color: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body.public-body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 28%),
        linear-gradient(180deg, #fffdf8 0%, #f8fafc 26%, #f3f6fb 100%);
    color: var(--text-main);
    font-family: "Segoe UI", Arial, sans-serif;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--header-bg) 92%, #ffffff 8%);
    border-bottom: 1px solid color-mix(in srgb, var(--header-bg) 82%, #ffffff 18%);
}

.site-header__inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    color: var(--header-text);
}

.brand-block__logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(31, 41, 55, 0.12));
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: var(--shadow-soft);
}

.brand-block__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-block__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-block__content strong {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-block__content small {
    color: color-mix(in srgb, var(--header-text) 72%, transparent);
}

.site-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-whatsapp {
    width: 46px;
    min-width: 46px;
    padding: 0;
    background: #ecfdf3;
    border: 1px solid #b7f0c7;
    color: #166534;
    border-radius: 14px;
    font-size: 1.2rem;
}

.btn-whatsapp:hover {
    background: #dcfce7;
    color: #14532d;
}

.public-main {
    padding: 7.6rem 0 5.5rem;
}

.service-alert {
    margin-bottom: 1.5rem;
    padding: 0.95rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 18px;
    background: #fff7e6;
    border: 1px solid #f6d48a;
    color: #8a5200;
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.10);
}

.page-shell,
.card,
.table,
.modal-content,
.list-group-item,
.summary-card {
    border-radius: 22px;
}

.page-shell,
.summary-card,
.form-section,
.card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(229, 231, 235, 0.95);
    box-shadow: var(--shadow-soft);
}

.page-shell {
    padding: 1.5rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.section-heading h1,
.section-heading h2,
.section-heading h3 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2.15rem);
    font-weight: 800;
    color: var(--text-main);
}

.section-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.schedule-banner {
    margin-bottom: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border-left: 5px solid var(--danger);
    background: #fff1f2;
    color: #881337;
}

.schedule-banner--open {
    border-left-color: #16a34a;
    background: #ecfdf3;
    color: #166534;
}

.schedule-banner--closed {
    border-left-color: var(--danger);
    background: #fff1f2;
    color: #881337;
}

.category-nav {
    margin-bottom: 1.5rem;
    gap: 0.7rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
}

.category-nav .nav-link {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.75rem 1.15rem;
    white-space: nowrap;
}

.category-nav .nav-link.active,
.category-nav .nav-link:hover,
.category-nav .nav-link:focus,
.category-nav .nav-link:active {
    background: var(--cart-button-bg);
    border-color: var(--cart-button-bg);
    color: var(--cart-button-text);
}

.catalog-search {
    position: relative;
    margin-bottom: 0.5rem;
}

.catalog-search__icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.catalog-search__input {
    min-height: 52px;
    padding-left: 2.85rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.product-card {
    height: 100%;
    overflow: hidden;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.25rem;
}

.product-card__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f8fafc;
}

.product-card__meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.product-card__price {
    color: var(--product-price-color);
    font-size: 1.3rem;
    font-weight: 800;
}

.product-card__stock {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.btn-success {
    --bs-btn-color: var(--add-cart-text);
    --bs-btn-bg: var(--add-cart-bg);
    --bs-btn-border-color: var(--add-cart-bg);
    --bs-btn-hover-color: var(--add-cart-text);
    --bs-btn-hover-bg: color-mix(in srgb, var(--add-cart-bg) 88%, #000000 12%);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--add-cart-bg) 88%, #000000 12%);
    --bs-btn-focus-shadow-rgb: 0, 0, 0;
    --bs-btn-active-color: var(--add-cart-text);
    --bs-btn-active-bg: color-mix(in srgb, var(--add-cart-bg) 82%, #000000 18%);
    --bs-btn-active-border-color: color-mix(in srgb, var(--add-cart-bg) 82%, #000000 18%);
    --bs-btn-disabled-color: var(--add-cart-text);
    --bs-btn-disabled-bg: var(--add-cart-bg);
    --bs-btn-disabled-border-color: var(--add-cart-bg);
    background: var(--add-cart-bg);
    border-color: var(--add-cart-bg);
    color: var(--add-cart-text);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.btn-check:checked + .btn-success,
.btn-check:active + .btn-success {
    box-shadow: none;
}

.btn-primary {
    --bs-btn-color: var(--cart-button-text);
    --bs-btn-bg: var(--cart-button-bg);
    --bs-btn-border-color: var(--cart-button-bg);
    --bs-btn-hover-color: var(--cart-button-text);
    --bs-btn-hover-bg: color-mix(in srgb, var(--cart-button-bg) 88%, #000000 12%);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--cart-button-bg) 88%, #000000 12%);
    --bs-btn-focus-shadow-rgb: 0, 0, 0;
    --bs-btn-active-color: var(--cart-button-text);
    --bs-btn-active-bg: color-mix(in srgb, var(--cart-button-bg) 82%, #000000 18%);
    --bs-btn-active-border-color: color-mix(in srgb, var(--cart-button-bg) 82%, #000000 18%);
    --bs-btn-disabled-color: var(--cart-button-text);
    --bs-btn-disabled-bg: var(--cart-button-bg);
    --bs-btn-disabled-border-color: var(--cart-button-bg);
    background: var(--cart-button-bg);
    border-color: var(--cart-button-bg);
    color: var(--cart-button-text);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
    box-shadow: none;
}

.btn-outline-primary {
    --bs-btn-color: color-mix(in srgb, var(--cart-button-bg) 76%, #111827 24%);
    --bs-btn-border-color: color-mix(in srgb, var(--cart-button-bg) 28%, #cbd5e1 72%);
    --bs-btn-hover-color: var(--cart-button-text);
    --bs-btn-hover-bg: var(--cart-button-bg);
    --bs-btn-hover-border-color: var(--cart-button-bg);
    --bs-btn-focus-shadow-rgb: 0, 0, 0;
    --bs-btn-active-color: var(--cart-button-text);
    --bs-btn-active-bg: var(--cart-button-bg);
    --bs-btn-active-border-color: var(--cart-button-bg);
    background: transparent;
    border-color: color-mix(in srgb, var(--cart-button-bg) 28%, #cbd5e1 72%);
    color: color-mix(in srgb, var(--cart-button-bg) 76%, #111827 24%);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background: var(--cart-button-bg);
    border-color: var(--cart-button-bg);
    color: var(--cart-button-text);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

.table {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(229, 231, 235, 0.95);
}

.table thead th {
    background: #f8fafc;
    color: var(--text-main);
    border-bottom-width: 1px;
}

.form-section,
.summary-card {
    padding: 1.4rem;
}

#modalOpcionais .modal-dialog {
    width: min(100% - 1.5rem, 560px);
    margin: 0.75rem auto;
}

#formOpcionais {
    width: 100%;
}

#modalOpcionais .modal-content {
    overflow: hidden;
}

#modalOpcionais .modal-body {
    max-height: min(55vh, 460px);
    overflow-y: auto;
}

#modalOpcionais .modal-section-block {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 18px;
    background: #f8fafc;
}

#modalOpcionais .modal-footer {
    flex-direction: column;
    gap: 0.75rem;
}

#modalOpcionais .quantity-picker {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
}

#modalOpcionais .quantity-picker__button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(31, 41, 55, 0.12);
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    font-size: 1.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#modalOpcionais .quantity-picker__value {
    min-width: 32px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

#modalOpcionais .modal-footer .btn {
    width: 100%;
}

#modalOpcionais .modal-extra-button {
    margin-bottom: 0.15rem;
}

#modalOpcionais .modal-extra-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.summary-card .list-group-item {
    border-radius: 16px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(229, 231, 235, 0.95);
}

.order-steps {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.order-step {
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-muted);
    text-align: left;
}

.order-step strong,
.order-step small {
    display: block;
}

.order-step strong {
    font-size: 0.95rem;
    color: inherit;
}

.order-step.is-active {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--text-main);
}

.order-step.is-done {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.site-footer {
    padding: 1.2rem 0 1.8rem;
    border-top: 1px solid color-mix(in srgb, var(--footer-bg) 82%, #ffffff 18%);
    background: color-mix(in srgb, var(--footer-bg) 94%, #ffffff 6%);
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer__inner strong,
.site-footer__inner small,
.site-footer__inner a {
    display: block;
}

.site-footer__inner strong {
    color: var(--footer-text);
}

.site-footer__inner small,
.site-footer__inner a {
    color: color-mix(in srgb, var(--footer-text) 72%, transparent);
    text-decoration: none;
}

.site-footer__inner a:hover {
    color: var(--footer-text);
}

.produto-esgotado {
    opacity: 0.62;
}

.cart-feedback {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1080;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px));
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-align: center;
    min-width: min(320px, calc(100vw - 2rem));
}

.cart-feedback.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.mobile-cart-summary {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 1040;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.85rem;
    align-items: center;
    min-width: 280px;
    max-width: min(360px, calc(100vw - 2rem));
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: var(--cart-button-bg);
    color: var(--cart-button-text);
    text-decoration: none;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2);
    transform: translateY(calc(100% + 1rem));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.mobile-cart-summary.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-cart-summary__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mobile-cart-summary__content strong,
.mobile-cart-summary__content small,
.mobile-cart-summary__total,
.mobile-cart-summary__action {
    display: block;
    color: inherit;
}

.mobile-cart-summary__content strong {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.mobile-cart-summary__content small {
    opacity: 0.76;
}

.mobile-cart-summary__total {
    font-size: 1.05rem;
    font-weight: 800;
    text-align: right;
}

.mobile-cart-summary__action {
    grid-column: 1 / -1;
    font-size: 0.92rem;
    opacity: 0.84;
}

@media (max-width: 768px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
    }

    .brand-block {
        min-width: 0;
        grid-column: 1;
        grid-row: 1;
    }

    .site-header__actions .btn-whatsapp {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .public-main {
        padding-top: 8.8rem;
        padding-bottom: 6.8rem;
    }

    .page-shell,
    .form-section,
    .summary-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .product-card__image {
        height: 200px;
    }

    .site-footer__inner {
        text-align: center;
        justify-content: center;
    }

    #modalOpcionais .modal-dialog {
        width: calc(100% - 1rem);
        max-width: calc(100% - 1rem);
        margin: auto;
        min-height: calc(100dvh - 1rem);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #modalOpcionais .modal-content {
        border-radius: 24px;
        max-height: calc(100vh - 1rem);
    }

    #modalOpcionais .modal-header,
    #modalOpcionais .modal-body,
    #modalOpcionais .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #modalOpcionais .modal-body {
        max-height: calc(100vh - 210px);
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    #modalOpcionais .modal-footer {
        justify-content: stretch;
    }

    #modalOpcionais .modal-footer .btn {
        width: 100%;
    }

    #modalOpcionais .form-check-inline {
        width: 100%;
        display: flex;
        align-items: flex-start;
        gap: 0.55rem;
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .mobile-cart-summary {
        left: 0.85rem;
        right: 0.85rem;
        bottom: 0.85rem;
        min-width: 0;
        max-width: none;
    }
}
