/* === Skeleton / Shimmer === */
.skeleton { position: relative; overflow: hidden; }
.skeleton .shimmer {
    display:block; width:100%; height:12px; border-radius:6px; margin:6px 0;
    background: #eee;
    position: relative; overflow: hidden;
}
.skeleton .shimmer::after {
    content:""; position:absolute; inset:0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    animation: wccc-shimmer 1.1s infinite;
}
@keyframes wccc-shimmer {
    100% { transform: translateX(100%); }
}

.skeleton .shimmer.short { width: 40%; }
.skeleton .shimmer.med   { width: 65%; }
.skeleton .shimmer.long  { width: 85%; }
.skeleton .avatar { width:36px; height:36px; border-radius:50%; background:#eee; position: relative; overflow:hidden; }
.skeleton .avatar::after {
    content:""; position:absolute; inset:0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    animation: wccc-shimmer 1.1s infinite;
}

.skeleton-card {
    border:1px solid #eee; border-radius:10px; padding:14px; margin-bottom:10px; background:#fafafa;
    display:flex; gap:12px; align-items:center;
}
.skeleton-col { flex:1; }
.skeleton-list { display:block; }
.skeleton-badge { width:72px; height:18px; border-radius:9px; background:#eee; position:relative; overflow:hidden; }
.skeleton-badge::after {
    content:""; position:absolute; inset:0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    animation: wccc-shimmer 1.1s infinite;
}

/* === Summary Overlay Skeleton === */
/* والد باید relative باشد */
#wccc-summary { position: relative; }

/* اسکلت به صورت روکش روی کل باکس */
#wccc-summary-skeleton{
    position:absolute; inset:0; display:none; pointer-events:none; padding:16px; background:transparent;
}
/* وقتی مشغولیم: اسکلت روشن، محتوای واقعی مخفی (بدون تغییر ارتفاع) */
#wccc-summary.is-busy #wccc-summary-skeleton{ display:block; }
#wccc-summary.is-busy .summary-content{ visibility:hidden; }

/* ارتفاع/مارجین اسکلت را با ردیف‌های واقعی یکی کن */
#wccc-summary-skeleton .row{ display:flex; align-items:center; justify-content:space-between; height:28px; margin:10px 0; }
#wccc-summary-skeleton .shimmer{ display:inline-block; height:12px; border-radius:6px;
    background:linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%);
    background-size:400% 100%; animation:shimmer 1.2s ease-in-out infinite;
}
#wccc-summary-skeleton .short{ width:120px; }
#wccc-summary-skeleton .med{ width:180px; }
#wccc-summary-skeleton .price{ width:110px; height:14px; border-radius:7px;
    background:linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%);
    background-size:400% 100%; animation:shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}


/* Shipping methods skeleton: card style */
.shipping-skeleton .skeleton-card { align-items:flex-start; }
.shipping-skeleton .price { width:100px; height:14px; border-radius:7px; background:#eee; position:relative; overflow:hidden; }
.shipping-skeleton .price::after {
    content:""; position:absolute; inset:0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    animation: wccc-shimmer 1.1s infinite;
}


/* کلاس کمکی برای مخفی کردن کامل یک عنصر */
.d-none {
    display: none !important;
}

/* استایل پایه برای گروه فیلدها */
.wccc-form-group {
    position: relative;
    padding-bottom: 1.25rem; /* فضا برای پیام خطا */
}

/* استایل پایه برای پیام خطا (به صورت پیش‌فرض مخفی) */
.invalid-feedback {
    display: none;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    margin-top: .25rem;
    font-size: 80%;
    color: #dc3545;
}

/* نمایش پیام خطا فقط زمانی که فیلد نامعتبر است */
.is-invalid ~ .invalid-feedback {
    display: block;
}
/* سازگاری با فیلدهای Select2 (اگر استفاده شود) */
.select2-container + .invalid-feedback {
    display: none;
}
.is-invalid + .select2-container + .invalid-feedback {
    display: block;
}


/* استایل بردر سبز برای فیلد معتبر */
.wccc-form-control.is-valid,
.woocommerce-input-wrapper > .is-valid {
    border-color: #28a745 !important;
}
.wccc-form-control.is-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, .25) !important;
}

