/* ══════════════════════════════════════════════════════════════════
   WC Divar Grid — style.css v1.2.0
   ══════════════════════════════════════════════════════════════════ */

   .wcdg-wrap,
   .wcdg-wrap * {
       box-sizing: border-box;
       font-family: IRANYekanX, IRANYekan, "Yekan Bakh", Tahoma, sans-serif !important;
   }
   
   .wcdg-wrap {
       direction: rtl;
   }
   
   .wcdg-list {
       display: flex;
       flex-direction: column;
       gap: 0;
   }
   
   /* ══════════════════════════════════════════════════════════════════
      کارت محصول
      ══════════════════════════════════════════════════════════════════ */
   
   .dv-card {
       background: #fff;
       border-bottom: 1px solid #eee;
       padding: 12px 0;
   }
   
   .dv-link {
       display: flex;
       flex-direction: row-reverse;
       gap: 12px;
       text-decoration: none;
       color: inherit;
       align-items: flex-start;
   }
   
   .dv-thumb {
       flex: 0 0 40%;
       width: 40%;
       max-width: 40%;
       aspect-ratio: 1 / 1;
       overflow: hidden;
       background: #f5f5f5;
   }
   
   .dv-thumb img {
       width: 100%;
       height: 100%;
       object-fit: cover;
       display: block;
   }
   
   .dv-content {
       flex: 1;
       padding: 0;
       min-width: 0;
   }
   
   .dv-title {
       font-size: 14px;
       font-weight: 700;
       line-height: 1.8;
       margin: 0 0 6px;
       color: #111;
   }
   
   .dv-price {
       display: flex;
       flex-direction: row;
       align-items: baseline;
       justify-content: flex-start;
       direction: ltr;
       gap: 6px;
       margin-bottom: 8px;
       line-height: 1.6;
       color: #000;
   }
   
   .dv-price .toman-label {
       order: 1;
       font-size: 11px !important;
       font-weight: 500 !important;
       color: #8a8a8a !important;
       line-height: 1;
       white-space: nowrap;
       position: relative;
       top: -1px;
   }
   
   .dv-price .price-amount {
       order: 2;
       display: inline-flex;
       align-items: baseline;
       font-size: 13px;
       font-weight: 700;
       color: #000;
   }
   
   .dv-price .price-amount *,
   .dv-price .woocommerce-Price-amount,
   .dv-price .woocommerce-Price-amount bdi,
   .dv-price del,
   .dv-price ins {
       font-size: 12.5px !important;
       font-weight: 700 !important;
       color: #000 !important;
       text-decoration: none;
   }
   
   .dv-price del {
       opacity: .55;
       margin-right: 4px;
   }
   
   .dv-price .woocommerce-Price-amount::after,
   .dv-price .woocommerce-Price-amount.amount::after,
   .dv-price .amount::after {
       content: none !important;
       display: none !important;
   }
   
   .dv-price .woocommerce-Price-currencySymbol {
       display: none !important;
   }
   
   .dv-contact {
       display: inline-flex;
       align-items: center;
       gap: 5px;
       font-size: 13px;
       font-weight: 700;
       color: #1a6fc4;
       margin-bottom: 8px;
   }
   
   .dv-contact::before {
       content: '';
       display: inline-block;
       width: 7px;
       height: 7px;
       border-radius: 50%;
       background: #1a6fc4;
       flex-shrink: 0;
   }
   
   .wc-meta-row {
       display: flex;
       gap: 6px;
       margin-top: 6px;
   }
   
   .wc-id,
   .wc-guarantee {
       flex: 1;
       display: flex;
       align-items: center;
       justify-content: center;
       min-height: 30px;
       padding: 6px 8px;
       font-size: 11px;
       font-weight: 700;
       text-align: center;
       white-space: nowrap;
       border-radius: 5px;
   }
   
   .wc-id {
       background: #f0f0f0;
       color: #444;
   }
   
   .wc-guarantee {
       background: rgba(0, 168, 107, .12);
       color: #00a86b;
       font-weight: 800;
   }
   
   .wcdg-empty {
       text-align: center;
       padding: 32px 16px;
       border: 1px dashed #ddd;
       border-radius: 12px;
       color: #666;
       background: #fafafa;
       font-size: 14px;
       margin: 12px 0;
   }
   
   /* ══════════════════════════════════════════════════════════════════
      فیلتر درون‌خطی
      ══════════════════════════════════════════════════════════════════ */
   
   .wcdg-inline-filter {
       padding: 4px 0;
       border-bottom: 1px solid #eee;
       margin: 0 0 4px;
   }
   
   .wcdg-inline-filter--empty {
       margin-bottom: 8px;
   }
   
   .wcdg-if-section {
       padding: 10px 0;
   }
   
   /*
    * خط جداکننده — فقط بین section‌ها.
    * هیچ border یا margin بیرونی روی wcdg-inline-filter بالا نیست
    * که بالای اولین فیلتر خط اضافه بگذارد.
    */
   .wcdg-if-divider {
       height: 1px;
       background: #f0f0f0;
       margin: 0;
   }
   
   /* ── جستجو ───────────────────────────────────────────────────────── */
   
   .wcdg-search-wrap {
       position: relative;
   }
   
   .wcdg-search-wrap .wcdg-if-input {
       padding-left: 36px;
   }
   
   .wcdg-clear-search {
       position: absolute;
       left: 10px;
       top: 50%;
       transform: translateY(-50%);
       width: 24px;
       height: 24px;
       display: none;
       align-items: center;
       justify-content: center;
       background: none;
       border: none;
       padding: 4px;
       cursor: pointer;
       color: #999;
       transition: color .15s;
       touch-action: manipulation;
       -webkit-tap-highlight-color: transparent;
       z-index: 2;
   }
   
   .wcdg-clear-search:hover {
       color: #333;
   }
   
   .wcdg-clear-search svg {
       width: 10px;
       height: 10px;
       display: block;
       pointer-events: none;
   }
   
   .wcdg-clear-search.is-visible {
       display: flex;
   }
   
   /* ── ورودی ───────────────────────────────────────────────────────── */
   
   .wcdg-if-input[type="text"],
   .wcdg-if-input[type="number"] {
       width: 100%;
       padding: 9px 12px;
       border: 1px solid #e0e0e0;
       border-radius: 8px;
       font-size: 13px;
       font-family: inherit;
       direction: rtl;
       color: #333;
       background: #fafafa;
       transition: border-color .2s, background .2s, box-shadow .2s;
       -moz-appearance: textfield;
       appearance: textfield;
       min-height: 44px;
   }
   
   .wcdg-if-input[type="text"]:focus,
   .wcdg-if-input[type="number"]:focus {
       outline: none;
       border-color: #1a6fc4;
       background: #fff;
       box-shadow: 0 0 0 3px rgba(26, 111, 196, .1);
   }
   
   .wcdg-if-input[type="number"]::-webkit-inner-spin-button,
   .wcdg-if-input[type="number"]::-webkit-outer-spin-button {
       opacity: 1;
   }
   
   /* ── قیمت ───────────────────────────────────────────────────────── */
   
   .wcdg-price-inputs {
       display: flex;
       align-items: center;
       gap: 8px;
   }
   
   .wcdg-price-inputs .wcdg-if-input {
       flex: 1;
       min-width: 0;
   }
   
   .wcdg-price-sep {
       font-size: 12px;
       color: #999;
       white-space: nowrap;
       flex-shrink: 0;
   }
   
   /* ── Toggle ──────────────────────────────────────────────────────── */
   
   .wcdg-if-toggle-label {
       display: flex;
       align-items: center;
       gap: 10px;
       cursor: pointer;
       user-select: none;
       min-height: 44px;
       touch-action: manipulation;
       -webkit-tap-highlight-color: transparent;
   }
   
   .wcdg-if-toggle-input {
       position: absolute;
       opacity: 0;
       width: 0;
       height: 0;
       pointer-events: none;
   }
   
   .wcdg-if-toggle-track {
       position: relative;
       width: 44px;
       height: 26px;
       background: #ddd;
       border-radius: 100px;
       flex-shrink: 0;
       transition: background .25s ease;
   }
   
   .wcdg-if-toggle-thumb {
       position: absolute;
       top: 4px;
       right: 4px;
       width: 18px;
       height: 18px;
       background: #fff;
       border-radius: 50%;
       box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
       transition: right .25s ease;
   }
   
   .wcdg-if-toggle-input:checked ~ .wcdg-if-toggle-track {
       background: #1a6fc4;
   }
   
   .wcdg-if-toggle-input:checked ~ .wcdg-if-toggle-track .wcdg-if-toggle-thumb {
       right: calc(100% - 22px);
   }
   
   .wcdg-if-toggle-text {
       font-size: 13px;
       color: #444;
       transition: color .2s;
   }
   
   .wcdg-if-toggle-input:checked ~ .wcdg-if-toggle-text {
       color: #1a6fc4;
       font-weight: 500;
   }
   
   /* ── Chip ────────────────────────────────────────────────────────── */
   
   .wcdg-if-chip-list {
       display: flex;
       flex-wrap: wrap;
       gap: 8px;
   }
   
   .wcdg-if-chip {
       display: inline-flex;
       cursor: pointer;
       user-select: none;
       touch-action: manipulation;
       -webkit-tap-highlight-color: transparent;
   }
   
   .wcdg-if-chip input[type="checkbox"] {
       position: absolute;
       opacity: 0;
       width: 0;
       height: 0;
       pointer-events: none;
   }
   
   .wcdg-if-chip-text {
       display: inline-flex;
       align-items: center;
       gap: 6px;
       padding: 7px 14px;
       font-size: 12px;
       font-weight: 400;
       color: #555;
       background: #f5f5f5;
       border: 1.5px solid #e8e8e8;
       border-radius: 100px;
       transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
       white-space: nowrap;
       line-height: 1.5;
       min-height: 36px;
   }
   
   .wcdg-if-chip:hover .wcdg-if-chip-text {
       background: #eef3fb;
       border-color: #b3cde8;
       color: #1a6fc4;
   }
   
   .wcdg-if-chip input[type="checkbox"]:checked + .wcdg-if-chip-text {
       background: #1a6fc4;
       border-color: #1a6fc4;
       color: #fff;
       font-weight: 500;
       padding-right: 10px;
       box-shadow: 0 2px 8px rgba(26, 111, 196, .25);
   }
   
   .wcdg-if-chip-x {
       display: none;
       align-items: center;
       justify-content: center;
       width: 16px;
       height: 16px;
       border-radius: 50%;
       background: rgba(255, 255, 255, .25);
       flex-shrink: 0;
       transition: background .15s;
       pointer-events: auto;
       touch-action: manipulation;
       -webkit-tap-highlight-color: transparent;
   }
   
   .wcdg-if-chip-x svg {
       width: 8px;
       height: 8px;
       display: block;
       pointer-events: none;
   }
   
   .wcdg-if-chip input[type="checkbox"]:checked + .wcdg-if-chip-text .wcdg-if-chip-x {
       display: inline-flex;
   }
   
   .wcdg-if-chip-x:hover {
       background: rgba(255, 255, 255, .42);
   }
   
   /* ══════════════════════════════════════════════════════════════════
      صفحه‌بندی
      ══════════════════════════════════════════════════════════════════ */
   
   .wcdg-pagination {
       margin-top: 26px;
       display: flex;
       gap: 8px;
       justify-content: center;
       flex-wrap: wrap;
   }
   
   .wcdg-page-btn {
       padding: 6px 14px;
       border: 1px solid #ddd;
       border-radius: 8px;
       background: #fff;
       color: #111;
       font-size: 13px;
       font-family: inherit;
       cursor: pointer;
       transition: background .2s, border-color .2s, color .2s;
       line-height: 1.5;
       min-height: 36px;
       touch-action: manipulation;
       -webkit-tap-highlight-color: transparent;
   }
   
   .wcdg-page-btn:hover:not(.current) {
       background: #f5f5f5;
       border-color: #bbb;
   }
   
   .wcdg-page-btn.current {
       background: #111;
       color: #fff;
       border-color: #111;
       cursor: default;
       pointer-events: none;
   }
   
   #wcdg-results.wcdg-loading {
       opacity: .4;
       pointer-events: none;
       transition: opacity .2s;
   }
   
   /* ══════════════════════════════════════════════════════════════════
      ریسپانسیو
      ══════════════════════════════════════════════════════════════════ */
   
   @media (max-width: 480px) {
       .dv-thumb {
           flex: 0 0 38%;
           width: 38%;
           max-width: 38%;
       }
   
       .dv-title {
           font-size: 13px;
       }
   
       .wc-id,
       .wc-guarantee {
           font-size: 10px;
           min-height: 28px;
           padding: 5px 6px;
       }
   
       .wcdg-if-chip-text {
           font-size: 12px;
           padding: 6px 12px;
           min-height: 36px;
       }
   }