:root {
    --navy: #000075;
    --burgundy: #960018;
    --dark: #121212;
    --ivory: #FEFEFA;
    --gold: #C4A267;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--ivory);
    background-image: linear-gradient(rgba(254, 254, 250, 0.92), rgba(254, 254, 250, 0.94)), 
                      url('https://images.unsplash.com/photo-1510812431401-41e2f9c2c0b4?q=80&w=2000');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 10rem;
    margin-bottom: 3rem;
    width: 100%;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .container {
        margin-top: 3rem;
    }
}

.cart-header {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(150, 0, 24, 0.1);
}

.cart-header h1 {
    color: var(--navy);
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-variant: small-caps;
}

.cart-header p {
    color: var(--burgundy);
    font-style: italic;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.cart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.cart-items {
    flex: 1;
    min-width: 300px;
    background-color: var(--ivory);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--burgundy);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(150, 0, 24, 0.1);
}

.cart-items::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--navy), var(--burgundy));
    z-index: 2;
}

.cart-items::after {
    content: '🍷';
    position: absolute;
    bottom: -30px;
    right: -30px;
    font-size: 180px;
    opacity: 0.03;
    z-index: 0;
    transform: rotate(15deg);
}

.cart-item {
    display: flex;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed rgba(0, 0, 117, 0.1);
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 1.5rem;
    background-color: #f5f5f5;
    flex-shrink: 0;
}

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

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.item-name {
    font-weight: 600;
    color: var(--navy);
    font-size: 1.2rem;
    flex: 1;
    margin-right: 1rem;
}

.item-price-wrapper {
    flex-shrink: 0;
}

.item-price {
    font-weight: 600;
    color: var(--burgundy);
    font-size: 1.1rem;
    white-space: nowrap;
}

.item-variant {
    font-size: 0.9rem;
    color: var(--dark);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.item-actions {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 117, 0.05);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--navy);
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: rgba(0, 0, 117, 0.1);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(0, 0, 117, 0.05);
}

.quantity-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.quantity-input {
    width: 50px;
    text-align: center;
    margin: 0 0.5rem;
    padding: 5px;
    border: 1px solid rgba(0, 0, 117, 0.1);
    border-radius: 4px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--burgundy);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    color: #750014;
}

.wishlist-btn {
    background: none;
    border: none;
    color: var(--navy);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-left: 2rem;
    transition: all 0.2s ease;
}

.wishlist-btn svg {
    margin-right: 0.3rem;
}

.wishlist-btn:hover {
    color: #00004d;
}

.cart-summary {
    width: 360px;
    min-width: 300px;
    background-color: var(--ivory);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--navy);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    height: fit-content;
    border: 1px solid rgba(0, 0, 117, 0.1);
}

.cart-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--burgundy), var(--navy));
    z-index: 2;
}

.cart-summary h2 {
    color: var(--navy);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-label {
    color: var(--dark);
}

.summary-value {
    font-weight: 600;
    color: var(--navy);
}

.grand-total {
    border-top: 2px solid rgba(0, 0, 117, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.3rem;
    color: var(--burgundy);
}

.grand-total .summary-value {
    color: var(--burgundy);
    font-size: 1.5rem;
}

/* ✅ CODE PROMO STYLES */
.promo-code-section {
    background: linear-gradient(135deg, rgba(196, 162, 103, 0.08), rgba(0, 0, 117, 0.05));
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px dashed var(--gold);
}

.promo-code-section h4 {
    color: var(--navy);
    font-size: 1rem;
    margin-bottom: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.promo-code-section h4 i {
    color: var(--gold);
    font-size: 1.1rem;
}

.promo-input-group {
    display: flex;
    gap: 0.5rem;
}

.promo-code-input {
    flex: 1;
    padding: 0.4rem 0.4rem;
    border: 2px solid rgba(0, 0, 117, 0.2);
    border-radius: 6px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.promo-code-input:focus {
    outline: none;
    border-color: var(--gold);
    background: white;
}

.promo-code-input::placeholder {
    text-transform: none;
}

.promo-apply-btn {
    padding: 0.4rem 1rem;
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.promo-apply-btn:hover {
    background: #b89457;
    transform: translateY(-2px);
}

.promo-apply-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.promo-message {
    margin-top: 0.7rem;
    padding: 0.7rem;
    border-radius: 5px;
    font-size: 0.9rem;
    display: none;
}

.promo-message.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #155724;
    display: block;
}

.promo-message.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
    display: block;
}

.promo-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 6px;
    margin-top: 0.85rem;
}

.promo-applied-details {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.promo-applied-details i {
    color: #28a745;
    font-size: 1.2rem;
}

.promo-applied-code {
    font-weight: 600;
    color: #155724;
    font-size: 1rem;
}

.promo-applied-discount {
    color: #155724;
    font-size: 0.9rem;
}

.promo-remove-btn {
    background: var(--burgundy);
    color: white;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.promo-remove-btn:hover {
    background: #750014;
}

.promo-discount-row {
    color: #28a745 !important;
}

.promo-discount-row .summary-value {
    color: #28a745 !important;
}

.btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--navy), var(--burgundy));
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 117, 0.25);
}

.continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    text-decoration: none;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.continue-shopping svg {
    margin-right: 0.5rem;
}

.continue-shopping:hover {
    color: var(--burgundy);
}

@media (max-width: 768px) {
    .cart-container {
        flex-direction: column;
    }
    
    .cart-summary {
        width: 100%;
    }
    
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .item-name {
        margin-right: 0;
        width: 100%;
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .item-price-wrapper {
        width: 100%;
    }
    
    .item-price {
        font-size: 1.2rem;
        font-weight: 700;
        display: block;
        padding: 0.5rem 0;
        border-top: 1px solid rgba(150, 0, 24, 0.1);
        margin-top: 0.25rem;
    }
    
    .item-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .quantity-selector {
        margin-right: 0;
    }
    
    .wishlist-btn {
        margin-left: 0;
    }

    .promo-input-group {
        flex-direction: column;
    }

    .promo-apply-btn {
        width: 100%;
    }
}

/* Animation for subtle interactivity */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-items, .cart-summary {
    animation: fadeIn 0.6s ease-out forwards;
}

.cart-item, .summary-row, .btn {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.cart-item:nth-child(1) { animation-delay: 0.1s; }
.cart-item:nth-child(2) { animation-delay: 0.2s; }
.summary-row:nth-child(1) { animation-delay: 0.3s; }
.summary-row:nth-child(2) { animation-delay: 0.4s; }
.btn { animation-delay: 0.5s; }

