/* Grupo Ilha Custom Styles */
:root {
    --grupo-ilha-primary: #A52A2A;
    --grupo-ilha-secondary: #FF6B35;
}

.navbar-logo {
    max-height: 180px;
}

@media (max-width: 991px) {
    .navbar-logo {
        max-height: 80px;
    }
}

@media (max-width: 768px) {
    .navbar-logo {
        max-height: 64px;
    }
}
.btn-grupo-ilha-primary {
    background-color: var(--grupo-ilha-primary);
    border-color: var(--grupo-ilha-primary);
    color: white;
}

.btn-grupo-ilha-primary:hover {
    background-color: #8B1F1F;
    border-color: #8B1F1F;
    color: white;
}

.btn-grupo-ilha-secondary {
    background-color: var(--grupo-ilha-secondary);
    border-color: var(--grupo-ilha-secondary);
    color: white;
}

.btn-grupo-ilha-secondary:hover {
    background-color: #E55A2E;
    border-color: #E55A2E;
    color: white;
}

.text-grupo-ilha-primary {
    color: var(--grupo-ilha-primary) !important;
}

.text-grupo-ilha-secondary {
    color: var(--grupo-ilha-secondary) !important;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--grupo-ilha-secondary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

.cart-icon {
    position: relative;
    display: inline-block;
}

.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    background-color: var(--grupo-ilha-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.floating-cart:hover {
    background-color: #8B1F1F;
    transform: scale(1.1);
    color: white;
}

.toast-container-mobile {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1055;
    width: 90%;
    max-width: 400px;
}

.toast-container-desktop {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
}

@media (max-width: 768px) {
    .toast-container-desktop {
        display: none;
    }
}

@media (min-width: 769px) {
    .toast-container-mobile {
        display: none;
    }
}

/* New Promotion Cards - Following Reference Image Layout */
.promotion-card-new {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
}

.promotion-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Header with meal period and date */
.promotion-header {
    /* background: linear-gradient(135deg, #2c3e50, #3498db); */
    display: flex;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-wrap: wrap;
    flex-direction: row;
    min-height: 30px;
    z-index: 5;
}

.meal-period {
    display: flex;
    font-weight: 700;
    font-size: 1rem;
    width: 70%;
    overflow: inherit;
    align-content: center;
    padding: 12px 0px;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

.promotion-date {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Discount Badge */
.discount-badge {
    display: flex;
    top: 16px;
    right: 16px;
    padding: 12px 0px;
    font-size: 1rem;
    font-weight: bold;
    width: 30%;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

/* Product Image */
.product-image-container {
    margin-top: 0px;
    position: relative;
    /* height: 240px; */
    overflow: hidden;
    /* background: #f8f9fa; */
    z-index: 0;
}

.product-image {
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.promotion-card-new:hover .product-image {
    transform: scale(1.05);
}

/* Card Content */
.promotion-card-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    /* min-height: 100px; */
}

.promotion-card-footer {
    padding: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: nowrap;
    align-items: center;
}

.promotion-title-new {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-description {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 0px;
    line-height: 1.4;
    flex-grow: 1;
}

/* Pricing Section */
.pricing-section {
    display: flex;
    width: 45%;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    line-height: 1;
}

.original-price {
    color: #95a5a6;
    font-size: 0.8rem;
    text-decoration: line-through;
    font-weight: 500;
}

.promotional-price {
    color: #27ae60;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.promotional-price span{
    font-size: 0.8rem;
}

/* Buy Button */
.btn-comprar {
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 45%;
}

.btn-comprar:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.btn-comprar:active {
    transform: translateY(0);
}

button.btn-close {
    padding: 16px!important;
    font-size: 0.8rem!important
}

/* Tablet Responsiveness */
@media (max-width: 991px) and (min-width: 769px) {
    .meal-period {
        font-size: 1rem;
        padding: 12px 0px;
    }
    
    .product-image-container {
        margin-top: -6px;
        /* height: 200px; */
    }
    
    .promotional-price {
        font-size: 1.6rem;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .promotion-card-new {
        margin-bottom: 20px;
    }
    
    .promotion-header {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .meal-period {
        font-size: 1rem;
    }
    
    .product-image-container {
        margin-top: -6px;
        /* height: 200px; */
    }
    
    .promotion-card-content {
        /* padding: 16px; */
    }
    
    .promotion-title-new {
        font-size: 16px;
    }
    
    .promotional-price {
        font-size: 1.5rem;
    }
    
    .btn-comprar {
        padding: 10px 20px;
    }
}

/* ==================== MODAL LAYOUT - 4:3 IMAGE OPTIMIZED ==================== */

/* Wider Modal for Desktop */
@media (min-width: 769px) {
    #purchaseModal .modal-dialog.modal-lg {
        max-width: 1050px;
    }
}

/* Base Layout - Mobile First */
.purchase-modal-layout {
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

/* ==================== IMAGE SECTION ==================== */
.modal-image-section {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    align-items: center;
    justify-content: center;
    padding: 22px 0px;
}

.modal-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: visible;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.modal-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.modal-discount-badge {
    position: absolute;
    top: -16px;
    right: 16px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    z-index: 10;
    letter-spacing: 0.5px;
}

/* ==================== CONTENT SECTION ==================== */
.modal-content-section {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Countdown Timer */
.modal-countdown {
    text-align: center;
    margin-top: 0;
    padding: 8px 0 0 0;
}

.countdown-text {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 500;
}

#countdownTimer {
    font-weight: 600;
    color: #27ae60;
    font-family: 'Courier New', monospace;
}

/* Top Badges Row */
.modal-badges-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.modal-meal-badge,
.modal-date-badge {
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.modal-meal-badge {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.modal-date-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

/* Main Info */
.modal-main-info {
    flex: 0;
}

.modal-promotion-title {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    text-transform: uppercase;
}

.modal-product-name {
    color: #7f8c8d;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-description {
    color: #5d6d7e;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Info Tags */
.modal-info-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.info-tag {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    color: #495057;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Pricing Section */
.modal-pricing {
    background: linear-gradient(135deg, #ecf7ed, #d5f4e6);
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #27ae60;
}

.price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.price-label-from {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
}

.price-original {
    color: #95a5a6;
    font-size: 16px;
    font-weight: 600;
    text-decoration: line-through;
}

.price-label-to {
    color: #27ae60;
    font-size: 14px;
    font-weight: 600;
    margin-left: 8px;
}

.price-promotional {
    color: #27ae60;
    font-size: 28px;
    font-weight: 800;
}

.savings-badge {
    background: #e74c3c;
    color: white;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

/* Unit Selection */
.modal-unit-section {
    flex: 0;
}

.unit-label {
    display: block;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.units-grid .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    background: white;
    color: #2c3e50;
    transition: all 0.2s ease;
    width: 100%;
}

.units-grid .form-select:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
    outline: none;
}

/* Action Button */
.modal-action-section {
    flex: 0;
}

.modal-add-to-cart-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.modal-add-to-cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.modal-add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

.modal-add-to-cart-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-price {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 18px;
}

/* ==================== DESKTOP LAYOUT (>768px) ==================== */
@media (min-width: 769px) {
    .purchase-modal-layout {
        flex-direction: row;
        min-height: 320px;
    }
    
    /* Image takes 52% on desktop (landscape 4:3) */
    .modal-image-section {
        flex: 0 0 52%;
        max-width: 52%;
    }
    
    .modal-image-container {
        min-height: 320px;
        aspect-ratio: 4 / 3;
        margin-top: 16px;
    }
    
    .modal-discount-badge {
        top: 32px;
        right: 12px;
        padding: 10px 18px;
        font-size: 15px;
        margin-top: -48px;
    }
    
    /* Content takes remaining space */
    .modal-content-section {
        flex: 1;
        padding: 22px 24px;
        gap: 12px;
    }
    
    .modal-badges-row {
        gap: 8px;
    }
    
    .modal-meal-badge,
    .modal-date-badge {
        font-size: 13px;
        padding: 8px 16px;
        line-height: 1;
    }
    
    .modal-promotion-title {
        font-size: 23px;
        margin-bottom: 4px;
    }
    
    .modal-product-name {
        font-size: 17px;
        margin-bottom: 8px;
    }
    
    .modal-description {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .modal-pricing {
        padding: 16px;
    }
    
    .price-promotional {
        font-size: 28px;
    }
    
    .savings-badge {
        font-size: 13px;
        padding: 5px 12px;
    }
    
    .modal-unit-section {
        margin-top: -4px;
    }
}

/* ==================== LARGE DESKTOP (>1200px) ==================== */
@media (min-width: 1200px) {
    .modal-promotion-title {
        font-size: 28px;
    }
    
    .modal-product-name {
        font-size: 20px;
    }
    
    .price-promotional {
        font-size: 36px;
    }
}

/* ==================== MOBILE OPTIMIZATIONS (<768px) ==================== */
@media (max-width: 768px) {
    .modal-content-section {
        padding: 14px;
        gap: 10px;
    }
    
    .modal-countdown {
        margin-top: 0;
        padding: 8px 0 0 0;
    }
    
    .countdown-text {
        font-size: 1.1rem;
    }
    
    .modal-badges-row {
        gap: 6px;
        margin-bottom: -2px;
    }
    
    .modal-meal-badge,
    .modal-date-badge {
        font-size: 11px;
        padding: 7px 12px;
        line-height: 1;
    }
    
    .modal-main-info {
        margin-bottom: -6px;
    }
    
    .modal-promotion-title {
        font-size: 17px;
        margin-bottom: 4px;
    }
    
    .modal-product-name {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .modal-description {
        font-size: 13px;
        line-height: 1.45;
    }
    
    .modal-info-tags {
        gap: 8px;
        margin-top: -2px;
    }
    
    .info-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .modal-pricing {
        padding: 12px;
        margin-top: -2px;
    }
    
    .price-promotional {
        font-size: 23px;
    }
    
    .savings-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .modal-unit-section {
        margin-top: -4px;
    }
    
    .modal-add-to-cart-btn {
        font-size: 15px;
        padding: 12px 16px;
    }
    
    .btn-price {
        font-size: 14px;
    }
}

/* Floating Cart Button - Updated Style */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-cart:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: scale(1.1);
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.cart-badge-floating {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 0;
    font-size: 0.7rem;
    min-width: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    background-color: #e74c3c !important;
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fixed Navbar for Desktop */
@media (min-width: 992px) {
    .navbar {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
}