/* Checkout Custom Styles */

/* بخش کد تخفیف */
.coupon-section {
    margin-bottom: 2rem;
    padding: 1rem;
        border-radius: 16px;
background: rgba(var(--border-color-rgb), 0.10);
}

.coupon-toggle  {
    display: flex;
    align-items: center;
    cursor: pointer;
    color:var(--primary-color);
}

.coupon-toggle span.text-muted {
color:rgba(var(--border-color-rgb), 0.75);
}
.coupon-toggle i {
    transition: transform 0.3s ease;
    margin-right:auto;
}

.coupon-toggle.active i {
    transform: rotate(180deg);
}

.coupon-form {
    margin-top: 1rem;
}
.checkout-coupon{
    background: #fff;
    padding: 10px;
    border-radius: 16px;
}
.coupon-form input[type="text"]{
    border-radius: 8px;
    background: #FFF;
    width: 35%;
    padding: 10px 20px;
}
.checkout-section-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.checkout-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.checkout-section-content h3{
font-size: 17px;
font-weight: 400;
line-height: 180%; /* 30.6px */
}
/* بخش حمل و نقل */
#ship-to-different-address span{
    color: #4E5364;
font-size: 17px;
font-weight: 500;
line-height: 180%;
margin-left:8px;
}
.checkout-shipping-section   .notes    textarea#order_comments{
 border-radius: 16px;
background: rgba(var(--border-color-rgb), 0.10);   
border:none;
}
.form-row.place-order{
    margin:0;
        width: 100%;
    align-items: center;
    justify-content: center;
    display: flex
;
}
textarea#billing_address_1{
        height: 7rem;
}
@media (min-width:990px){
.checkout-shipping-section   .notes    textarea#order_comments{
        min-height:400px;
    }
}
.woocommerce form .form-row label{
    margin-bottom:5px
}
/* بخش اصلی دو ستونه */
.checkout-main-section {
    margin-top:40px
}

/* ستون شیوه پرداخت */
.payment-section {
padding:0;
}

/* ستون خلاصه سفارش */
.order-review-section {

}

/* استایل شیوه‌های پرداخت مشابه my-address */
.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc_payment_method {
    margin-bottom: 1rem;
        border-bottom: 1px dashed rgba(var(--border-color-rgb), 0.50);
}

.wc_payment_method  .payment-method-container {
    display: flex;
    align-items: center;
    background: #fff;

    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
        position: relative;
}

.wc_payment_method:last-child {
        border: none;
    
}

.wc_payment_method .payment-icon {
width: 72px;
height: 72px;
    background: rgba(var(--border-color-rgb), 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--border-color-rgb), 1);
    margin-left: 1rem;
    flex-shrink: 0;
        font-size: 30px;
            transition: all 0.3s ease;
                margin-right: 30px;
}
 .wc_payment_method input[type="radio"]:checked ~ .payment-icon , .payment-method-container:hover .payment-icon{
background:var(--primary-color);
color:#fff;
 }
.wc_payment_method .payment-details {
    flex-grow: 1;

}
.wc_payment_method input[type="radio"] {
    display: none;
}

.wc_payment_method input[type="radio"] {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}
.wc_payment_method .payment-icon::after {
    content: "\f00c"; 
    font-family: "Font Awesome 6 Pro";
    font-weight: 500;
    font-size: 25px;
    position: absolute;
    right: 0; 
    top: 50%;
    transform: translateY(-50%);
    color: transparent; 
    transition: color 0.3s ease;
    
}

/* وقتی انتخاب شد */
.wc_payment_method input[type="radio"]:checked ~ .payment-icon::after {
    color:var(--primary-color); /* رنگ تیک */
}

