.delivery-catalog,
.delivery-cart-box,
.delivery-auth-box,
.delivery-auth-grid,
.delivery-checkout-box {
    max-width: 1180px;
    margin: 32px auto;
    padding: 0 20px;
}

.delivery-tools {
    margin-bottom: 24px;
}

.delivery-search-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
}

.delivery-search-form input,
.delivery-product-form input,
.delivery-form input,
.delivery-form select,
.delivery-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.delivery-search-form button,
.delivery-cart-item button,
.delivery-product-form button,
.delivery-form button,
.delivery-submit-button {
    background: #2d7d46;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 0.96rem;
    cursor: pointer;
}

.delivery-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.delivery-product-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.delivery-product-image {
    background: #f5f5f5;
    min-height: 180px;
    display: grid;
    place-items: center;
    font-size: 3rem;
}

.delivery-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delivery-product-body {
    padding: 18px;
}

.delivery-tag {
    display: inline-block;
    background: #f1f8f3;
    color: #2d7d46;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.delivery-product-body h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.delivery-product-body p {
    color: #555;
    margin-bottom: 14px;
}

.delivery-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 700;
}

.delivery-form-inline {
    display: flex;
    gap: 10px;
}

.delivery-cart-box,
.delivery-checkout-box,
.delivery-auth-card,
.delivery-auth-box {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 24px;
}

.delivery-cart-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.delivery-cart-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: #555;
}

.delivery-quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.delivery-quantity-controls button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    color: #2d7d46;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.delivery-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    font-size: 1.1rem;
}

.delivery-auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.delivery-warning,
.delivery-notice {
    max-width: 1180px;
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 600;
}

.delivery-warning {
    background: #fff3d6;
    color: #8a5d00;
    border: 1px solid #f0d27d;
}

.delivery-notice {
    background: #e9f7ee;
    color: #20653a;
    border: 1px solid #b9e0c3;
}

.delivery-store-closed-notice,
.delivery-store-closed-banner {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid #efc2a3;
    border-radius: 12px;
    background: #fff5ed;
    color: #8a4b20;
}

.delivery-store-closed-notice {
    margin: 0 0 22px;
}

.delivery-store-closed-banner {
    margin: 18px 0;
    max-width: 560px;
}

.delivery-product-unavailable {
    display: block;
    padding: 11px 12px;
    border-radius: 8px;
    background: #f4f4f4;
    color: #777;
    font-size: 0.88rem;
    font-weight: 700;
}

.delivery-empty {
    color: #666;
}

.delivery-checkout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.delivery-checkout-summary {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.delivery-checkout-summary ul {
    margin: 12px 0 18px;
    padding-left: 18px;
}

@media (max-width: 768px) {
    .delivery-cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .delivery-cart-meta {
        align-items: flex-start;
    }
}

.delivery-floating-cart {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    background: #2b1b17;
    color: #fff;
    box-shadow: 0 16px 34px rgba(31, 18, 14, 0.28);
    cursor: pointer;
    text-align: left;
}

.delivery-floating-cart-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #c57550;
}

.delivery-floating-cart-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    line-height: 1.2;
}

.delivery-floating-cart-copy small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.68);
}

.delivery-modal[hidden] {
    display: none;
}

.delivery-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}

.delivery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 19, 15, 0.62);
}

.delivery-modal-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(880px, calc(100vh - 40px));
    overflow-y: auto;
    border-radius: 24px;
    background: #fffaf7;
    box-shadow: 0 26px 70px rgba(28, 15, 10, 0.3);
}

.delivery-modal-content {
    padding: 32px;
}

.delivery-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f4e8e1;
    color: #4d2e24;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.delivery-modal-intro {
    color: var(--muted);
}

.delivery-modal .delivery-auth-grid,
.delivery-modal .delivery-cart-box,
.delivery-modal .delivery-checkout-box,
.delivery-modal .delivery-auth-card,
.delivery-modal .delivery-auth-box {
    max-width: none;
    margin: 20px 0 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.delivery-modal .delivery-auth-grid {
    grid-template-columns: 1fr;
}

.delivery-modal .delivery-auth-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.delivery-modal .delivery-cart-item {
    flex-wrap: wrap;
}

.delivery-modal .delivery-checkout-box {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.delivery-modal .delivery-notice,
.delivery-modal .delivery-warning {
    margin: 14px 0 0;
}

.delivery-orders-box {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(58, 35, 28, 0.05);
}

.delivery-orders-list {
    display: grid;
    gap: 10px;
}

.delivery-order-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.delivery-order-item > div {
    display: grid;
    gap: 4px;
}

.delivery-order-item span {
    color: var(--muted);
    font-size: 0.85rem;
}

.delivery-order-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff3d9;
    color: #7a5300 !important;
    font-weight: 700;
}

.delivery-order-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.delivery-order-status.status-recebido,
.delivery-order-status.status-confirmado {
    background: #e5f0ff;
    color: #1558a6 !important;
}

.delivery-order-status.status-em_preparo {
    background: #fff0dc;
    color: #a95e00 !important;
}

.delivery-order-status.status-pronto,
.delivery-order-status.status-finalizado {
    background: #e3f6e9;
    color: #23743d !important;
}

.delivery-order-status.status-cancelado {
    background: #ffe5e5;
    color: #b42323 !important;
}

.delivery-order-info {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
}

.delivery-modal-refresh {
    position: absolute;
    top: 18px;
    right: 58px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.delivery-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 1002;
}

.delivery-profile-modal[hidden] {
    display: none;
}

.delivery-profile-modal-panel {
    position: relative;
    z-index: 2;
    width: min(560px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 24px auto;
    padding: 32px;
    border-radius: 16px;
    background: #fff;
}

.delivery-order-modal {
    position: fixed;
    inset: 0;
    z-index: 1001;
}

.delivery-order-modal[hidden] {
    display: none;
}

.delivery-order-modal-panel {
    position: relative;
    z-index: 2;
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 24px auto;
    padding: 32px;
    border-radius: 16px;
    background: #fff;
}

.delivery-order-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 20px 0;
}

.delivery-order-detail-grid div {
    display: grid;
    gap: 4px;
    padding: 12px;
    background: #faf6f1;
    border-radius: 8px;
}

.delivery-order-detail-grid span,
.delivery-order-detail-total span {
    color: var(--muted);
    font-size: 0.8rem;
}

.delivery-order-detail-items {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.delivery-order-detail-items li,
.delivery-order-detail-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.delivery-order-detail-total {
    margin-top: 12px;
    border-bottom: 0;
    font-size: 1.1rem;
}

.delivery-address-fields[hidden] {
    display: none;
}

body.delivery-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .delivery-floating-cart {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: calc(100% - 24px);
    }

    .delivery-modal-content {
        padding: 26px 18px;
    }

    .delivery-order-item {
        grid-template-columns: 1fr auto;
    }

    .delivery-order-item > strong:last-child {
        grid-column: 1 / -1;
    }

    .delivery-order-detail-grid {
        grid-template-columns: 1fr;
    }

    .delivery-order-modal-panel {
        padding: 24px 18px;
    }

    .delivery-order-actions {
        justify-content: flex-start;
    }

    .delivery-modal-refresh {
        right: 48px;
        max-width: 125px;
        font-size: 0.75rem;
    }

    .delivery-profile-modal-panel {
        padding: 24px 18px;
    }
}
