/* Cart Page Styles */
:root {
    --gold-color: #D4AF37;
    --gold-hover: #C4A07C;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

.cart-page {
    padding: 120px 20px 60px;
    min-height: 100vh;
    background: #f8f9fa;
}

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

.cart-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Cart Items Section */
.cart-items {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

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

.cart-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.cart-item-image {
    width: 140px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.05);
}

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

.cart-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.cart-item-specs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.spec-item {
    background: rgba(212,175,55,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gold-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-item i {
    font-size: 0.8rem;
}

.cart-item-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold-color);
    margin: 0.5rem 0;
}

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

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 25px;
    border: 1px solid var(--border-color);
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: white;
    color: var(--gold-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.quantity-btn:hover {
    background: var(--gold-color);
    color: white;
    transform: scale(1.1);
}

.quantity-input {
    width: 40px;
    text-align: center;
    font-size: 1rem;
    border: none;
    background: transparent;
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border-radius: 20px;
}

.remove-item:hover {
    color: #c82333;
    background: rgba(220,53,69,0.1);
}

/* Cart Summary Section */
.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    height: fit-content;
    transition: var(--transition);
}

.cart-summary:hover {
    box-shadow: var(--shadow-lg);
}

.cart-summary h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold-color);
    position: relative;
}

.cart-summary h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gold-color);
}

.summary-details {
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    transition: var(--transition);
}

.summary-row:hover {
    background: #f8f9fa;
    padding: 1rem;
    margin: 0 -1rem;
    border-radius: 8px;
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--gold-color);
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--border-color);
}

/* Checkout Form */
.checkout-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(212,175,55,0.1);
}

.form-group input:hover,
.form-group textarea:hover {
    background: white;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gold-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.checkout-btn:hover::before {
    width: 300px;
    height: 300px;
}

.checkout-btn:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.empty-cart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--gold-color);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.empty-cart h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.empty-cart .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gold-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.empty-cart .btn:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
}

.loading-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.loading-overlay.active .loading-content {
    transform: translateY(0);
    opacity: 1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 15px 25px;
    border-radius: 8px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    width: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.message.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message i {
    font-size: 20px;
}

.message.success i {
    color: #28a745;
}

.message.error i {
    color: #dc3545;
}

.message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Disable button styles */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Improved form styles */
.checkout-form {
    position: relative;
}

.checkout-form .form-group {
    margin-bottom: 20px;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
}

.checkout-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.checkout-btn i {
    font-size: 18px;
}

/* Loading button state */
.checkout-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cart-container {
        grid-template-columns: 1.2fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 100px 15px 40px;
    }

    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }

    .cart-item-image {
        width: 180px;
        height: 220px;
        margin: 0 auto;
    }

    .cart-item-specs {
        justify-content: center;
    }

    .cart-item-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .quantity-controls {
        margin: 0 auto;
    }

    .remove-item {
        justify-content: center;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on mobile */
    }
}

@media (max-width: 480px) {
    .cart-items,
    .cart-summary {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .cart-item {
        padding: 1rem;
    }

    .cart-item-image {
        width: 140px;
        height: 180px;
    }

    .cart-item-title {
        font-size: 1.1rem;
    }

    .spec-item {
        width: 100%;
        justify-content: center;
    }

    .summary-row {
        font-size: 1rem;
    }

    .summary-row:last-child {
        font-size: 1.1rem;
    }

    .checkout-btn {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .message {
        left: 20px;
        right: 20px;
        min-width: auto;
    }
} 