/* WooCommerce Checkout Page Styles */

/* Force override WooCommerce defaults */
.woocommerce-checkout .woocommerce,
.luxury-checkout-page .woocommerce {
    max-width: 100% !important;
}

.woocommerce-checkout form.checkout,
.luxury-checkout-page form.checkout {
    display: block !important;
}

/* Hide default checkout heading */
.woocommerce-checkout .woocommerce-billing-fields > h3,
.woocommerce-checkout .woocommerce-shipping-fields > h3,
.woocommerce-checkout #order_review_heading {
    display: none !important;
}

/* Checkout Wrapper */
.luxury-checkout-page,
.luxury-checkout-wrapper {
    padding: 60px 0;
    min-height: 100vh;
    background: #fff;
}

/* Checkout Header */
.checkout-header {
    text-align: center;
    margin-bottom: 60px;
}

.checkout-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--luxury-dark);
    margin-bottom: 10px;
}

.checkout-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Progress Bar */
.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    color: #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.completed .step-number {
    background: var(--luxury-gold);
    color: #fff;
}

.progress-step.active .step-number {
    background: var(--luxury-dark);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.step-label {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
    color: var(--luxury-dark);
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 20px;
}

.progress-step.completed + .progress-line {
    background: var(--luxury-gold);
}

/* Checkout Layout */
.checkout-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.woocommerce-checkout .col2-set {
    display: block !important;
}

.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Checkout Main */
.checkout-main {
    background: #fff;
}

/* Checkout Sections */
.checkout-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.section-title,
.woocommerce-checkout h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--luxury-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.section-title svg {
    color: var(--luxury-gold);
    width: 20px;
    height: 20px;
}

/* Form Fields */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row {
    margin-bottom: 0;
}

.form-row.form-row-wide,
.form-row-wide {
    grid-column: 1 / -1;
}

.form-row label {
    display: block;
    font-weight: 500;
    color: var(--luxury-dark);
    margin-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row label .required {
    color: var(--luxury-gold);
    font-weight: 700;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea,
.form-row select,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--luxury-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-row textarea {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox Styling */
.woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.woocommerce-form__input-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Checkout Sidebar */
.checkout-sidebar {
    position: sticky;
    top: 100px;
}

/* Order Review */
.order-review-wrapper,
#order_review_heading + .woocommerce-checkout-review-order {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
}

.woocommerce-checkout #order_review {
    background: #fff;
    padding: 0;
}

/* Order Table */
.woocommerce-checkout-review-order-table {
    width: 100%;
    margin-bottom: 30px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 15px 0;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.woocommerce-checkout-review-order-table .product-name {
    font-weight: 600;
    color: var(--luxury-dark);
}

.woocommerce-checkout-review-order-table .product-quantity {
    color: var(--text-secondary);
    font-size: 14px;
}

.woocommerce-checkout-review-order-table .product-total {
    text-align: right;
    font-weight: 600;
}

.cart-subtotal th,
.order-total th {
    font-weight: 600;
    color: var(--luxury-dark);
}

.order-total th,
.order-total td {
    font-size: 22px;
    font-weight: 700;
    color: var(--luxury-gold);
    padding-top: 20px;
    border-top: 2px solid var(--luxury-gold);
    border-bottom: none;
}

/* Payment Methods */
#payment {
    background: #fff;
    padding: 25px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

#payment .payment_methods {
    list-style: none;
    margin: 0 0 30px;
}

.payment_methods li {
    margin-bottom: 15px;
}

.payment_methods input[type="radio"] {
    margin-right: 10px;
}

.payment_methods label {
    font-weight: 600;
    color: var(--luxury-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment_methods label img {
    max-height: 30px;
}

.payment_box {
    background: var(--luxury-light);
    padding: 20px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Place Order Button */
#place_order {
    width: 100%;
    background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%);
    color: #fff;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

#place_order::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

#place_order:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

#place_order:hover::before {
    left: 100%;
}

/* Terms and Conditions */
.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 20px;
}

.woocommerce-privacy-policy-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.woocommerce-privacy-policy-text a {
    color: var(--luxury-gold);
    text-decoration: none;
    font-weight: 500;
}

.woocommerce-privacy-policy-text a:hover {
    text-decoration: underline;
}

/* Trust Badges */
.checkout-trust-badges {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    border-color: var(--luxury-gold);
    transform: translateX(5px);
}

.trust-badge svg {
    color: var(--luxury-gold);
    flex-shrink: 0;
}

.trust-badge strong {
    display: block;
    font-size: 16px;
    color: var(--luxury-dark);
    margin-bottom: 4px;
}

.trust-badge span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Customer Support */
.checkout-support {
    background: var(--luxury-dark);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.checkout-support h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.checkout-support p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.support-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--luxury-gold);
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.support-phone:hover {
    background: var(--luxury-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Error Messages */
.woocommerce-error,
.woocommerce-NoticeGroup-checkout {
    background: rgba(255, 0, 0, 0.05);
    border-left: 4px solid #d9534f;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.woocommerce-error li {
    list-style: none;
    color: #d9534f;
    font-weight: 500;
}

/* Loading States */
.blockUI.blockOverlay {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.blockUI.blockOverlay::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--luxury-gold);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .checkout-sidebar {
        position: static;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .luxury-checkout-page,
    .luxury-checkout-wrapper {
        padding: 40px 0;
    }
    
    .checkout-header {
        margin-bottom: 40px;
    }
    
    .checkout-title {
        font-size: clamp(28px, 7vw, 36px);
        margin-bottom: 8px;
    }
    
    .checkout-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    /* Progress Bar Mobile */
    .checkout-progress {
        gap: 5px;
        padding: 0 20px;
    }
    
    .progress-step {
        gap: 5px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .step-label {
        font-size: 11px;
        text-align: center;
        max-width: 60px;
    }
    
    .progress-line {
        margin: 0 5px;
        height: 1px;
        min-width: 20px;
    }
    
    /* Checkout Layout */
    .checkout-layout {
        padding: 0 15px;
    }
    
    .checkout-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    /* Form Fields */
    .woocommerce-billing-fields__field-wrapper,
    .woocommerce-shipping-fields__field-wrapper,
    .woocommerce-additional-fields__field-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-row {
        margin-bottom: 15px;
    }
    
    .form-row label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-row input[type="text"],
    .form-row input[type="email"],
    .form-row input[type="tel"],
    .form-row select,
    .form-row textarea {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Touch target size */
    }
    
    /* Order Review Mobile */
    .order-review-table {
        font-size: 14px;
    }
    
    .order-review-table th,
    .order-review-table td {
        padding: 12px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-quantity {
        font-size: 12px;
    }
    
    .product-total {
        font-size: 14px;
    }
    
    .order-review-table tfoot th,
    .order-review-table tfoot td {
        padding: 15px 12px;
    }
    
    .order-total th,
    .order-total td {
        font-size: 18px;
    }
    
    /* Payment Methods Mobile */
    .wc_payment_methods {
        margin: 0;
    }
    
    .wc_payment_method {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .wc_payment_method label {
        font-size: 14px;
        padding: 10px 35px;
    }
    
    .payment_box {
        padding: 15px;
        font-size: 13px;
    }
    
    /* Place Order Button */
    #place_order {
        padding: 15px 30px;
        font-size: 14px;
        letter-spacing: 1px;
        width: 100%;
    }
    
    /* Terms */
    .woocommerce-terms-and-conditions-wrapper {
        margin: 15px 0;
    }
    
    .woocommerce-privacy-policy-text p {
        font-size: 12px;
        line-height: 1.5;
    }
    
    /* Trust Badges Mobile */
    .checkout-trust {
        margin-top: 30px;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 10px;
    }
    
    .trust-badge {
        padding: 12px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
    }
    
    .trust-badge svg {
        width: 24px;
        height: 24px;
    }
    
    .trust-badge strong {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .trust-badge span {
        font-size: 12px;
    }
    
    /* Sidebar Mobile */
    .order-summary {
        padding: 20px;
    }
    
    .summary-header h3 {
        font-size: 20px;
    }
    
    .summary-item {
        padding: 12px 0;
    }
    
    .summary-label,
    .summary-value {
        font-size: 14px;
    }
    
    .summary-total .summary-label,
    .summary-total .summary-value {
        font-size: 18px;
    }
    
    /* Support Section Mobile */
    .checkout-support {
        padding: 20px;
        margin-top: 20px;
    }
    
    .checkout-support h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .checkout-support p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .support-phone {
        font-size: 14px;
        padding: 10px 20px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .luxury-checkout-page,
    .luxury-checkout-wrapper {
        padding: 30px 0;
    }
    
    .checkout-title {
        font-size: 24px;
    }
    
    .checkout-subtitle {
        font-size: 14px;
        padding: 0 20px;
    }
    
    /* Hide step labels on very small screens */
    .step-label {
        display: none;
    }
    
    .progress-line {
        min-width: 15px;
    }
    
    /* Smaller padding for sections */
    .checkout-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    /* Stacked trust badges */
    .trust-badge {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 8px;
    }
    
    /* Order review table mobile optimization */
    .order-review-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .order-review-table table {
        min-width: 300px;
    }
}

/* Additional WooCommerce Checkout Overrides */
.woocommerce-checkout .col2-set {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.woocommerce-checkout #order_review {
    width: 100% !important;
    float: none !important;
}

.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields {
    margin-bottom: 0 !important;
}

/* Fix checkout form structure */
.woocommerce-checkout form.checkout {
    display: flex;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce-checkout .col2-set,
.woocommerce-checkout #customer_details {
    flex: 1.2;
}

.woocommerce-checkout #order_review_heading,
.woocommerce-checkout .woocommerce-checkout-review-order {
    flex: 1;
}

/* Hide duplicate headings */
.woocommerce-billing-fields h3:first-child,
.woocommerce-shipping-fields h3:first-child,
#order_review_heading {
    font-size: 20px;
    font-weight: 600;
    color: var(--luxury-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

/* Coupon Form */
.woocommerce-form-coupon-toggle {
    background: var(--luxury-light);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.woocommerce-form-coupon {
    background: var(--luxury-light);
    padding: 30px;
    border-radius: 4px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.woocommerce-form-coupon .form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.woocommerce-form-coupon input[type="text"] {
    flex: 1;
}

.woocommerce-form-coupon button {
    background: var(--luxury-dark);
    color: #fff;
    padding: 14px 30px;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce-form-coupon button:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}