/* =====================================
   CHECKOUT PAGE STYLES
   ===================================== */

/* Form Styling */
.tf-page-checkout {
    background: #ffffff;
}

.wrap-coupon {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.ip-discount-code {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.ip-discount-code input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ip-discount-code input:focus {
    outline: none;
    border-color: #ed5233;
    box-shadow: 0 0 0 3px rgba(237, 82, 51, 0.1);
}

/* Form Sections */
.box-ip-checkout,
.box-ip-payment,
.box-ip-shipping {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.title.type-semibold {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

/* Form Grid Layout */
.tf-grid-layout.sm-col-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .tf-grid-layout.sm-col-2 {
        grid-template-columns: 1fr;
    }
}

/* Input Fields */
.form_content fieldset {
    margin-bottom: 1.5rem;
}

.form_content input,
.form_content textarea,
.form_content select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form_content input:focus,
.form_content textarea:focus,
.form_content select:focus {
    outline: none;
    border-color: #ed5233;
    box-shadow: 0 0 0 3px rgba(237, 82, 51, 0.1);
}

.form_content textarea {
    resize: vertical;
    font-family: inherit;
}

/* Select Styling */
.tf-select {
    position: relative;
}

.tf-select select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Payment Method Styling */
.payment-method-box {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.payment_accordion {
    border-bottom: 1px solid #e2e8f0;
}

.payment_accordion:last-child {
    border-bottom: none;
}

.payment_check {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment_check:hover {
    background: #f8f9fa;
}

.payment_check input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
}

.pay-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
}

.payment_body {
    padding: 0 1.5rem 1.5rem;
    color: #718096;
    line-height: 1.6;
}

/* Shipping Method Styling */
.check-ship {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.check-ship:hover {
    border-color: #ed5233;
    background: rgba(237, 82, 51, 0.05);
}

.check-ship input[type="radio"]:checked + .text {
    color: #ed5233;
}

.check-ship input[type="radio"] {
    margin-right: 1rem;
}

.check-ship .text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.check-ship .price {
    font-weight: 600;
    color: #2d3748;
}

/* Checkbox Styling */
.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-wrap input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-wrap label {
    line-height: 1.5;
    cursor: pointer;
}

/* Submit Button */
.button_submit {
    margin-top: 2rem;
}

.tf-btn.animate-btn.w-100 {
    background: #ed5233;
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tf-btn.animate-btn.w-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 82, 51, 0.4);
}

.tf-btn.animate-btn.w-100:active {
    transform: translateY(0);
}

/* Order Summary Sidebar */
.fl-sidebar-cart {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.box-your-order {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.list-order-product {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.img-prd {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.img-prd img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.infor-prd {
    flex: 1;
    min-width: 0;
}

.prd_name {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
}

.prd_name a {
    color: inherit;
    text-decoration: none;
}

.prd_name a:hover {
    color: #ed5233;
}

.prd_select {
    color: #718096;
    font-size: 0.85rem;
}

.price-prd {
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    white-space: nowrap;
}

/* Order Totals */
.list-total {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.5rem;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.last-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 2px solid #e2e8f0;
    margin-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
}

/* Error Messages */
.text-danger {
    color: #e53e3e !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Loading State */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .fl-sidebar-cart {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .box-ip-checkout,
    .box-ip-payment,
    .box-ip-shipping {
        padding: 1.5rem;
    }
    
    .wrap-coupon {
        padding: 1.5rem;
    }
    
    .ip-discount-code {
        flex-direction: column;
        align-items: stretch;
    }
    
    .box-your-order {
        padding: 1.5rem;
    }
}

/* Flat Spacing */
.flat-spacing {
    padding: 60px 0;
}