.wc_payment_method .payment-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.wc_payment_method .payment-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.wc_payment_method .payment_box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 1rem;
}
#add_payment_method #payment ul.payment_methods, .woocommerce-cart #payment ul.payment_methods, .woocommerce-checkout #payment ul.payment_methods{
    border-bottom:none;
}
.woocommerce-checkout #payment ul.payment_methods li img{
    margin:0;
}
/* استایل‌های اصلی روش‌های پرداخت */
.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc_payment_method {
    margin-bottom: 1rem;
    border-bottom: 1px dashed rgba(var(--border-color-rgb), 0.50);
}

.wc_payment_method .payment-method-container {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.wc_payment_method:last-child {
    border: none;
}

.wc_payment_method .payment-icon {
    width: 72px;
    height: 72px;
    background: rgba(var(--border-color-rgb), 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--border-color-rgb), 1);
    margin-left: 1rem;
    flex-shrink: 0;
    font-size: 30px;
    transition: all 0.3s ease;
    margin-right: 30px;
}

.wc_payment_method input[type="radio"]:checked + .payment-icon, 
.payment-method-container:hover .payment-icon {
    background: var(--primary-color);
    color: #fff;
}

.wc_payment_method .payment-details {
    flex-grow: 1;
}

.wc_payment_method input[type="radio"] {
    display: none;
}

.wc_payment_method input[type="radio"] {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.wc_payment_method .payment-icon::after {
    content: "\f00c"; 
    font-family: "Font Awesome 6 Pro";
    font-weight: 500;
    font-size: 25px;
    position: absolute;
    right: 0; 
    top: 50%;
    transform: translateY(-50%);
    color: transparent; 
    transition: color 0.3s ease;
}

/* وقتی انتخاب شد */
.wc_payment_method input[type="radio"]:checked ~ .payment-icon::after {
    color: var(--primary-color);
}

.wc_payment_method .payment-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.wc_payment_method .payment-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.wc_payment_method .payment_box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 1rem;
}

#add_payment_method #payment ul.payment_methods, 
.woocommerce-cart #payment ul.payment_methods, 
.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: none;
}
.mobile-accordion-icon,.mobile-accordion-content , h3.payment-title{
    display:none
}
/* استایل‌های آکاردئون موبایل */
@media (max-width: 768px) {
    h3.payment-title{
        display:block;
    }
    .woocommerce-checkout #payment ul.payment_methods{
        display:flex;
        flex-direction:column;
        gap:20px
    }
    /* مخفی کردن آیکون آکاردئون در حالت عادی */
    .mobile-accordion-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        border: 1px solid  rgba(var(--border-color-rgb), 0.1);
        color: rgba(var(--border-color-rgb), 1);
        transition: all 0.3s ease;
        margin: 0 !important;
        background:transparent;
        position:relative;
    }
    
    /* استایل توضیحات در موبایل */
    .payment-description.mobile-accordion-content {
        display: none;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed rgba(var(--border-color-rgb), 0.3);
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* نمایش توضیحات وقتی روش پرداخت انتخاب شده */
    .wc_payment_method input[type="radio"]:checked ~ .wc_payment_method {
        border:1px solid var(--primary-color);
    }
    .wc_payment_method input[type="radio"]:checked ~ .payment-details .mobile-accordion-content {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    /* چرخش آیکون آکاردئون وقتی باز است */
    .wc_payment_method input[type="radio"]:checked ~ .mobile-accordion-icon {
        background: var(--primary-color);
        color: #fff;
    }
        .wc_payment_method input[type="radio"]:checked ~ .mobile-accordion-icon:after{
          content: "\f00c"; 
    font-family: "Font Awesome 6 Pro";
    font-weight: 500;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
            color: #fff;
    transition: color 0.3s ease;
        }
    /* تغییر چیدمان برای موبایل */
    .wc_payment_method .payment-method-container {
        flex-wrap: wrap;
        gap:12px;
        padding: 0.8rem;
    }
    
    .wc_payment_method .payment-icon {
        width: 50px;
        height: 50px;
        margin: 0;
        margin-bottom: 0.5rem;
        font-size: 24px;
        order:2;
    }
    .wc_payment_method .payment-icon::after{
        content:none;
    }
    .wc_payment_method .payment-details {
        
        order: 3;
    }
    
    .mobile-accordion-icon {
        order:1;
    }
    .wc_payment_method .mobile-accordion-content{
        order:4;
    }
    /* انیمیشن باز شدن آکاردئون */
    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
        }
        to {
            opacity: 1;
            max-height: 500px;
        }
    }
}
/* دکمه پرداخت */
.btn-payment {
background: var(--primary-color) !important;
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 400;
    margin-top: 1rem;
    cursor: pointer;
    transition: background 0.3s 
ease;
    font-size: 16px;
    line-height: normal;
}