/* استایل بردر قرمز برای فیلد نامعتبر */
.wccc-form-control.is-invalid,
.woocommerce-input-wrapper > .is-invalid {
    border-color: #dc3545 !important;
}
.wccc-form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, .25) !important;
}





button {
    font-family: inherit;
}
input {
    font-family: inherit;
}
select {
    font-family: inherit;
}

.wccc-cart-item {
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
}
textarea {
    font-family: inherit;
}
.address-selected-modern {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(50, 60, 90, 0.07);
    padding: 15px 20px;
    margin-bottom: 32px;
    border: 1px solid #91b4ff;
}
.address-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}
.address-selected-title {
    font-size: 16px;
    font-weight: 600;
    color: #1976d2;
    display: flex;
    align-items: center;
}
.btn-modern.address-change-btn {
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(80,100,140,.08);
    transition: background .2s;
    display: flex;
    align-items: center;
}

.address-selected-body {
    font-size: 14px;
    color: #151515;
    font-weight: 400;
    line-height: 25px;
    margin-top: 15px;
}
@media (max-width: 600px) {
    .address-selected-modern { padding: 16px 8px; }
    .address-selected-title { font-size: 1rem; }
    .btn-modern.address-change-btn { font-size: .98rem; padding: 8px 10px;}
}































/* ✅ جعبه آدرس فعلی */
.current-address-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 24px;
}
.current-address-box h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #2d3748;
}
#changeAddressBtn {
    padding: 8px 14px;
    border: none;
    background-color: #2563eb;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
#changeAddressBtn:hover {
    background-color: #1d4ed8;
}
/* نذار تصاویر تایل مقیاس بگیرن */
.leaflet-container img,
.leaflet-container .leaflet-tile,
.leaflet-pane > img.leaflet-image-layer {
    max-width: none !important;
}

/* ظرف نقشه حتماً ارتفاع داشته باشه */
.modern-form__map,
#wccc-map {
    width: 100%;
    height: 340px; /* هر ارتفاع ثابتی که می‌خوای */
    position: relative;
}

/* ✅ مودال مدیریت آدرس */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 24px;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    position: relative;
}
.close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
}
.close-modal:hover {
    color: #4a5568;
}

/* ✅ تب‌ها */
.tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}
.tab-button {
    padding: 10px 20px;
    font-size: 14px;
    color: #4a5568;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}
.tab-button.active {
    color: #2563eb;
    font-weight: bold;
    border-bottom-color: #2563eb;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* ✅ لیست آدرس‌ها */
#wccc-address-list {
    margin-top: 16px;
}
.address-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #fff;
}
.address-card h4 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #2d3748;
}
.address-card p {
    font-size: 14px;
    color: #4a5568;
}
.default-badge {
    display: inline-block;
    font-size: 11px;
    color: #2563eb;
    background-color: #ebf8ff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 8px;
}
.select-address-btn,
.delete-address-btn {
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 10px;
    margin-right: 6px;
    border: none;
}
.select-address-btn {
    background-color: #2563eb;
    color: white;
}
.select-address-btn:hover {
    background-color: #1d4ed8;
}
.delete-address-btn {
    color: #e53e3e;
}
.delete-address-btn:hover {
    color: #e71919;
}

