/*
 * shop.css — Waziristan Dry Fruits Shop Page
 * Loaded on shop/category/product pages via functions.php
 */

/* ── SHOP HERO ── */
.shop-hero {
  background: linear-gradient(135deg, var(--brown) 0%, #2A1506 60%, var(--caramel-dark) 100%);
  padding: 5rem 5% 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.shop-hero::before, .shop-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.shop-hero::before { right: -8%; top: -40%; width: 500px; height: 500px; background: rgba(204,138,46,0.1); }
.shop-hero::after  { left: -6%; bottom: -50%; width: 350px; height: 350px; background: rgba(204,138,46,0.07); }

.shop-hero-inner { position: relative; z-index: 1; max-width: 660px; margin: 0 auto; }

.shop-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(204,138,46,0.2);
  color: var(--amber);
  border: 1px solid rgba(204,138,46,0.35);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.shop-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: white;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.shop-hero-title em { color: var(--amber); font-style: italic; }
.shop-hero-sub { color: rgba(255,255,255,0.6); font-size: 1rem; margin-bottom: 2rem; }

.shop-search-form {
  display: flex;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-pill);
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-search-form:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(204,138,46,0.2);
}

.shop-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.85rem 1.4rem;
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 0.92rem;
}

.shop-search-input::placeholder { color: rgba(255,255,255,0.45); }

.shop-search-btn {
  background: var(--amber);
  border: none;
  padding: 0 1.4rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--brown);
  transition: background 0.2s;
}

.shop-search-btn:hover { background: var(--caramel); }


/* ── LAYOUT ── */
.shop-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  padding: 3.5rem 5%;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}


/* ── SIDEBAR ── */
.shop-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  border: 1px solid rgba(160,97,30,0.08);
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--brown);
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--border);
}

.sidebar-cat-list { display: flex; flex-direction: column; gap: 0.3rem; }

.sidebar-cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-mid);
  transition: background 0.2s, color 0.2s;
}

.sidebar-cat-link:hover,
.sidebar-cat-link.active { background: rgba(160,97,30,0.1); color: var(--caramel-dark); }

.cat-bubble {
  background: var(--sand);
  color: var(--brown);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  min-width: 22px;
  text-align: center;
}

/* Price Filter */
.price-filter-form { display: flex; flex-direction: column; gap: 0.9rem; }
.price-inputs { display: flex; align-items: center; gap: 0.6rem; }
.price-field { flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }

.price-field label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-field input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid rgba(160,97,30,0.2);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  color: var(--text-dark);
  background: white;
  outline: none;
  transition: border-color 0.2s;
}

.price-field input:focus { border-color: var(--caramel); }
.price-sep { color: var(--text-light); font-size: 0.9rem; margin-top: 1.2rem; }

.price-filter-btn {
  background: var(--caramel);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.4rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.price-filter-btn:hover { background: var(--caramel-dark); transform: translateY(-1px); }

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag-chip {
  background: white;
  border: 1.5px solid rgba(160,97,30,0.15);
  color: var(--text-mid);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.tag-chip:hover { background: var(--caramel); border-color: var(--caramel); color: white; }


/* ── TOOLBAR ── */
.shop-main { min-width: 0; }

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(160,97,30,0.1);
}

.shop-result-count .woocommerce-result-count { font-size: 0.88rem; color: var(--text-light); margin: 0; }
.shop-toolbar-right { display: flex; align-items: center; gap: 1rem; }

.shop-toolbar-right .woocommerce-ordering select {
  background: var(--card-bg);
  border: 1.5px solid rgba(160,97,30,0.18);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.shop-toolbar-right .woocommerce-ordering select:focus { border-color: var(--caramel); }

.view-toggle { display: flex; gap: 0.4rem; }

.view-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid rgba(160,97,30,0.18);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.view-btn.active,
.view-btn:hover { background: var(--caramel); border-color: var(--caramel); color: white; }

/* Active Filters */
.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0.8rem 1.1rem;
  background: rgba(160,97,30,0.06);
  border-radius: 12px;
  border: 1px dashed rgba(160,97,30,0.2);
}

.filter-label { font-size: 0.8rem; font-weight: 700; color: var(--text-light); }

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--caramel);
  color: white;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

.remove-filter { color: rgba(255,255,255,0.75); font-weight: 700; transition: color 0.2s; }
.remove-filter:hover { color: white; }
.clear-all-filters { margin-left: auto; font-size: 0.8rem; font-weight: 700; color: var(--caramel-dark); }
.clear-all-filters:hover { text-decoration: underline; }


