/* =========================================================
   کفش ایوان | E1Shoes — استایل کاتالوگ و محصولات v2
   ========================================================= */

/* ============ CATEGORY GRID ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  min-height: 150px;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.category-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 12px;
  transition: transform var(--t-base);
}
.category-card:hover .category-icon { transform: scale(1.1); }
.category-card h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.category-card p {
  font-size: .82rem;
  color: var(--text-soft);
}

@media (min-width: 600px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .category-card { padding: 32px 20px; min-height: 170px; }
}

@media (min-width: 900px) {
  .category-grid { grid-template-columns: repeat(6, 1fr); }
  .category-card { min-height: 180px; }
}

/* ============ BRAND GRID ============ */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  text-align: center;
  min-height: 100px;
}
.brand-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.brand-name-fa {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}
.brand-name-en {
  font-size: .78rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  font-weight: 600;
}

@media (min-width: 600px) {
  .brand-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}

@media (min-width: 900px) {
  .brand-grid { grid-template-columns: repeat(8, 1fr); }
  .brand-card { padding: 26px 12px; }
}

/* ============ FILTER BAR ============ */
.filter-bar {
  padding: 16px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.filter-bar .input,
.filter-bar .select {
  background: #fff;
  min-width: 140px;
  padding: 10px 14px;
  font-size: .88rem;
}
.filter-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-soft);
}
.filter-count {
  margin-right: auto;
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}

@media (max-width: 600px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .input,
  .filter-bar .select { width: 100%; }
  .filter-count { margin-right: 0; text-align: center; }
}

/* ============ PRODUCT GRID ============ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 700px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

@media (min-width: 1000px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* ============ PRODUCT CARD ============ */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.product-thumb {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--bg-soft);
  overflow: hidden;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.product-card:hover .product-thumb img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 10px rgba(255,90,31,.35);
  z-index: 2;
}
.product-badge.is-new { background: var(--success); box-shadow: 0 3px 10px rgba(22,163,74,.35); }
.product-badge.is-hot { background: var(--danger); box-shadow: 0 3px 10px rgba(220,38,38,.35); }

.product-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-brand {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.product-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  transition: color var(--t-fast);
}
.product-card:hover .product-title { color: var(--accent); }

.product-sizes {
  font-size: .78rem;
  color: var(--text-muted);
}

.product-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.product-prices del {
  font-size: .78rem;
  color: var(--text-muted);
  text-decoration-thickness: 1px;
}
.product-prices .price {
  font-size: .98rem;
  font-weight: 800;
  color: var(--accent);
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  line-height: 1;
}
.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--text-soft);
  font-size: .92rem;
  margin-bottom: 20px;
}

/* ============ PRODUCT DETAIL ============ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 900px) {
  .product-detail {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
  }
}

/* ---- Gallery ---- */
.pd-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.pd-main-img {
  aspect-ratio: 1/1;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow), opacity .15s ease;
}

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pd-thumb {
  aspect-ratio: 1/1;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  padding: 0;
  transition: border-color var(--t-fast), transform var(--t-fast);
  cursor: pointer;
}
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.is-active { border-color: var(--accent); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Info ---- */
.pd-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pd-brand {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pd-title {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.3px;
}

.pd-prices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pd-prices del {
  color: var(--text-muted);
  font-size: .9rem;
}
.pd-discount {
  padding: 3px 10px;
  background: var(--danger-soft);
  color: #b91c1c;
  font-size: .78rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
}
.pd-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  margin-right: auto;
}
.pd-price small {
  font-size: .75em;
  font-weight: 600;
  color: var(--text-soft);
}

.pd-desc {
  font-size: .95rem;
  color: var(--text-soft);
  line-height: 1.9;
}

.pd-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pd-label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}

.pd-sizes,
.pd-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pd-size,
.pd-color {
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text-soft);
  font-size: .88rem;
  font-weight: 600;
  transition: all var(--t-fast);
  cursor: pointer;
}
.pd-size:hover,
.pd-color:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pd-size.is-active,
.pd-color.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255,90,31,.25);
}

.pd-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-features li {
  position: relative;
  padding-right: 22px;
  font-size: .9rem;
  color: var(--text-soft);
  line-height: 1.75;
}
.pd-features li::before {
  content: '✓';
  position: absolute;
  right: 0;
  top: 0;
  color: var(--success);
  font-weight: 800;
}

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}
.pd-actions .btn { flex: 1 1 auto; min-width: 160px; }

.pd-note {
  padding: 14px 16px;
  background: var(--accent-soft);
  border-right: 4px solid var(--accent);
  border-radius: var(--radius);
  font-size: .88rem;
  color: var(--text-soft);
  line-height: 1.8;
}

/* ============ PRODUCT META ROW ============ */
.pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .82rem;
  color: var(--text-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.pd-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--t-fast);
}
.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pagination .is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pagination .is-disabled {
  opacity: .5;
  pointer-events: none;
}

/* ============ SEARCH INFO ============ */
.search-info {
  padding: 14px 18px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: .92rem;
  margin-top: 24px;
  border-right: 4px solid var(--accent);
}
.search-info strong {
  color: var(--accent-dark);
  font-weight: 800;
}

/* ============ RELATED SECTION ============ */
.related-wrap {
  margin-top: 40px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .pd-gallery { position: static; }
}

@media (max-width: 500px) {
  .products-grid { gap: 10px; }
  .product-body { padding: 12px 12px 14px; }
  .product-title { font-size: .85rem; }
  .product-prices .price { font-size: .88rem; }
  .product-brand { font-size: .68rem; }
  .pd-actions .btn { min-width: 100%; }
  .pd-thumbs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .pd-price { font-size: 1.25rem; }
}