/* ✅ فرم افزودن آدرس */
#wccc-add-address-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 4px;
}
#wccc-add-address-form input,
#wccc-add-address-form textarea {
    width: 100%;
    font-size: 14px;
    padding: 10px;
    margin-bottom: 16px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-sizing: border-box;
}
#wccc-add-address-form input:focus,
#wccc-add-address-form textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 1px #2563eb40;
}
#wccc-add-address-form button {
    margin-top: 8px;
}
#saveAddressBtn {
    background-color: #2563eb;
    color: white;
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}
}
#saveAddressBtn:hover {
    background-color: #1d4ed8;
}
#cancelAddressBtn {
    background-color: transparent;
    color: #4a5568;
    border: 1px solid #cbd5e0;
    padding: 8px 18px;
    border-radius: 6px;
    margin-right: 10px;
    font-size: 14px;
    cursor: pointer;
}
#cancelAddressBtn:hover {
    background-color: #f7fafc;
}

/* ✅ نقشه */
#wccc-map {
    width: 100%;
    height: 300px;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}












.modal-no-address {
    text-align: center;
    margin: 31px 0 !important;
    background: #DFDFDF2E;
    padding: 25px;
    border-radius: 5px;
    font-weight: 500;
}

/* مودال مدرن */
.modal-modern .modal-content {
    background-color: #fff;
    margin: 4% auto;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 8px 36px rgba(25, 75, 180, 0.10);
    max-width: 520px;
    min-width: 320px;
}
.close-modal {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    background: none;
    border: none;
    transition: color .17s;
}
.close-modal:hover { color: #2563eb; }
/* تب‌های مدرن */
.tabs-modern {
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 5px;
    margin-bottom: 22px;
}
.tabs-modern .tab-button {
    background: #f4f8fb;
    color: #4a5568;
    padding: 9px 20px;
    font-size: 15px;
    border: none;
    border-bottom: 2.5px solid transparent;
    border-radius: 8px 8px 0 0;
    margin-left: 5px;
    transition: all .18s;
    cursor: pointer;
}
.tabs-modern .tab-button.active {
    background: #2563eb;
    color: #fff;
    border-bottom: 2.5px solid #2563eb;
    font-weight: bold;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* لیست آدرس مدرن */
.address-list-modern {
    margin-top: 13px;
}
.address-card-modern, .wccc-address-item.default {
    border: 1.3px solid #e0e7ef;
    border-radius: 8px;
    background: #f8faff;
    padding: 13px 14px;
    margin-bottom: 13px;
    transition: border .14s, background .14s;
    cursor: pointer;
}
.wccc-address-item.default, .address-card-modern.default {
    border: 2px solid #2563eb;
    background: #e7f0ff;
}
.address-label-modern {
    font-size: 1.09rem;
    font-weight: 600;
    color: #2563eb;
}
.address-summary-modern {
    color: #4a5568;
    font-size: .98rem;
    margin-top: 2px;
}
.address-empty-modern {
    text-align: center;
    color: #bbb;
    font-size: .98rem;
    margin: 18px 0 14px 0;
}

/* دکمه مدرن */
.modern-btn-main {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 8px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .16s;
}
.modern-btn-main:hover { background: #1943b9; }
.modern-btn-outlined {
    background: #2563eb;
    color: white;
    border-radius: 7px;
    padding: 8px 22px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .16s, color .16s;
    width: 100%;
}
.modern-btn-outlined:hover {
    background: #0b49d0;
    color: #fff;
}

.modern-form label, .modern-checkbox-label {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 3px;
}
.modern-form input,
.modern-form textarea,
.modern-form select {
    width: 100%;
    font-size: 14px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1.2px solid #cbd5e0;
    border-radius: 6px;
    background: #fafdff;
    box-sizing: border-box;
    transition: border .13s, background .13s;
}
.modern-form input:focus,
.modern-form textarea:focus,
.modern-form select:focus {
    border-color: #2563eb;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 1px #2563eb33;
}
.modern-form-actions { margin-top: 10px; }

/* نقشه */
#wccc-map {
    height: 240px !important;
    border: 1.2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ریسپانسیو */
@media (max-width:600px) {
    .modal-content-modern { padding: 10px 4px; min-width: unset; max-width: 97vw; }
    .tabs-modern .tab-button { font-size: 14px; padding: 7px 7px; }
    .modern-btn-main, .modern-btn-outlined { font-size: 14px; padding: 8px 8px; }
    .address-card-modern { padding: 7px 3px; }
}











.shipping-cost-modern-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(60,80,130,0.07);
    padding: 10px 18px 18px 18px;
    margin-bottom: 32px;
    transition: box-shadow .18s;
    border: 1px solid #e0e0e2;
}
.shipping-cost-modern-header, .shipping-methods-modern {
    margin-bottom: 17px;
}
.shipping-modern-title {
    font-size: 16.5px;
    color: #252525;
    font-weight: 600;
    margin-bottom: 7px;
}
.shipping-modern-value {
    font-size: 18px;
    color: #374151;
    font-weight: 700;
    margin-right: 7px;
    margin-bottom: 5px;
}
.shipping-modern-list {
    margin-top: 10px;
}
.shipping-modern-btn {
    width: 100%;
    background: linear-gradient(90deg,#2563eb 70%,#43a047 100%);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    margin-top: 12px;
    cursor: pointer;
    transition: background .18s, color .13s;
}
.shipping-modern-btn[disabled], .shipping-modern-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #e2e8f0;
    color: #94a3b8;
}
.shipping-modern-btn:not([disabled]):hover {
    background: linear-gradient(90deg,#1943b9 70%,#388e3c 100%);
}

@media (max-width: 600px) {
    .shipping-cost-modern-wrapper { padding: 14px 3px; max-width: 99vw; }
    .shipping-modern-btn { font-size: 15px; padding: 10px 0; }
}


.shipping-method-card-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}




.shipping-method-card {
    display: flex;
    align-items: flex-start;
    border: 2px solid #e3e7f1;
    border-radius: 13px;
    padding: 24px 20px 22px 18px;
    background: #fbfcfe;
    margin-bottom: 18px;
    transition: border-color .22s, box-shadow .19s, background .18s;
    position: relative;
    font-size: 16px;
    box-shadow: 0 2px 14px rgba(80,120,170,0.06);
    cursor: pointer;
    gap: 0 18px;
    /* فقط برای انتخاب‌پذیری کل کارت */
    user-select: none;
}

.shipping-method-card input[type="radio"] {
    display: none !important;
}

.shipping-method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px 0;
}

.shipping-method-title {
    font-weight: 700;
    color: #19376d;
    display: flex;
    align-items: center;
    font-size: 1.13rem;
    margin-bottom: 3px;
    gap: 0 8px;
    letter-spacing: -0.1px;
}

.shipping-method-detail {
    color: #6d7d8b;
    font-size: 0.99rem;
    margin-top: 2px;
    margin-right: 2px;
}

.shipping-method-price {
    font-weight: 700;
    color: #2563eb;
    font-size: 1.13rem;
    min-width: 100px;
    margin-right: 10px;
    margin-top: 7px;
    text-align: left;
}

.shipping-method-card .shipping-method-check {
    display: none !important;
}

.shipping-method-card.selected {
    border-color: #2563eb !important;
    background: linear-gradient(95deg,#f3f7ff 60%,#eaf2ff 100%);
    box-shadow: 0 6px 36px -6px #2563eb23;
}

.shipping-method-card.selected .shipping-method-title {
    color: #2563eb;
    font-weight: 900;
    letter-spacing: -0.25px;
}

.shipping-method-card.selected .shipping-method-price {
    color: #24a21c;
    font-weight: 900;
    letter-spacing: 0.1px;
}

.shipping-method-card.selected .shipping-method-detail {
    color: #459fff;
}

.shipping-method-card:hover {
    border-color: #497ff6;
    background: #f5faff;
    box-shadow: 0 2px 22px -6px #2563eb25;
}

.shipping-method-card svg {
    color: #1e293b !important;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    opacity: 0.94;
}

@media (max-width: 600px) {
    .shipping-method-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 13px 6px;
        gap: 8px 0;
    }
    .shipping-method-price { margin-right: 0; margin-top: 9px; min-width: unset;}
}






.wccc-summary-modern {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 18px rgba(40,60,150,0.10);
    padding: 28px 22px 18px 22px;
    max-width: 340px;
    margin: 0 auto 30px auto;
    font-family: inherit;
    color: #203050;
}

.summary-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 20px;
}
.summary-header h3 {
    font-size: 19.5px;
    color: #2563eb;
    font-weight: 800;
    margin: 0;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    padding: 8px 0;
    border-bottom: 1px dashed #f1f5fa;
}
.summary-label {
    color: #475569;
    font-weight: 500;
    flex: 1 1 50%;
}
.summary-value {
    font-weight: 700;
    color: #2c425e;
    min-width: 70px;
    text-align: left;
    flex: 0 0 auto;
}
.summary-currency {
    color: #94a3b8;
    font-size: 13px;
    margin-right: 4px;
}

