/* Checkout Page Specific Styles */
.checkout-container {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--off-white) 0%, var(--ivory) 100%);
    min-height: 100vh;
}

.checkout-header {
    text-align: center;
    margin-bottom: 40px;
}

.checkout-header h1 {
    font-size: 2.5rem;
    color: var(--charcoal);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--taupe);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 30px;
    background: var(--cream);
    border: 1px solid var(--gold-light);
    transition: var(--transition);
}

.step.active {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: white;
    border-color: var(--gold-primary);
}

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

/* Checkout Grid Layout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
}

/* Order Summary */
.order-summary {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--gold-light);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 100px;
}

@media (max-width: 1200px) {
    .order-summary {
        position: relative;
        top: 0;
    }
}

.order-summary h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--gold-light);
    padding-bottom: 15px;
}

/* Order Items */
.order-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 25px;
    padding-right: 10px;
}

.order-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--gold-light);
    align-items: center;
}

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

.order-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gold-light);
}

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

.order-item-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--charcoal);
}

.order-item-specs {
    font-size: 0.9rem;
    color: var(--taupe);
    margin-bottom: 5px;
}

.order-item-specs span {
    display: inline-block;
    margin-right: 10px;
    background: var(--gold-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.order-item-price {
    text-align: right;
}

.item-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 5px;
}

.item-price-details {
    font-size: 0.85rem;
    color: var(--taupe);
}

/* Price Breakdown */
.price-breakdown {
    border-top: 2px solid var(--gold-light);
    padding-top: 20px;
}

.price-breakdown h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 10px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--gold-light);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.gst-breakdown {
    background: rgba(197, 160, 40, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 3px solid var(--gold-primary);
}

.gst-breakdown h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--gold-dark);
}

.subtotal {
    font-weight: 600;
    font-size: 1.1rem;
    border-top: 2px solid var(--gold-light);
    margin-top: 10px;
    padding-top: 15px;
}

.total {
    background: linear-gradient(135deg, var(--gold-light), rgba(197, 160, 40, 0.1));
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    font-size: 1.3rem;
    border: 1px solid var(--gold-primary);
}

/* Customer Form */
.customer-form {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--gold-light);
    box-shadow: var(--box-shadow);
}

.customer-form h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--gold-light);
    padding-bottom: 15px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group.important label {
    color: var(--gold-dark);
}

.form-group.important input {
    border-color: var(--gold-primary);
    background: rgba(197, 160, 40, 0.05);
}

.form-note {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--gold-dark);
    font-style: italic;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gold-light);
    border-radius: var(--border-radius);
    background: var(--off-white);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--charcoal);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(197, 160, 40, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Payment Details */
.payment-details-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.payment-details-group .form-group {
    margin-bottom: 15px;
}

/* Terms Agreement */
.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 30px 0;
    padding: 20px;
    background: rgba(197, 160, 40, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid var(--gold-light);
}

.terms-agreement input[type="checkbox"] {
    transform: scale(0.7);
    margin-right: 5px;
    margin-top: 4px;
    accent-color: var(--gold-primary);
   
}


.terms-agreement label {
    font-size: 0.95rem;
    color: var(--taupe);
    line-height: 1.6;
}

.terms-agreement a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 600;
}

.terms-agreement a:hover {
    text-decoration: underline;
}

/* Checkout Actions */
.checkout-actions {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 30px;
}

.checkout-actions .btn-outline,
.checkout-actions .btn-gold {
    flex: 1;
    padding: 18px 30px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Modal Styles - FIXED */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

.modal-header {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: white;
}

.modal-header.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.modal-header i {
    font-size: 4rem;
    margin-bottom: 15px;
}

.modal-header h2 {
    font-size: 2rem;
    margin: 0;
}

.modal-body {
    padding: 30px;
}

/* Order Success */
.order-success {
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 3rem;
}

.order-success h3 {
    font-size: 1.8rem;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.order-success p {
    color: var(--taupe);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.order-details {
    background: var(--off-white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 25px 0;
    text-align: left;
    border: 1px solid var(--gold-light);
}

.order-info {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gold-light);
}

.order-info:last-child {
    border-bottom: none;
}

.order-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0;
}

.order-actions .btn-outline,
.order-actions .btn-gold {
    padding: 15px 30px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shipping-info {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--gold-light);
    text-align: left;
}

.shipping-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--taupe);
    font-size: 0.95rem;
}

