.container {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 12px;
    background-color: var(--secondary-alt);
    color: white;
    border-radius: 25px;
}

.cart-icon.animated {
    animation: pulse 1.5s infinite;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product h3 {
    margin-bottom: 10px;
}

.product p {
    color: #666;
    margin-bottom: 15px;
}

.product .price {
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #45a049;
}

/* Cart Sidebar Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: var(--primary);
}

.cart-header h4 {
    color: white;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.cart-sidebar #orderForm {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    height: calc(100% - 60px);
}

.cart-items {
    overflow-y: auto;
    padding: 12px;
}

.cart-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #333;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.quantity-btn {
    background-color: #f0f0f0;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
}

.quantity {
    margin: 0 10px;
}

.cart-footer {
    position: relative;
    width: 100%;
    background-color: var(--gray-light);
    padding: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: bold;
}

.checkout-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 40px;
}

.checkout-btn:hover {
    background-color: var(--secondary-action);
}

.empty-cart {
    text-align: center;
    margin: 56px 0;
    color: var(--gray);
}

#ticket .summaryContainer {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 2rem 0;
}

.panel-item {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 4px;
    align-items: start;
}

.panel-item .input-comments-product {
    grid-column: 1 / span 2;
    width: 100%;
}


.panel-item .item-qty-title {
    display: flex;
    gap: 12px;
    align-items: start;
}

.panel-item .input-group-editar {
    display: flex;
}

.panel-item .item-title {
    max-width: 170px;
    font-size: 18px;
    font-family: "font-noto-bold";
}

.panel-item .modifier {
    font-family: "font-noto";
    font-size: 10px;
    line-height: 16px;
}

.panel-item .input-group-editar .txtAmountColl {
    width: 44px;
    text-align: center;
    border: none;
}

.panel-item .input-group-editar .btn {
    background-color: var(--gray-alt);
    border: none;
    color: var(--secondary);
}

.modifier-container {
    font-size: 12px;
    font-weight: normal;
    font-family: "font-noto";
}

#ticket .panel-item.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

#cartSidebar .delivery-address-description {
    text-align: right;
}

#cartSidebar .delivery-address-description.invalid {
    color: var(--secondary-alt);
}

#ordenar:disabled {
    background-color: var(--gray-light);
    color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 90vw; /* Slightly smaller than full width for better UX */
        height: 100vh;
        right: -90vw; /* Start off-screen to the right */
        left: auto;
        bottom: auto;
        top: 0;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 20px 0 0 20px; /* Rounded left corners only */
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
        /* Enable GPU acceleration for smooth dragging */
        will-change: transform;
    }
    
    .cart-sidebar.active {
        right: 0;
    }
    
    .cart-sidebar.dragging {
        transition: none;
    }
    
    .cart-header {
        cursor: grab;
        min-height: 60px;
        border-radius: 20px 0 0 0; /* Only top-left rounded */
        background: var(--primary);
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 16px 24px;
        user-select: none;
    }
    
    .cart-header:active {
        cursor: grabbing;
    }
    
    /* Add drag handle for visual indicator */
    .cart-header::before {
        content: '';
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 24px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 2px;
    }

    .cart-sidebar:not(.active) .cart-header .close-cart {
        display: none;
    }

    .panel-item .item-title {
        max-width: 145px;
        font-size: 16px;
    }

    .panel-item .item-qty-title img {
        width: 150px;
    }
    #ticket .summaryContainer {
        padding: .5rem 0;
    }

    #total {
        margin-bottom: 6px;
    }

    .cart-total {
        margin-bottom: 12px;
    }
    
    /* Add flexible cart items area */
    .cart-items {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure footer stays at bottom */
    .cart-footer {
        background: white;
        border-top: 1px solid #eee;
        border-radius: 0 0 0 20px;
        padding: 1rem 2rem;
    }
}

/* Add body scroll prevention for mobile */
@media (max-width: 768px) {
    body.cart-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}