.summary-discount {
    color: #f43f5e !important;
    font-weight: 700;
}

.summary-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 17.5px;
    padding: 14px 0 5px 0;
    margin-top: 9px;
    font-weight: 900;
    border-top: 2px solid #dbeafe;
}
.summary-total-value {
    color: #22c55e;
    font-size: 20px;
    font-weight: 900;
    min-width: 80px;
}
.total-label {
    color: #0d162f;
}
.total-currency {
    color: #22c55e;
    font-weight: 700;
    font-size: 15px;
    margin-right: 4px;
}

@media (max-width: 600px) {
    .wccc-summary-modern {
        max-width: 98vw;
        padding: 16px 6px 10px 6px;
    }
    .summary-header h3 { font-size: 16.5px;}
    .summary-row, .summary-total-row { font-size: 13.2px;}
    .summary-total-value { font-size: 16.5px;}
}


















/* لایه‌بندی دو ستونه */
.wccc-layout {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin-top: 20px;
}

/* ستون اصلی */
.wccc-main {
    flex: 0 0 70%;
}

/* ستون خلاصهٔ سفارش */
.wccc-summary {
    flex: 0 0 30%;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wccc-summary h3 {
    margin-top: 0;
    font-size: 18px;
}

.wccc-summary p {
    margin: 10px 0;
    font-size: 16px;
}

#wccc-next-to-payment {
    width: 100%;
    margin-top: 20px;
}
.no-address {
    color: #555;
    font-style: italic;
    padding: 15px;
    background: #fafafa;
    border: 1px dashed #ccc;
    text-align: center;
}