.btn-payment:hover {
    background: var(--primary-dark) !important;
}
.btn-payment:after{
content:"\f060";
    font-family: "Font Awesome 6 Pro";
    font-weight: 400;
    margin-right: 8px;
}
/* خلاصه سفارش */
.woocommerce-checkout-review-order-modern > div , .woocommerce ul#shipping_method li{
    display:grid;
    grid-template-columns:2fr 1fr;
}
.woocommerce-checkout-review-order-modern  div.cart-shipping {
    display:revert;
    width:100%;
}
.woocommerce-checkout-review-order .cart-item-thumbnail{
    max-width:60px;
}
.woocommerce-checkout-review-order .cart-item-details h4 a{
    color: var(--text-color);
    font-size: 15px;
    font-weight: 400;
    line-height: 30px;
}
.woocommerce-terms-and-conditions-wrapper{
    margin-top:14px;
}
.woocommerce-terms-and-conditions-wrapper p{
    margin-bottom:0;
}
/* فیلدهای فرم */
.woocommerce .form-row {
    margin-bottom: 1rem;
}


.woocommerce .form-row input
.woocommerce .form-row select,
.woocommerce .form-row textarea {
border-radius: 8px;
border: 1.5px solid rgba(var(--border-color-rgb), 0.30);
background: #FFF;
    font-size: 1rem;
}

/* چک‌باکس‌ها */
.woocommerce .form-row .checkbox {
    margin-left: 0.5rem;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .checkout-main-section {
        flex-direction: column;
    }
    
    .payment-section,
    .order-review-section {
        flex: 1 1 100%;
    }
    
    .order-review-section {
        order: -1;
    }
}

@media (max-width: 576px) {
    .account-section.shadow-around {
        border-radius: 16px;
        margin-bottom: 2rem;
        
    }
    
    
    .checkout-main-section {
        gap: 1rem;
    }
    .woocommerce-checkout.p-4{
        padding:0 !important;
    }
}

/* انیمیشن برای بخش‌های قابل گسترش */
.checkout-section-content {
    transition: all 0.3s ease;
}

/* استایل کوپن فرم */
.checkout_coupon {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    margin-top: 1rem;
}

.checkout_coupon .form-row {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.checkout_coupon input {
    flex: 1;
}

.checkout_coupon .button {
    background: #d9534f;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
}
#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment{
    background:#fff;
    border-radius:24px;
}
.woocommerce ul.order_details::after, .woocommerce ul.order_details::before{
    content:none
}
.woocommerce ul.order_details {
    margin: 0 0 3em;
    list-style: none;
    border-radius: 16px;
    background: rgba(var(--border-color-rgb), 0.10);
    padding: 16px;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.woocommerce ul.order_details li {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 16px;
    padding: 15px;
}

/* برای حالت موبایل */
@media (max-width: 768px) {
    .woocommerce ul.order_details {
        grid-template-columns: repeat(1, 1fr);
        background:transparent;
    }
    .woocommerce ul.order_details li{
        margin:0;
           border:1px solid rgba(var(--border-color-rgb), 0.30);
           border-radius:16px;
    }
    .woocommerce ul.order_details li:last-of-type{
        border:1px solid rgba(var(--border-color-rgb), 0.50);
    }
}
.woocommerce ul.order_details li strong{
   font-size: 1.05em;
    color: rgba(var(--border-color-rgb), 0.75);
    font-weight: 600;
}
.woocommerce ul.order_details li bdi{
    display:block;
}
.woocommerce-order-details__title{
        color:var(--primary-color);
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 30px;
    margin-bottom: 20px;
}
.woocommerce-order-details__container {
    overflow: hidden;
    margin-bottom: 30px;
}

.order-details-actions {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    gap: 15px;
}

.order-actions__label {
    font-weight: 600;
    min-width: 80px;
}

.order-actions__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-details-totals {
    padding: 20px;
    background-color: #fff;
}

.order-total-row {
       display: grid;
    grid-template-columns: 1fr 1fr; 
    align-items: center;
    padding: 10px 0;
}

.order-total-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 16px;
    padding-top: 12px;
    border-top: 2px solid rgba(var(--border-color-rgb), 0.3);
    margin-top: 8px;
}