.shipping-info p i {
    color: var(--gold-primary);
    width: 20px;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(247, 243, 233, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 5px solid var(--gold-light);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.spinner i {
    color: var(--gold-primary);
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-spinner p {
    font-size: 1.2rem;
    color: var(--charcoal);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-container {
        padding: 100px 15px 40px;
    }
    
    .checkout-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .checkout-steps {
        gap: 10px;
    }
    
    .step {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .checkout-grid {
        gap: 25px;
        padding: 0 15px;
    }
    
    .order-summary,
    .customer-form {
        padding: 20px;
    }
    
    .order-item {
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 15px 0;
    }
    
    .order-item-image {
        width: 70px;
        height: 70px;
    }
    
    .order-item-price {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
        margin-top: 10px;
    }
    
    .item-total {
        font-size: 1.1rem;
    }
    
    .order-item-details h4 {
        font-size: 1rem;
    }
    
    .payment-details-group {
        grid-template-columns: 1fr;
    }
    
    .checkout-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .checkout-actions .btn-outline,
    .checkout-actions .btn-gold {
        width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    /* Modal Mobile Fixes */
    .modal {
        width: 95%;
        max-width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header i {
        font-size: 3rem;
    }
    
    .modal-header h2 {
        font-size: 1.6rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .order-success h3 {
        font-size: 1.5rem;
    }
    
    .order-success p {
        font-size: 1rem;
    }
    
    .order-details {
        padding: 20px;
    }
    
    .order-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .order-actions .btn-outline,
    .order-actions .btn-gold {
        width: 100%;
        padding: 14px 20px;
    }
    
    /* Form Mobile Fixes */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .terms-agreement {
        padding: 15px;
        margin: 20px 0;
        font-size: 0.9rem;
    }
    
    .terms-agreement label {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Price Breakdown Mobile Fixes */
    .total {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .price-breakdown h3 {
        font-size: 1.2rem;
    }
    
    .breakdown-row {
        font-size: 0.95rem;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .checkout-header h1 {
        font-size: 1.8rem;
    }
    
    .checkout-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .order-summary h2,
    .customer-form h2 {
        font-size: 1.5rem;
    }
    
    .order-item {
        grid-template-columns: 60px 1fr;
    }
    
    .order-item-image {
        width: 60px;
        height: 60px;
    }
    
    .item-total {
        font-size: 1rem;
    }
    
    .total {
        font-size: 1rem;
        padding: 12px;
    }
    
    .modal-header i {
        font-size: 2.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .order-success h3 {
        font-size: 1.3rem;
    }
    
    .order-success p {
        font-size: 0.95rem;
    }
}

@media (max-width: 375px) {
    .checkout-container {
        padding: 90px 10px 30px;
    }
    
    .checkout-header h1 {
        font-size: 1.6rem;
    }
    
    .order-summary,
    .customer-form {
        padding: 15px;
    }
    
    .order-item {
        grid-template-columns: 50px 1fr;
    }
    
    .order-item-image {
        width: 50px;
        height: 50px;
    }
    
    .order-item-details h4 {
        font-size: 0.9rem;
    }
    
    .checkout-actions .btn-outline,
    .checkout-actions .btn-gold {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}

/* Fix for iOS input zoom */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Fix for landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    .checkout-container {
        padding: 90px 15px 30px;
    }
    
    .order-items {
        max-height: 200px;
    }
    
    .modal {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Touch target improvements */
button,
input[type="checkbox"],
a {
    min-height: 44px;
    min-width: 44px;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Empty cart state */
.empty-cart-message {
    text-align: center;
    padding: 40px 20px !important;
}

.empty-cart-message i {
    font-size: 60px !important;
    color: #C5A028 !important;
    margin-bottom: 20px !important;
    opacity: 0.5 !important;
}

.empty-cart-message h2 {
    font-size: 1.5rem !important;
    margin-bottom: 12px !important;
    font-family: 'Cormorant Garamond', serif !important;
}

.empty-cart-message p {
    color: #666 !important;
    margin-bottom: 25px !important;
    font-size: 1rem !important;
    max-width: 500px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.empty-cart-message .btn-gold,
.empty-cart-message .btn-outline {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin: 5px !important;
}

/* Item actions mobile */
.item-actions {
    margin-top: 12px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    min-width: 100px;
}

.quantity-controls button {
    background: #f8f9fa;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    min-width: 36px;
}

.quantity-controls .quantity-decrease {
    border-right: 1px solid #ddd;
}

.quantity-controls .quantity-increase {
    border-left: 1px solid #ddd;
}

.quantity-display {
    padding: 6px 8px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    background: white;
    font-size: 0.9rem;
}

.remove-item-btn {
    background: none;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

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

.box{
    height: 50px !important;
    width: 50px !important;
}

@media (max-width: 768px) {
    .terms-agreement input[type="checkbox"] {
        transform: scale(0.6);
        margin-top: 5px;
    }
}