/* ===== ۱. ساختار ردیف‌ها ===== */
#wccc-add-address-form .wccc-form-row {
    display: flex;
    gap: 20px;               /* فاصلهٔ بین ستون‌ها */
    align-items: flex-start; /* تراز رأس فیلدها */
    margin-bottom: 24px;     /* فاصلهٔ بین ردیف‌ها */
}

/* ===== ۲. تعریف گروه‌های عرض ===== */
#wccc-add-address-form .wccc-form-group {
    display: flex;
    flex-direction: column;
}

/* تمام عرض (۱۰۰٪) */
#wccc-add-address-form .wccc-form-group--full {
    flex: 0 0 100%;
}


/* عرض خودکار (۲۵٪) */
#wccc-add-address-form .wccc-form-group--auto {
    flex: 0 0 25%;
}


/* ===== ۳. یکسان‌سازی پاره‌فیلد ووکامرس (<p class="form-row">) ===== */
#wccc-add-address-form p.form-row {
    display: flex;
    flex-direction: column;
    margin: 0;
    width: 100%;
}

#wccc-add-address-form p.form-row label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

/* override select داخل p.form-row */
#wccc-add-address-form p.form-row select {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    margin: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

/* ===== ۴. یکسان‌سازی همهٔ کنترل‌ها ===== */
#wccc-add-address-form .wccc-form-control,
#wccc-add-address-form textarea.wccc-form-control {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    transition: border-color .2s ease, box-shadow .2s ease;
    margin: 0;          /* حذف مارجین اضافی */
}

