/* =========================
   Shopping Cart Button
   ========================= */
.cart-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background: linear-gradient(to bottom, #E63946 0%, #C5303C 100%);
    border: 3px solid var(--italian-white);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 0 #8B1F28,
                0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #8B1F28,
                0 8px 25px rgba(0, 0, 0, 0.5);
}

.cart-toggle:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #8B1F28,
                0 4px 15px rgba(0, 0, 0, 0.4);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--italian-green);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* =========================
   Cart Sidebar
   ========================= */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, rgba(0, 146, 70, 0.1), rgba(206, 43, 55, 0.1));
}

.cart-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
    padding: 0.5rem;
}

.cart-close:hover {
    color: var(--italian-red);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
    font-style: italic;
}

.cart-item {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: var(--transition);
}

.cart-item:hover {
    border-color: var(--italian-green);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.cart-item-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--italian-red);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
}

.remove-btn:hover {
    transform: scale(1.2);
    color: #FF0000;
}

.cart-item-size {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.cart-item-comments {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin: 0.5rem 0;
    font-style: italic;
}

.cart-item-comments i {
    color: var(--italian-green);
    margin-right: 0.25rem;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-qty-control button {
    background: var(--italian-green);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
}

.cart-qty-control button:hover {
    background: var(--italian-red);
    transform: scale(1.1);
}

.cart-qty-control span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--italian-green);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--bg-light);
    background: var(--bg-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.cart-total span:last-child {
    color: var(--italian-green);
    font-size: 1.5rem;
}

.checkout-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to bottom, #00CC66 0%, #00A854 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 #006630,
                0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.checkout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #006630,
                0 8px 20px rgba(0, 0, 0, 0.4);
}

.checkout-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #006630,
                0 4px 10px rgba(0, 0, 0, 0.3);
}

.checkout-button i {
    margin-right: 0.5rem;
}

/* =========================
   Product Modal
   ========================= */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.product-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-image-container {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px 20px 0 0;
    overflow: visible;
    position: relative;
    cursor: pointer;
}

.modal-image-container:hover {
    opacity: 0.95;
}

/* Click to Expand Hint */
.click-to-expand-hint {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--italian-green), #00b359);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 146, 70, 0.3);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.click-to-expand-hint i {
    font-size: 1rem;
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Expand Button */
.modal-expand-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--italian-green);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-expand-button:hover {
    background: var(--italian-red);
    transform: scale(1.1);
}

/* Image Lightbox */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--italian-red);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: #FF0000;
    transform: rotate(90deg);
}

.lightbox-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.modal-image-container.placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.modal-image-container.coming-soon {
    flex-direction: column;
    padding: 30px;
}

.modal-image-container.coming-soon i {
    font-size: 3rem;
    color: #009246;
    margin-bottom: 15px;
}

.modal-image-container.coming-soon .coming-soon-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #009246;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--italian-red);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: #FF0000;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2.5rem 2rem 2rem 2rem;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    padding-right: 3rem;
}

.modal-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.modal-info {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 6px;
    border-left: 3px solid var(--italian-green);
}

.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.size-option {
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border: 2px solid var(--bg-light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-align: center;
}

.size-option:hover {
    border-color: var(--italian-green);
    background: white;
}

.size-option.active {
    background: var(--italian-green);
    color: white;
    border-color: var(--italian-green);
}

.modal-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 2px solid var(--bg-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--italian-green);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--italian-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--italian-red);
    transform: scale(1.1);
}

#modalQuantity {
    width: 80px;
    text-align: center;
    padding: 0.5rem;
    border: 2px solid var(--bg-light);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-price {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--italian-green);
    margin: 2rem 0;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(to bottom, #E63946 0%, #C5303C 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 0 #8B1F28,
                0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #8B1F28,
                0 10px 25px rgba(0, 0, 0, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #8B1F28,
                0 4px 15px rgba(0, 0, 0, 0.3);
}

.add-to-cart-btn i {
    margin-right: 0.5rem;
}

/* =========================
   Notification
   ========================= */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: var(--italian-green);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transform: translateX(500px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 1.2rem;
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .size-options {
        grid-template-columns: 1fr;
    }
    
    .cart-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}