/* ── PRODUCT GRID ── */
.shop-main .woocommerce-loop-product__title,
.shop-main ul.products li.product .woocommerce-loop-product__title { padding: 0; }

.shop-main ul.products { margin: 0; }

.shop-main ul.products.columns-3,
.shop-main ul.products.columns-4 {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.6rem;
}

.shop-main ul.products li.product {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(160,97,30,0.07);
  transition: transform 0.3s, box-shadow 0.3s;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

.shop-main ul.products li.product:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 50px var(--shadow-lg);
}

.shop-main ul.products li.product a img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.shop-main ul.products li.product .product-card-body {
  padding: 1.3rem 1.4rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop-main ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: var(--brown) !important;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.shop-main ul.products li.product .product-cat-label {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.85rem;
}

.shop-main ul.products li.product .price {
  color: var(--caramel-dark) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem;
  display: block;
}

.shop-main ul.products li.product .price del {
  color: var(--text-light) !important;
  font-size: 0.82rem;
  font-weight: 400;
  margin-left: 0.3rem;
  opacity: 0.8;
}

.shop-main ul.products li.product .price ins { text-decoration: none !important; }

.shop-main ul.products li.product .button,
.shop-main ul.products li.product .add_to_cart_button {
  display: block !important;
  width: 100% !important;
  background: var(--brown) !important;
  color: var(--cream) !important;
  border: none !important;
  border-radius: var(--radius-pill) !important;
  padding: 0.7rem 1.4rem !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: background 0.2s, transform 0.2s !important;
  margin-top: auto !important;
  box-shadow: 0 3px 14px var(--shadow);
}

.shop-main ul.products li.product .button:hover,
.shop-main ul.products li.product .add_to_cart_button:hover {
  background: var(--caramel-dark) !important;
  transform: translateY(-2px) !important;
}

.shop-main ul.products li.product .button.added { background: var(--green) !important; }

.shop-main ul.products li.product .onsale {
  background: #C0392B !important;
  color: white !important;
  border-radius: var(--radius-pill) !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  padding: 0.3rem 0.8rem !important;
  top: 12px !important; left: 12px !important; right: auto !important;
  min-height: unset !important;
  line-height: 1.4 !important;
}

.shop-main .star-rating span::before,
.shop-main .star-rating::before { color: var(--amber) !important; }
.shop-main .star-rating { margin: 0 0 0.5rem; font-size: 0.75rem !important; }


/* ── LIST VIEW ── */
.shop-main ul.products.list-view { grid-template-columns: 1fr !important; }
.shop-main ul.products.list-view li.product { flex-direction: row !important; max-height: 180px; }
.shop-main ul.products.list-view li.product a:first-child { flex-shrink: 0; width: 180px; }
.shop-main ul.products.list-view li.product a:first-child img { height: 180px; aspect-ratio: auto; }
.shop-main ul.products.list-view li.product .product-card-body { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }


/* ── PAGINATION ── */
.shop-pagination { margin-top: 3rem; display: flex; justify-content: center; }
.shop-pagination .woocommerce-pagination ul { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }

.shop-pagination .woocommerce-pagination ul li a,
.shop-pagination .woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(160,97,30,0.18);
  color: var(--text-mid);
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.shop-pagination .woocommerce-pagination ul li a:hover { background: var(--caramel); border-color: var(--caramel); color: white; }
.shop-pagination .woocommerce-pagination ul li span.current { background: var(--brown); border-color: var(--brown); color: white; }


/* ── EMPTY STATE ── */
.shop-empty { text-align: center; padding: 5rem 2rem; color: var(--text-mid); }
.shop-empty-icon { font-size: 4rem; margin-bottom: 1.2rem; }
.shop-empty h3 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--brown); margin-bottom: 0.7rem; }
.shop-empty p { font-size: 0.95rem; margin-bottom: 2rem; max-width: 360px; margin-left: auto; margin-right: auto; }


/* ── RESPONSIVE ── */
@media (max-width: 992px) {
  .shop-wrapper { grid-template-columns: 240px 1fr; gap: 1.8rem; }
}

@media (max-width: 768px) {
  .shop-wrapper { grid-template-columns: 1fr; padding: 2rem 5%; }
  .shop-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .shop-hero { padding: 3.5rem 5% 3rem; }
  .shop-main ul.products.columns-3,
  .shop-main ul.products.columns-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
  .shop-sidebar { grid-template-columns: 1fr; }
  .shop-main ul.products.columns-3,
  .shop-main ul.products.columns-4 { grid-template-columns: 1fr !important; }
  .shop-main ul.products.list-view li.product { flex-direction: column; max-height: none; }
  .shop-main ul.products.list-view li.product a:first-child { width: 100%; }
}
