/* ================= CART PAGE SPECIFIC STYLES ================= */

/* Page Header */
.cart-page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.cart-page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #c0a662;
}

.breadcrumb .current {
    color: #c0a662;
    font-weight: 500;
}

/* Checkout Container */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .checkout-container {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
}

/* Sections */
.cart-items-section,
.customer-info-section,
.promo-section,
.payment-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#itemCount {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

/* Cart Items List */
#cartItemsList {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f9f9f9;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #f0f0f0;
    border-color: #c0a662;
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.cart-item-total {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.1rem;
    white-space: nowrap;
}

/* Form Styles */
.customer-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

label[required]::after {
    content: " *";
    color: #dc2626;
}

input, textarea, select {
    padding: 0.875rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #c0a662;
    box-shadow: 0 0 0 3px rgba(192, 166, 98, 0.1);
}

.pincode-wrapper {
    display: flex;
    gap: 0.5rem;
}

.pincode-wrapper input {
    flex: 1;
}

.btn-secondary {
    padding: 0.875rem 1.5rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Error/Success Messages */
.error-message {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.success-message {
    color: #059669;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

/* Promo Section */
.promo-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.promo-input-group input {
    flex: 1;
}

.btn-primary {
    padding: 0.875rem 1.5rem;
    background: #c0a662;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    background: #b3964e;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.promo-message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.promo-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.promo-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.promo-note {
    color: #666;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    font-size: 1rem;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    position: relative;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option input[type="radio"]:checked + label {
    border-color: #c0a662;
    background: rgba(192, 166, 98, 0.05);
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.payment-details strong {
    font-weight: 600;
    color: #1a1a1a;
}

.payment-details small {
    color: #666;
    font-size: 0.85rem;
}

/* Payment Gateways */
.payment-gateways {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.payment-gateways h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}

.gateway-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.gateway-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gateway-btn:hover {
    border-color: #c0a662;
    transform: translateY(-2px);
}

.gateway-btn img {
    height: 24px;
    width: auto;
}

/* Order Summary */
.order-summary-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
}

.summary-items {
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.95rem;
}

.promo-row {
    color: #059669;
}

.discount {
    color: #059669;
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Terms and Conditions */
.terms-checkbox {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.terms-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
}

.terms-checkbox label {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.terms-checkbox a {
    color: #c0a662;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Place Order Button */
.place-order-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, #c0a662, #e6c878);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.place-order-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 166, 98, 0.3);
}

.place-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Security Badges */
.security-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Support Card */
.support-card {
    background: linear-gradient(135deg, #fdfcfb 0%, #faf8f5 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(192, 166, 98, 0.1);
}

.support-card h3 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.support-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Empty Cart State */
.empty-cart-state {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.empty-cart-state h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    border: none;
}

.empty-cart-state p {
    color: #666;
    margin-bottom: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cart-items-section,
    .customer-info-section,
    .promo-section,
    .payment-section,
    .order-summary-card {
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .cart-item-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .cart-item-details {
        width: 100%;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #c0a662;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Validation States */
input.error, textarea.error {
    border-color: #dc2626;
}

input.success, textarea.success {
    border-color: #059669;
}

/* ================= FIX MARQUEE ANIMATION ================= */
.premium-marquee .marquee-track {
    animation: marqueeScroll 40s linear infinite !important;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Mobile speed */
@media (max-width: 768px) {
    .premium-marquee .marquee-track {
        animation: marqueeScrollMobile 30s linear infinite !important;
    }
    
    @keyframes marqueeScrollMobile {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
}

/* Desktop slow speed */
@media (min-width: 1024px) {
    .premium-marquee .marquee-track {
        animation-duration: 50s !important;
    }
}

/* Pause on hover */
.premium-marquee:hover .marquee-track {
    animation-play-state: paused !important;
}

/* Marquee control button */
.marquee-control {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.premium-marquee:hover .marquee-control {
    opacity: 1;
}

.marquee-control:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.control-icon {
    font-size: 0.875rem;
}

/* Pause state */
.premium-marquee.paused .marquee-track {
    animation-play-state: paused !important;
}

.premium-marquee.paused .marquee-control .control-icon {
    content: '▶';
}

/* Fix for mobile */
@media (max-width: 768px) {
    .marquee-control {
        display: none;
    }
}