/* ============================================
   Checkout Page Styles
   ============================================ */

.checkout-page {
    min-height: 100vh;
    padding-top: 120px;
    background: linear-gradient(180deg, var(--light-gray-alt) 0%, var(--white) 50%);
}

/* Hero Section */
.checkout-hero {
    background: linear-gradient(135deg, var(--primary-purple) 0%, #6b4470 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.checkout-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(239, 111, 106, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.checkout-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(107, 112, 79, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.checkout-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.checkout-hero-icon {
    margin-bottom: 30px;
    color: var(--secondary-pink);
    animation: float 3s ease-in-out infinite;
}

.checkout-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.checkout-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Checkout Content */
.checkout-content {
    padding: 60px 0 100px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .checkout-summary-section {
        position: static;
    }
}

/* Checkout Form */
.checkout-form-section {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.checkout-section {
    margin-bottom: 40px;
}

.checkout-section:last-child {
    margin-bottom: 0;
}

.checkout-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-gray);
}

.checkout-subsection-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    margin-top: 20px;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group label .required {
    color: var(--error-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(88, 45, 78, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-meta);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23582d4e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--light-gray);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-purple);
}

.shipping-address-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-gray);
    animation: fadeIn 0.3s ease;
}

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

/* Checkout Summary */
.checkout-summary-section {
    position: sticky;
    top: 140px;
    height: fit-content;
}

.checkout-summary {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.checkout-summary-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-gray);
}

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

.order-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-gray);
}

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

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-gray);
    flex-shrink: 0;
}

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

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.order-item-info {
    font-size: 12px;
    color: var(--text-meta);
    margin-bottom: 5px;
}

.order-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-purple);
}

/* Coupon Section */
.coupon-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-gray);
}

.coupon-toggle {
    margin-bottom: 15px;
}

.coupon-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-purple);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.coupon-link:hover {
    color: var(--secondary-pink);
}

.coupon-form {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.coupon-form input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
}

.coupon-form input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.coupon-form .btn-outline {
    padding: 10px 20px;
    white-space: nowrap;
}

/* Order Summary Details */
.order-summary-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-gray);
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: var(--text-dark);
}

.order-summary-row span:last-child {
    font-weight: 600;
    color: var(--text-dark);
}

.order-summary-row.order-summary-total {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-purple);
    padding-top: 15px;
    border-top: 2px solid var(--border-gray);
    margin-top: 10px;
}

.order-summary-row.order-summary-total span:last-child {
    color: var(--primary-purple);
    font-weight: 700;
}

/* Payment Method */
.payment-method-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-gray);
}

.payment-method-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.payment-option:hover {
    border-color: var(--primary-purple);
    background: var(--light-gray-alt);
}

.payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-purple);
}

.payment-option span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.payment-option input[type="radio"]:checked + span {
    color: var(--primary-purple);
    font-weight: 600;
}

/* Place Order Button */
.checkout-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkout-submit-btn:hover {
    background: var(--secondary-pink);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(88, 45, 78, 0.3);
}

.checkout-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */

@media (max-width: 767px) {
    .checkout-page {
        padding-top: 80px;
    }
    
    .checkout-content {
        padding: 30px 0 60px;
    }
    
    .checkout-hero {
        padding: 50px 0 30px;
    }
    
    .checkout-hero-icon {
        margin-bottom: 20px;
    }
    
    .checkout-hero-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .checkout-hero-title {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .checkout-hero-subtitle {
        font-size: 14px;
    }
    
    .checkout-layout {
        gap: 20px;
        margin-top: 20px;
    }
    
    .checkout-form-section {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .checkout-section {
        margin-bottom: 30px;
    }
    
    .checkout-section-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .checkout-subsection-title {
        font-size: 18px;
        margin-bottom: 15px;
        margin-top: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    .form-group select {
        padding-right: 35px;
        background-position: right 12px center;
    }
    
    .form-group textarea {
        min-height: 80px;
        font-size: 14px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .shipping-address-section {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .checkout-summary-section {
        position: static;
        order: -1;
    }
    
    .checkout-summary {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .checkout-summary-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .order-items {
        max-height: 300px;
        margin-bottom: 20px;
    }
    
    .order-item {
        padding: 12px 0;
        gap: 12px;
    }
    
    .order-item-image {
        width: 50px;
        height: 50px;
    }
    
    .order-item-name {
        font-size: 13px;
    }
    
    .order-item-info {
        font-size: 11px;
    }
    
    .order-item-price {
        font-size: 13px;
    }
    
    .coupon-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .coupon-link {
        font-size: 13px;
    }
    
    .coupon-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .coupon-form input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .coupon-form .btn-outline {
        padding: 10px 15px;
        font-size: 14px;
        width: 100%;
    }
    
    .order-summary-details {
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .order-summary-row {
        font-size: 14px;
    }
    
    .order-summary-row.order-summary-total {
        font-size: 18px;
        padding-top: 12px;
    }
    
    .payment-method-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .payment-method-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .payment-option {
        padding: 10px;
    }
    
    .payment-option input[type="radio"] {
        width: 18px;
        height: 18px;
    }
    
    .payment-option span {
        font-size: 13px;
    }
    
    .checkout-submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    #areaGroup,
    #shippingAreaGroup {
        display: block;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .checkout-page {
        padding-top: 70px;
    }
    
    .checkout-content {
        padding: 20px 0 50px;
    }
    
    .checkout-hero {
        padding: 40px 0 25px;
    }
    
    .checkout-hero-title {
        font-size: 24px;
    }
    
    .checkout-hero-subtitle {
        font-size: 13px;
    }
    
    .checkout-form-section {
        padding: 15px 12px;
    }
    
    .checkout-section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .checkout-subsection-title {
        font-size: 16px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 9px 10px;
        font-size: 13px;
    }
    
    .checkout-summary {
        padding: 15px 12px;
    }
    
    .checkout-summary-title {
        font-size: 18px;
    }
    
    .order-item-name {
        font-size: 12px;
    }
    
    .order-item-price {
        font-size: 12px;
    }
    
    .order-summary-row {
        font-size: 13px;
    }
    
    .order-summary-row.order-summary-total {
        font-size: 16px;
    }
    
    .checkout-submit-btn {
        padding: 11px 18px;
        font-size: 13px;
    }
}

/* RTL Support */
body.rtl .form-group select,
body[dir="rtl"] .form-group select {
    background-position: left 15px center;
    padding-left: 40px;
    padding-right: 15px;
}

body.rtl .coupon-link,
body[dir="rtl"] .coupon-link {
    flex-direction: row-reverse;
}

/* Area Group Animation */
#areaGroup,
#shippingAreaGroup {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

