:root{
  --font-main: "Vazirmatn","Estedad",system-ui,-apple-system,"Segoe UI",sans-serif;
}

body,
.woocommerce,
.woocommerce-page{
  font-family: var(--font-main);
}

button,
input,
select,
textarea,
option,
.woocommerce button,
.woocommerce input,
.woocommerce select,
.woocommerce textarea{
  font-family: var(--font-main) !important;
}

/* Shell */
.shopShell{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

/* Top */
.shopTop{
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

/* HERO */
.shopHero{
  position: relative;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid #eef2f7;
  background:#fff;
  margin-bottom: 14px;
  aspect-ratio: 16 / 6;
}
.shopHero img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.shopHero__badge{
  position:absolute;
  right:12px;
  bottom:12px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(229,231,235,.9);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight:900;
}

/* Head */
.shopTop__head{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:12px;
}
.shopTop__title{margin:0; font-size:22px; font-weight:900;}
.shopTop__sub{margin:0; color:#64748b; font-weight:700; font-size:13px;}

/* Toolbar (Desktop) */
.shopBar{
  display:grid;
  grid-template-columns: 1fr 220px 220px;
  gap:10px;
  align-items:stretch;
}

/* Filter button (only mobile) */
.shopFilterBtn{
  display:none;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius: 14px;
  font-weight:900;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}

/* Search */
.shopSearch{
  display:flex;
  gap:10px;
  align-items:stretch;
}
.shopSearch__input{
  flex:1;
  border:1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 14px;
  outline:none;
  font-weight:800;
  background:#fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}
.shopSearch__input::placeholder{color:#94a3b8; font-weight:800;}
.shopSearch__btn{
  border:0;
  background:#2563eb;
  color:#fff;
  border-radius: 14px;
  padding: 0 18px;
  font-weight:900;
  cursor:pointer;
  box-shadow: 0 12px 28px rgba(37,99,235,.25);
}

/* Car select */
.shopCarFilter__select{
  width:100%;
  border:1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  font-weight:900;
  background:#fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}
.shopCarFilter__select:disabled{opacity:.65; cursor:not-allowed;}

/* Sort */
.shopSort select{
  width:100%;
  border:1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background:#fff;
  font-weight:900;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

/* Desktop category chips */
.shopCats{
  margin-top: 10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.chip{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius: 999px;
  padding:8px 10px;
  font-weight:900;
  text-decoration:none;
  color:#0f172a;
  box-shadow: 0 10px 18px rgba(15,23,42,.04);
}
.chip.is-on{
  border-color:#2563eb;
  color:#2563eb;
  background:#eff6ff;
}

/* Result count */
.shopMeta{
  margin-top: 10px;
}
.shopMeta .woocommerce-result-count{
  margin:0;
  color:#64748b;
  font-weight:800;
  font-size:13px;
}

/* Products grid */
.woocommerce ul.products{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin:0;
  padding:0;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after{display:none !important;}
.woocommerce ul.products li.product{
  list-style:none;
  margin:0 !important;
  width:auto !important;
}

/* Card */
.productCard{
  height:100%;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 14px 40px rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
@media (hover:hover){
  .productCard:hover{
    transform: translateY(-3px);
    box-shadow: 0 22px 55px rgba(15,23,42,.10);
    border-color:#dbeafe;
  }
}
.productCard a{color:inherit; text-decoration:none;}

/* Image (Square + filled better) */
.productCard__img{
  aspect-ratio: 1 / 1;
  background:#fff;
  border-bottom:1px solid #eef2f7;
  padding: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.productCard__img img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:0 !important;
  transform: scale(1.08);
  transform-origin:center;
}

/* Title */
.productCard__title{
  font-size: 16px;
  padding: 12px 12px 4px;
  font-weight:900;
  line-height:1.55;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Price (number colored, currency subtle) */
.productCard__price{
  padding: 0 12px 12px;
}
.productCard__price .woocommerce-Price-amount{
  font-weight: 950;
  font-size: 15px;
  color:#1d4ed8;
}
.productCard__price .woocommerce-Price-currencySymbol{
  font-weight: 900;
  font-size: 12px;
  color:#64748b;
  margin-inline-start: 6px;
}

/* Actions */
.productCard__actions{
  margin-top:auto;
  padding: 0 12px 16px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}
.productCard__actions .add_to_cart_button,
.productCard__actions .productCard__details{
  height: 46px;
  border-radius:16px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  text-align:center;
}

/* Details button */
.productCard__actions .productCard__details{
  background:#fff;
  color:#0f172a;
  border:1px solid #e5e7eb;
  transition: background .12s ease, border-color .12s ease;
}
.productCard__actions .productCard__details:hover{
  background:#f8fafc;
  border-color:#cbd5e1;
}

/* Add to cart button base */
.productCard__actions .add_to_cart_button{
  background:#2563eb;
  color:#fff;
  border:none;
  box-shadow: 0 14px 34px rgba(37,99,235,.25);
  position:relative;
  overflow:hidden;

  /* text -> icon */
  font-size:0;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

/* focus ring (pro) */
.productCard__actions .add_to_cart_button:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.25), 0 14px 34px rgba(37,99,235,.25);
}

/* Icon (SVG) */
.productCard__actions .add_to_cart_button::before{
  content:"";
  width:22px;
  height:22px;
  display:inline-block;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<circle cx='9' cy='21' r='1'/>\
<circle cx='20' cy='21' r='1'/>\
<path d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/>\
</svg>");
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  transition: transform .12s ease, opacity .12s ease;
}

/* soft ripple */
.productCard__actions .add_to_cart_button::after{
  content:"";
  position:absolute;
  inset:-40%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), transparent 55%);
  opacity:0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

@media (hover:hover){
  .productCard__actions .add_to_cart_button:hover{
    filter: brightness(1.06);
    transform: translateY(-1px);
  }
  .productCard__actions .add_to_cart_button:hover::after{
    opacity:1;
    transform: translateY(0);
  }
}
.productCard__actions .add_to_cart_button:active{
  transform: translateY(0);
  filter: brightness(1.02);
}

/* Added state (WooCommerce adds .added) */
.productCard__actions .add_to_cart_button.added{
  background:#16a34a !important;
  box-shadow: 0 14px 34px rgba(22,163,74,.22) !important;
}
.productCard__actions .add_to_cart_button.added::before{
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'>\
<path d='M20 6 9 17l-5-5'/>\
</svg>");
  transform: translateY(-1px);
}

/* Hide Woo's "View cart" link to keep card clean */
.productCard__actions a.added_to_cart{
  display:none !important;
}

/* Drawer */
.shopDrawer{position:fixed; inset:0; z-index:9999; display:none;}
.shopDrawer.is-open{display:block;}
.shopDrawer__overlay{position:absolute; inset:0; background: rgba(15,23,42,.45);}
.shopDrawer__panel{
  position:absolute;
  right:0; top:0;
  height:100%;
  width:min(92vw, 420px);
  background:#fff;
  border-radius: 18px 0 0 18px;
  padding: 14px;
  overflow:auto;
  transform: translateX(100%);
  transition: transform .22s ease;
}
.shopDrawer.is-open .shopDrawer__panel{transform: translateX(0);}
.shopDrawer__head{display:flex; justify-content:space-between; align-items:center; padding-bottom:10px; border-bottom:1px solid #eef2f7;}
.shopDrawer__title{font-weight:900; font-size:16px;}
.shopDrawer__close{width:40px; height:40px; border-radius:12px; border:1px solid #e5e7eb; background:#fff; font-size:22px; cursor:pointer;}
.shopDrawer__section{padding:12px 0;}
.shopDrawer__label{font-weight:900; margin-bottom:10px;}
.shopDrawer__grid{display:flex; flex-wrap:wrap; gap:8px;}
.pill{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  font-weight:900;
  text-decoration:none;
  color:#0f172a;
}
.pill.is-on{border-color:#2563eb; color:#2563eb; background:#eff6ff;}
.shopDrawer__locked{background:#f8fafc; border:1px solid #eef2f7; padding:10px; border-radius:12px; font-weight:800;}
.shopDrawer__hint{color:#64748b; font-weight:700; font-size:12px; margin-top:6px;}
.shopDrawer__actions{
  position:sticky;
  bottom:0;
  background:#fff;
  padding:12px 0 6px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  border-top:1px solid #eef2f7;
}
.btnGhost,.btnPrimary{display:flex; align-items:center; justify-content:center; height:44px; border-radius:14px; font-weight:900; text-decoration:none;}
.btnGhost{border:1px solid #e5e7eb; background:#fff; color:#0f172a;}
.btnPrimary{border:0; background:#2563eb; color:#fff; cursor:pointer;}

/* Empty State */
.emptyState{
  margin-top: 14px;
  background:#fff;
  border:1px solid #eef2f7;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(15,23,42,.06);
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.emptyState__icon{
  width:44px;
  height:44px;
  border-radius: 14px;
  background:#eff6ff;
  border:1px solid #dbeafe;
  color:#2563eb;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.emptyState__title{
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 6px;
}
.emptyState__desc{
  color:#475569;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.9;
}
.emptyState__chips{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.esChip{
  border:1px solid #e5e7eb;
  background:#f8fafc;
  border-radius:999px;
  padding:7px 10px;
  font-weight:900;
  font-size:12px;
  color:#0f172a;
}
.emptyState__actions{
  margin-top: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.esBtn{
  height:44px;
  border-radius: 14px;
  padding: 0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  text-decoration:none;
}
.esBtn--ghost{
  border:1px solid #e5e7eb;
  background:#fff;
  color:#0f172a;
}
.esBtn--primary{
  border:0;
  background:#2563eb;
  color:#fff;
  box-shadow: 0 12px 28px rgba(37,99,235,.22);
}

/* Mobile */
@media (max-width: 980px){
  .shopHero{aspect-ratio: 16 / 9;}
  .shopCats{display:none;}

  .shopBar{
    grid-template-columns: 1fr auto;
    gap:10px;
  }
  .shopCarFilter, .shopSort{display:none;}
  .shopFilterBtn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 0 14px;
    height: 52px;
  }
  .shopSearch__input{height:52px;}
  .shopSearch__btn{height:52px;}

  /* Force 2 product cards per row on mobile */
  .woocommerce ul.products{grid-template-columns: repeat(2, minmax(0,1fr)) !important;}
  .woocommerce ul.products li.product{min-width:0 !important;}

  /* small tweaks */
  .productCard__title{font-size:15px;}
  .productCard__price .woocommerce-Price-amount{font-size:14px;}
  .productCard__actions{gap:14px;}
  .emptyState{flex-direction: column; align-items: stretch;}
  .emptyState__icon{width:48px; height:48px;}
}
