/* ===========================================
   افزونه فروشگاه سالار خمین - استایل ویجت
   =========================================== */

/* Variables */
.asal-shop-wrapper {
  --primary-color: #D4AF37;
  --secondary-color: #C9A961;
  --text-dark: #2C2416;
  --text-light: #5C4A3C;
  --text-gray: #8B7355;
  --bg-light: #FFF9E6;
  --border-color: rgba(212, 175, 55, 0.2);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Container */
.asal-shop-wrapper {
  font-family: 'Vazir', 'Yekan', 'IRANSans', 'Tahoma', sans-serif;
  direction: rtl;
  padding: 40px 20px;
  background: linear-gradient(180deg, #FFF9E6 0%, #FFFFFF 50%, #F8F6F0 100%);
}

.asal-shop-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
}

/* ===== SIDEBAR ===== */
.asal-shop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Filter Box */
.asal-filter-box {
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.asal-filter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-dark);
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.asal-filter-icon {
  font-size: 22px;
}

/* Category List */
.asal-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asal-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(212, 175, 55, 0.05);
  border: 1.5px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.asal-category-item:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--border-color);
  color: var(--text-dark);
  transform: translateX(-3px);
}

.asal-category-item.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.asal-cat-name {
  flex: 1;
}

.asal-cat-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.asal-category-item.active .asal-cat-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Price Filter */
.asal-price-filter-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.asal-price-inputs {
  display: flex;
  gap: 12px;
}

.asal-price-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.asal-price-input-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-gray);
}

.asal-price-input-group input {
  padding: 10px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  background: #FFFFFF;
  transition: all 0.3s;
}

.asal-price-input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.asal-filter-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.asal-filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.asal-reset-filter {
  text-align: center;
  font-size: 12px;
  color: var(--text-gray);
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s;
}

.asal-reset-filter:hover {
  background: rgba(212, 175, 55, 0.05);
  color: var(--primary-color);
}

/* ===== MAIN AREA ===== */
.asal-shop-main {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Shop Header */
.asal-shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #FFFFFF;
  padding: 20px 24px;
  border: 2px solid var(--border-color);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.asal-results-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.asal-results-icon {
  font-size: 20px;
}

.asal-sort-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asal-sort-select {
  padding: 10px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.3s;
}

.asal-sort-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Products Grid */
.asal-products-grid {
  display: grid;
  gap: 20px;
}

.asal-products-grid.asal-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.asal-products-grid.asal-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.asal-products-grid.asal-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Product Card */
.asal-product-card {
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.asal-product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.asal-product-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Product Image */
.asal-product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-light);
}

.asal-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.asal-product-card:hover .asal-product-img {
  transform: scale(1.08);
}

.asal-sale-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #E74C3C, #C0392B);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
  z-index: 2;
}

.asal-product-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
  padding: 20px;
  opacity: 0;
  transition: all 0.3s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.asal-product-card:hover .asal-product-overlay {
  opacity: 1;
}

.asal-view-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #FFFFFF;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* Product Info */
.asal-product-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.asal-product-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.asal-product-excerpt {
  font-size: 13px;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.asal-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.asal-product-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary-color);
}

.asal-product-price del {
  font-size: 13px;
  color: var(--text-gray);
  margin-left: 6px;
}

.asal-stock-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
}

.asal-stock-status.in-stock {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.asal-stock-status.out-of-stock {
  background: rgba(231, 76, 60, 0.1);
  color: #E74C3C;
}

/* No Products */
.asal-no-products {
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.asal-no-products-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.asal-no-products h3 {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-dark);
  margin: 0 0 10px 0;
}

.asal-no-products p {
  font-size: 15px;
  color: var(--text-gray);
  margin: 0 0 25px 0;
}

.asal-reset-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
  transition: all 0.3s;
}

.asal-reset-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Pagination */
.asal-pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.asal-pagination ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.asal-pagination li a,
.asal-pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s;
}

.asal-pagination li a:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #FFFFFF;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.asal-pagination li span.current {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .asal-shop-container {
    grid-template-columns: 250px 1fr;
    gap: 20px;
  }

  .asal-products-grid.asal-columns-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .asal-shop-wrapper {
    padding: 30px 15px;
  }

  .asal-shop-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .asal-shop-sidebar {
    order: 2;
  }

  .asal-shop-main {
    order: 1;
  }

  .asal-shop-header {
    flex-direction: column;
    align-items: stretch;
  }

  .asal-products-grid.asal-columns-2,
  .asal-products-grid.asal-columns-3,
  .asal-products-grid.asal-columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .asal-products-grid.asal-columns-2,
  .asal-products-grid.asal-columns-3,
  .asal-products-grid.asal-columns-4 {
    grid-template-columns: 1fr;
  }

  .asal-price-inputs {
    flex-direction: column;
  }

  .asal-filter-box {
    padding: 18px;
  }
}
