/* فروشگاه + صفحه محصول — RTL */
:root{
  --xv-brand:#0d9488;
  --xv-brand-dark:#0f766e;
  --xv-shop-cols:2;
  --xv-shop-cols-md:3;
  --xv-shop-cols-lg:4;
}
.xv-shop,.xv-pd{background:#f8fafc;min-height:50vh;font-family:Vazirmatn,Tahoma,sans-serif}
.xv-breadcrumb a{color:#64748b;text-decoration:none}
.xv-breadcrumb .cur{color:#0f172a}
.xv-breadcrumb span{margin:0 .25rem;color:#cbd5e1}

/* فیلتر */
.xv-filter-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1.1rem;position:sticky;top:90px}
.xv-filter-list{max-height:220px;overflow:auto}
.xv-check{display:flex;align-items:center;gap:.45rem;font-size:.82rem;margin-bottom:.35rem;cursor:pointer}
.xv-check input{accent-color:var(--xv-brand)}

/* toolbar */
.xv-shop-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:.7rem 1rem;margin-bottom:1rem}
.xv-cols-switch{display:none;gap:3px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:3px}
.xv-cols-switch button{border:0;background:transparent;width:28px;height:26px;border-radius:7px;color:#64748b;font-weight:700;cursor:pointer}
.xv-cols-switch button.active{background:var(--xv-brand);color:#fff}
@media(min-width:768px){.xv-cols-switch{display:flex}}

/* grid */
.xv-shop-grid{display:grid;grid-template-columns:repeat(var(--xv-shop-cols,2),minmax(0,1fr));gap:.65rem}
@media(min-width:768px){.xv-shop-grid{grid-template-columns:repeat(var(--xv-shop-cols-md,3),minmax(0,1fr));gap:.9rem}}
@media(min-width:1100px){.xv-shop-grid{grid-template-columns:repeat(var(--xv-shop-cols-lg,4),minmax(0,1fr))}}

.xv-p-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;height:100%;display:flex;flex-direction:column;transition:box-shadow .2s,transform .2s}
.xv-p-card:hover{box-shadow:0 12px 28px rgba(15,23,42,.08);transform:translateY(-2px)}
.xv-p-card .img{position:relative;aspect-ratio:1;background:#f1f5f9;display:block;overflow:hidden}
.xv-p-card .img img{width:100%;height:100%;object-fit:contain;padding:10px}
.xv-badge-off{position:absolute;top:8px;right:8px;z-index:2;background:#ef4444;color:#fff;font-size:.7rem;font-weight:800;padding:.2rem .45rem;border-radius:8px}
.xv-p-card .body{padding:.7rem .8rem .85rem;display:flex;flex-direction:column;gap:.3rem;flex:1}
.xv-p-card .title{font-size:.84rem;font-weight:600;color:#0f172a;text-decoration:none;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.5em}
.xv-p-card .price-now{font-size:.9rem;font-weight:800;color:var(--xv-brand-dark)}
.xv-p-card .price-old{font-size:.72rem;color:#94a3b8;text-decoration:line-through;margin-left:.3rem}
.xv-p-card .actions{display:flex;gap:.35rem;margin-top:auto;padding-top:.35rem}
.xv-p-card .btn-cart{flex:1;border:0;border-radius:10px;background:var(--xv-brand);color:#fff;padding:.4rem;font-weight:700}
.xv-p-card .btn-wish{width:36px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;color:#94a3b8}

.xv-pagination{display:flex;gap:.35rem;justify-content:center;flex-wrap:wrap}
.xv-pagination a{min-width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#fff;border:1px solid #e2e8f0;color:#0f172a;text-decoration:none;font-size:.85rem}
.xv-pagination a.active{background:var(--xv-brand);color:#fff;border-color:var(--xv-brand)}
.xv-empty{text-align:center;padding:3rem;background:#fff;border-radius:16px;border:1px dashed #e2e8f0;color:#94a3b8}

/* Product detail */
.xv-pd-gallery{display:flex;gap:.75rem}
.xv-pd-thumbs{flex-direction:column;gap:.5rem;width:72px}
.xv-pd-thumbs .thumb,.xv-pd-thumbs-mobile .thumb{border:1px solid #e2e8f0;border-radius:12px;padding:4px;background:#fff;width:72px;height:72px;overflow:hidden;cursor:pointer}
.xv-pd-thumbs .thumb.active,.xv-pd-thumbs-mobile .thumb.active{border-color:var(--xv-brand)}
.xv-pd-thumbs img,.xv-pd-thumbs-mobile img{width:100%;height:100%;object-fit:contain}
.xv-pd-thumbs-mobile{gap:.4rem;overflow-x:auto;padding:.5rem 0}
.xv-pd-main{flex:1;background:#fff;border:1px solid #e2e8f0;border-radius:16px;position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;overflow:hidden}
.xv-pd-main img{max-width:100%;max-height:100%;object-fit:contain;padding:16px}
.xv-pd-title{font-size:1.25rem;font-weight:800;margin:0 0 .5rem;line-height:1.45}
.xv-pd-promo{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.badge-special{background:#fef2f2;color:#dc2626;border:1px solid #fecaca;border-radius:999px;padding:.25rem .7rem;font-size:.75rem;font-weight:700}
.xv-timer{font-weight:800;font-variant-numeric:tabular-nums;background:#fff7ed;color:#c2410c;border-radius:8px;padding:.2rem .55rem;font-size:.85rem}
.xv-pd-price .old{color:#94a3b8;text-decoration:line-through;font-size:.9rem;margin-left:.4rem}
.xv-pd-price .off{background:#ef4444;color:#fff;border-radius:8px;padding:.15rem .45rem;font-size:.75rem;font-weight:800}
.xv-pd-price .now{font-size:1.45rem;font-weight:800;color:var(--xv-brand-dark);margin-top:.25rem}
.xv-pd-buy{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.xv-pd-buy .qty{display:flex;align-items:center;border:1px solid #e2e8f0;border-radius:12px;background:#fff;overflow:hidden}
.xv-pd-buy .qty button{width:38px;height:42px;border:0;background:#f8fafc;font-size:1.1rem}
.xv-pd-buy .qty input{width:48px;border:0;text-align:center;font-weight:700}
.xv-pd-buy .btn-add{flex:1;min-width:180px;border:0;border-radius:12px;background:var(--xv-brand);color:#fff;font-weight:800;padding:.7rem 1.2rem;display:flex;align-items:center;justify-content:center;gap:.4rem}
.xv-pd-trust{display:flex;flex-wrap:wrap;gap:.75rem 1.1rem;font-size:.78rem;color:#64748b}
.xv-pd-trust i{color:var(--xv-brand);margin-left:.25rem}
.xv-pd-tabs .nav-link{border-radius:999px;background:#fff;border:1px solid #e2e8f0;color:#64748b;font-weight:600;padding:.4rem 1rem}
.xv-pd-tabs .nav-link.active{background:var(--xv-brand);border-color:var(--xv-brand);color:#fff}
.xv-pd-tab-body{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1.15rem 1.25rem}
.spec-row{display:flex;justify-content:space-between;padding:.55rem 0;border-bottom:1px dashed #e2e8f0;font-size:.88rem}
.review-item{padding:.75rem 0;border-bottom:1px solid #f1f5f9}
@media(max-width:767.98px){
  .xv-pd-gallery{flex-direction:column}
  .xv-pd-title{font-size:1.05rem}
  .xv-pd-buy .btn-add{width:100%}
}

/* Force grid even if other CSS missing pieces */
.xv-shop .xv-shop-grid,
#xv-shop-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:.75rem !important;
}
@media(min-width:768px){
  .xv-shop .xv-shop-grid,
  #xv-shop-grid{
    grid-template-columns:repeat(var(--xv-shop-cols-md,3),minmax(0,1fr)) !important;
  }
}
@media(min-width:1100px){
  .xv-shop .xv-shop-grid,
  #xv-shop-grid{
    grid-template-columns:repeat(var(--xv-shop-cols-lg,4),minmax(0,1fr)) !important;
  }
}
.xv-p-card .img img{max-height:220px;object-fit:contain}
.xv-pd-gallery{align-items:flex-start}
.xv-pd-main{min-height:320px;background:#fff}
.xv-pd-info{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1.25rem}
@media(min-width:992px){
  .xv-pd .row > .col-lg-5{position:sticky;top:90px}
}