/* ارتفاع یکنواخت برای input/select */
#wccc-add-address-form .wccc-form-control[type="text"],
#wccc-add-address-form .wccc-form-control[type="tel"],
#wccc-add-address-form .wccc-form-control[type="number"],
#wccc-add-address-form .wccc-form-control select {
    height: 44px;
}

/* ارتفاع مناسب برای textarea */
#wccc-add-address-form textarea.wccc-form-control {
    min-height: 100px;
    resize: vertical;
}

/* ===== ۵. استایل فوکوس ===== */
#wccc-add-address-form .wccc-form-control:focus,
#wccc-add-address-form p.form-row select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.2);
    outline: none;
}

/* ===== ۶. لیبل‌ها ===== */
#wccc-add-address-form .wccc-form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

/* ===== ۷. نقشه ===== */
.modern-form__map {
    width: 100%;
    height: 300px;
    margin-bottom: 24px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
}

/* ===== ۸. چک‌باکس پیش‌فرض ===== */
.improved-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 32px;
    margin: 0;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    user-select: none;
}
.improved-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.improved-checkbox .checkbox-custom {
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    border: 2px solid #1976d2;
    border-radius: 4px;
    background: #fff;
    transition: background .2s;
}
.improved-checkbox input:checked ~ .checkbox-custom {
    background: #1976d2;
}
.improved-checkbox .checkbox-custom::after {
    content: "";
    position: absolute;
    display: none;
}
.improved-checkbox input:checked ~ .checkbox-custom::after {
    display: block;
    left: 5px; top: 2px;
    width: 6px; height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== ۹. دکمه‌ها ===== */
.modern-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.modern-form-actions .primary-btn,
.modern-form-actions .secondary-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}
.modern-form-actions .primary-btn {
    background-color: #1976d2;
    color: #fff;
}
.modern-form-actions .secondary-btn {
    background-color: #f0f0f0;
    color: #333;
}

/* ===== ۱۰. واکنش‌گرایی موبایل ===== */
@media (max-width: 768px) {
    #wccc-add-address-form .wccc-form-row {
        flex-direction: column;
    }
    #wccc-add-address-form .wccc-form-group,
    #wccc-add-address-form p.form-row {
        flex: 0 0 100% !important;
    }
}

/* ========================================================================
   BASE STYLES
   ======================================================================== */

/* کانتینر اصلی: فرم و خلاصه سفارش کنار هم */
.wccc-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ستون فرم: ۷۰٪ */
.wccc-main {
    flex: 0 0 70%;
}

/* ستون خلاصه سفارش: ۳۰٪ */
.wccc-summary {
    flex: 0 0 30%;
}

/* ردیف‌های فرم */
#wccc-add-address-form .wccc-form-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

/* گروه‌های عرض */
#wccc-add-address-form .wccc-form-group {
    display: flex;
    flex-direction: column;
}

/* عرض ۱۰۰٪ */
#wccc-add-address-form .wccc-form-group--full {
    flex: 0 0 100%;
}
#wccc-add-address-form .wccc-form-group--half {
    flex: 0 0 48%;
}

/* عرض ۲۵٪ */
#wccc-add-address-form .wccc-form-group--auto {
    flex: 0 0 25%;
}

/* استانداردسازی <p class="form-row"> ووکامرس */
#wccc-add-address-form p.form-row {
    display: flex;
    flex-direction: column;
    margin: 0;
    width: 100%;
}
#wccc-add-address-form p.form-row label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}
#wccc-add-address-form p.form-row select {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    margin: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

