/* Motor de Catálogo */
.bio6-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.bio6-modal-content {
    background: var(--bio6-card-bg, #fff);
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: var(--bio6-text-color, #333);
}
@media(min-width: 768px) {
    .bio6-modal-backdrop { align-items: center; }
    .bio6-modal-content { border-radius: 12px; }
}
.bio6-modal-close {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}
.bio6-modal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}
@media(min-width: 768px) { .bio6-modal-img { border-radius: 12px 12px 0 0; } }

.bio6-modal-body { padding: 20px; }
.bio6-modal-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 5px; }
.bio6-modal-desc { font-size: 0.9rem; opacity: 0.8; margin-bottom: 10px; }
.bio6-modal-price { font-size: 1.1rem; font-weight: bold; color: var(--bio6-primary, #4caf50); margin-bottom: 20px; }

.bio6-options-group { margin-bottom: 20px; }
.bio6-options-title { font-weight: bold; margin-bottom: 10px; font-size: 0.95rem; }
.bio6-options-title span { font-size: 0.8rem; color: #888; font-weight: normal; }
.bio6-option-label {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
}
.bio6-option-label input { margin-right: 10px; }
.bio6-option-label span { flex: 1; display: flex; justify-content: space-between; font-size: 0.9rem; }
.bio6-option-label small { font-weight: bold; }

.bio6-modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    background: var(--bio6-card-bg, #fff);
    padding-top: 10px;
}
.bio6-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
}
.bio6-qty-ctrl button {
    background: transparent; border: none; font-size: 1.2rem; width: 40px; height: 40px; cursor: pointer; color: inherit;
}
.bio6-qty-ctrl input {
    width: 40px; text-align: center; border: none; background: transparent; font-weight: bold; color: inherit; pointer-events: none;
}
.bio6-modal-footer .bio6-btn-primary {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

/* Drawer / Sacola */
.bio6-cart-drawer {
    position: fixed;
    top: 0; right: -400px; bottom: 0;
    width: 100%; max-width: 400px;
    background: var(--bio6-bg-color, #f9f9f9);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    color: var(--bio6-text-color, #333);
}
.bio6-cart-drawer.open { right: 0; }
.bio6-cart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}
.bio6-drawer-header {
    display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.bio6-drawer-header h3 { margin: 0; font-size: 1.1rem; }
.bio6-drawer-close { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: inherit; }
.bio6-drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.bio6-cart-item { border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 15px; margin-bottom: 15px; }
.cart-item-main { display: flex; justify-content: space-between; font-weight: bold; font-size: 0.95rem; margin-bottom: 5px; }
.cart-item-choice, .cart-item-addon { font-size: 0.85rem; opacity: 0.7; }
.cart-item-actions { display: flex; align-items: center; margin-top: 10px; gap: 15px; }
.cart-item-actions button { background: rgba(0,0,0,0.05); border: none; border-radius: 4px; width: 28px; height: 28px; cursor: pointer; color: inherit; }
.cart-item-actions span { font-weight: bold; font-size: 0.9rem; }
.cart-item-actions .cart-item-remove { width: auto; background: transparent; color: #d32f2f; font-size: 0.85rem; padding: 0; margin-left: auto; }

.bio6-drawer-footer { padding: 20px; background: var(--bio6-card-bg, #fff); border-top: 1px solid rgba(0,0,0,0.05); }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; }
.cart-summary-row.discount { color: #4caf50; }
.cart-summary-row.total { font-weight: bold; font-size: 1.1rem; margin-bottom: 20px; }
.btn-checkout { width: 100%; text-align: center; justify-content: center; padding: 15px; font-size: 1rem; }

/* FAB */
.bio6-cart-fab {
    position: fixed;
    bottom: 20px; right: 20px;
    background: var(--bio6-primary, #000);
    color: #fff;
    width: 60px; height: 60px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
}
.bio6-cart-counter {
    position: absolute;
    top: 5px; right: 5px;
    background: #ff3b30;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Food Preset iFood-like List */
.catalog-preset-food .bio6-product-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.catalog-preset-food .bio6-product-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: transparent;
    cursor: pointer;
    box-shadow: none;
    border-radius: 0;
}
.catalog-preset-food .bio6-product-card:last-child {
    border-bottom: none;
}
.catalog-preset-food .bio6-product-info {
    flex: 1;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.catalog-preset-food .bio6-product-name {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: var(--bio6-text-color, #3e3e3e);
}
.catalog-preset-food .bio6-product-desc {
    font-size: 0.85rem;
    color: var(--bio6-text-secondary, #717171);
    margin: 0 0 8px 0;
    line-height: 1.3;
}
.catalog-preset-food .bio6-product-price-action {
    display: flex;
    align-items: center;
}
.catalog-preset-food .bio6-product-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--bio6-primary, #10b981);
}
.catalog-preset-food .bio6-product-image,
.catalog-preset-food .bio6-product-image.fallback {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.catalog-preset-food .bio6-product-image.fallback {
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
}

/* Recommended Section */
.bio6-recommended-section {
    padding: 15px 20px;
    background: var(--bio6-bg-color, #f9f9f9);
    border-top: 1px solid rgba(0,0,0,0.05);
}
.bio6-recommended-section h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}
.bio6-recommended-list {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
}
.bio6-recommended-item {
    background: var(--bio6-card-bg, #fff);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 10px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bio6-recommended-item .rec-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bio6-recommended-item .rec-price {
    font-size: 0.85rem;
    color: var(--bio6-primary, #10b981);
}
.bio6-recommended-item .bio6-btn-outline {
    margin-top: auto;
    padding: 4px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid var(--bio6-primary, #10b981);
    color: var(--bio6-primary, #10b981);
    cursor: pointer;
}
.cart-items-title {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 15px;
}
.cart-summary-title {
    margin: 0 0 15px 0;
    font-size: 1rem;
}

/* NEW FOOD CSS */
.bio6-food-product-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
}
.bio6-food-product-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
}
.bio6-food-product-item:hover {
    background: rgba(0,0,0,0.02);
}
.bio6-food-product-item:last-child {
    border-bottom: none;
}
.bio6-food-product-text {
    flex: 1;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bio6-food-product-text .food-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary, #333);
}
.bio6-food-product-text .food-desc {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    margin: 0 0 8px 0;
    line-height: 1.4;
}
.bio6-food-product-text .food-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--bio6-primary, #10b981);
}
.bio6-food-product-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.bio6-food-product-thumb.fallback {
    background: #f1f1f1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #aaa;
}

/* === ONDA 4H.8 - PIXEL PARITY === */
.ls-tab-card.is-catalog-active {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    transition: background-color 0.3s ease;
}
.ls-tab-card.is-catalog-active .ls-tab-buttons {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}
.ls-tab-card.is-catalog-active .ls-tab-button {
    color: #1a1a1a !important;
}
.ls-tab-card.is-catalog-active .ls-tab-button.active {
    color: var(--bio6-primary, #10b981) !important;
    border-bottom-color: var(--bio6-primary, #10b981) !important;
}
.ls-tab-card.is-catalog-active .bio6-catalog-title,
.ls-tab-card.is-catalog-active .cat-title {
    color: #1a1a1a !important;
}

/* Category Nav Parity */
.header-sticky {
    position: sticky;
    top: -1px;
    background: #ffffff;
    z-index: 10;
    margin: 0 -20px 10px -20px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-cats {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    scrollbar-width: none;
}
.nav-cats::-webkit-scrollbar {
    display: none;
}
.nav-link-cat {
    white-space: nowrap;
    text-decoration: none;
    color: #444;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f5f5f5;
    transition: background 0.2s;
}
.nav-link-cat:hover {
    background: #e0e0e0;
}

/* Fix product items for white background */
.bio6-food-product-item {
    border-bottom: 1px solid #f0f0f0 !important;
}
.bio6-food-product-text .food-name {
    font-size: 1rem !important;
    color: #3e3e3e !important;
}
.bio6-food-product-text .food-desc {
    color: #717171 !important;
}

/* Drawer UI Improvements */
.bio6-drawer-footer .bio6-checkout-btn {
    background-color: var(--bio6-primary, #10b981) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 14px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
}
.bio6-drawer-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e0e0e0 !important;
    color: #1a1a1a !important;
}
.cart-items-title {
    font-size: 0.9rem;
    color: #717171;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}
.cart-summary-title {
    font-size: 0.9rem;
    color: #717171;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 15px;
    font-weight: 600;
}
.cart-coupon-placeholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
    cursor: not-allowed;
}
.cart-coupon-placeholder i {
    color: var(--bio6-primary, #10b981);
}

/* === ONDA 4H.9 - CONTEXTUAL CART BAR (iFood Style) === */
.bio6-cart-context-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bio6-primary, #10b981);
    border: none;
    border-radius: 50px;
    padding: 8px 16px 8px 8px;
    margin: 20px auto;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.bio6-cart-context-bar:active {
    transform: scale(0.98);
}
.bio6-cart-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bio6-cart-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bio6-cart-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
}
.bio6-cart-context-text {
    flex: 1;
    text-align: left;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}
.bio6-cart-context-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bio6-cart-context-total {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bio6-cart-context-count {
    margin-left: auto;
    flex: 0 0 32px;
    background: #fff;
    color: var(--bio6-primary, #10b981);
    font-weight: 700;
    font-size: 0.9rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === ONDA 4H.13 - ORDER SUMMARY SPACING FIX === */
/* Paddings extras removidos para alinhamento com bio6-drawer-body padding: 20px */
.bio6-order-summary-container {
    margin-top: 20px;
}

.bio6-cart-summary .summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 8px;
    color: #3f3f46;
    font-size: 0.95rem;
    line-height: 1.35;
}

.bio6-cart-summary .summary-line span:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.bio6-cart-summary .summary-line span:last-child {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
    font-weight: 500;
}

.bio6-cart-summary .summary-line.discount {
    color: var(--bio6-primary, #10b981);
}

.bio6-cart-summary .summary-line.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: #18181b;
    font-size: 1rem;
    font-weight: 700;
}

.bio6-drawer-footer {
    padding: 16px 20px 22px;
    box-sizing: border-box;
}