.order-total-value {
    font-weight: 600;
}

.order-details-note {
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid rgba(var(--border-color-rgb), 0.3);
}

.order-note-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.order-note-content {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-right: 3px solid #007cba;
}
.order-total{
        background: rgba(var(--border-color-rgb), 0.10);
                border-radius:8px;
        padding:10px 20px;
}
/* Responsive Design */
@media (max-width: 768px) {
    .order-details-header {
        display: none;
    }
    
    .order-details-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-actions__buttons {
        width: 100%;
    }
    
    .order-actions__buttons a {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
}

/* Modern Button Styles */
.order-actions-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.order-actions-button:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}
.order-details-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid rgba(var(--border-color-rgb), 0.3);
    background: #fff;
    transition: all 0.2s ease;
    border-radius:16px;
    margin-bottom:18px;
}

.order-details-item:hover {
    border-color: rgba(200, 59, 59, 1);
}

.order-item-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

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

.product-details {
    flex: 1;
}

.product-name h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 400;
    color: rgba(var(--border-color-rgb), 0.75);
}

.product-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: #007cba;
}

.wc-item-meta {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc-item-meta li {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.wc-item-meta-label {
    font-weight: 500;
    color: #555;
}

.wc-item-meta-value {
    color: #777;
}

.product-purchase-note {
    margin-top: 10px;
    padding: 10px;
    background: #fff8e1;
    border-radius: 4px;
    border-right: 3px solid #ffc107;
}

.purchase-note-label {
    font-weight: 600;
    font-size: 12px;
    color: #e65100;
    margin-bottom: 5px;
}

.purchase-note-content {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.order-item-quantity,
.order-item-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.quantity-label,
.total-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.quantity-value,
.total-value {
    font-size: 16px;
    font-weight: 600;

}

/* استایل‌های ریسپانسیو */
@media (max-width: 768px) {
    .order-details-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .order-item-product {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .product-image {
        align-self: center;
    }
    
    .order-item-quantity,
    .order-item-total {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .quantity-label,
    .total-label {
        font-size: 14px;
    }
}

/* استایل‌های هماهنگ با سایر بخش‌ها */
.order-details-items {
    background: #fff;
    overflow: hidden;
}

/* انیمیشن‌های ظریف */
.order-details-item {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل برای محصولات دانلودی */
.downloadable .product-image::after {
    content: "📥";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #007cba;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.order-details-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 15px;
    font-weight: 500;
    font-size: 18px;
}

.header-product,
.header-quantity,
.header-total {
    text-align: center;
}
.header-product{
    text-align:right
}
@media (max-width: 768px) {
    .order-details-header {
        display: none;
    }
    .coupon-toggle{
        color:var(--text-color);
    }
    .coupon-toggle span.text-muted{
        display:none;
    }
    .wc_payment_method{
        padding:0 !important;
    }
    .coupon-section{
        padding:1rem;
        margin-bottom:10px;
    }
    .coupon-form input[type="text"]{
        width:62%;
        padding:4px;
    }
    .woocommerce-checkout #payment{
        padding:15px;
        margin:0;
    }
}
.woocommerce-Address-title{
    font-size:18px;
}