/* ورودی‌ها و textarea */
#wccc-add-address-form .wccc-form-control {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    transition: border-color .2s ease, box-shadow .2s ease;
    margin: 0;
    height: 44px;
}
#wccc-add-address-form textarea.wccc-form-control {
    min-height: 100px;
    resize: vertical;
}

/* برچسب‌ها */
#wccc-add-address-form .wccc-form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

/* نقشه */
.modern-form__map {
    width: 100%;
    height: 300px;
    margin-bottom: 24px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
}

/* چک‌باکس */
.improved-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 32px;
    margin: 0;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    user-select: none;
}
.improved-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.improved-checkbox .checkbox-custom {
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    border: 2px solid #1976d2;
    border-radius: 4px;
    background: #fff;
    transition: background .2s;
}
.improved-checkbox input:checked ~ .checkbox-custom {
    background: #1976d2;
}
.improved-checkbox .checkbox-custom::after {
    content: "";
    position: absolute;
    display: none;
}
.improved-checkbox input:checked ~ .checkbox-custom::after {
    display: block;
    left: 5px; top: 2px;
    width: 6px; height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* دکمه‌ها */
.modern-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.modern-form-actions .primary-btn,
.modern-form-actions .secondary-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}
.modern-form-actions .primary-btn {
    background-color: #1976d2;
    color: #fff;
}
.modern-form-actions .secondary-btn {
    background-color: #f0f0f0;
    color: #333;
}

/* خلاصه سفارش */
.wccc-summary-modern {
    background: #fff;
    border: 1px solid #ccd0d5;
    border-radius: 8px;
    padding: 20px;
}
.wccc-summary-modern .summary-header h3 {
    margin: 0 0 16px;
    font-size: 1.25rem;
}
.wccc-summary-modern .summary-row,
.wccc-summary-modern .summary-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.wccc-summary-modern .total-label {
    font-weight: 600;
}
.wccc-summary-modern .summary-total-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ========================================================================
   RESPONSIVE BREAKPOINTS
   ======================================================================== */

/* تبلت بزرگ: تا 1024px */
@media (max-width: 1024px) {
    .wccc-layout {
        flex-direction: column;
    }
    .wccc-main,
    .wccc-summary {
        flex: 0 0 100%;
    }
    .wccc-summary {
        margin-top: 32px;
    }
}

/* تبلت کوچک: تا 768px */
@media (max-width: 768px) {
    #wccc-add-address-form .wccc-form-row {
        flex-direction: column;
    }
    #wccc-add-address-form .wccc-form-group,
    #wccc-add-address-form p.form-row {
        flex: 0 0 100% !important;
    }
}

/* موبایل: تا 480px */
@media (max-width: 480px) {
    /* کمتر کردن فاصله‌ها برای موبایل */
    .wccc-layout {
        gap: 2px;
    }
    #wccc-add-address-form .wccc-form-row {
        margin-bottom: 16px;
        gap: 12px;
    }
    #wccc-add-address-form .wccc-form-control {
        padding: 8px 10px;
        font-size: 0.9rem;
        height: 40px;
    }
    .modern-form-actions {
        flex-direction: column;
        gap: 8px;
    }
    .modern-form-actions .primary-btn,
    .modern-form-actions .secondary-btn {
        width: 100%;
        padding: 10px 0;
    }
    .wccc-summary-modern {
        padding: 16px;
        margin: 0;
        margin-top: 0px;
        width: 100%;
    }
    .wccc-summary-modern .summary-row,
    .wccc-summary-modern .summary-total-row {
        margin-bottom: 8px;
    }
}


.summary-discount-row { /* فقط وقتی PHP رندر کند نمایش می‌یابد */ }

.complete-order-wrapper {
    margin-top: 24px;
    text-align: center;
}
.complete-order-wrapper .primary-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    border-radius: 6px;
}
.complete-order-wrapper .primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
