/* ════════════════════════════════════════════════════════════════════════════════
   SHOP — Professional Design with Filters, Categories, Price Ranges, SEO
   ════════════════════════════════════════════════════════════════════════════════ */

/* Hero */
.shop-hero {
  padding: clamp(48px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3d 50%, #1a1a2e 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.shop-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(255,153,51,.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(255,153,51,.1) 0%, transparent 50%);
  pointer-events: none;
}

.shop-hero .container {
  position: relative;
  z-index: 1;
}

.shop-hero .section-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: rgba(255,153,51,.15);
  color: #ffb347;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
  border: 1px solid rgba(255,153,51,.25);
}

.shop-hero .heading-1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.shop-hero p {
  margin: 0;
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.shop-hero .search-result-info {
  margin-top: .75rem;
  padding: .5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
}

.shop-hero .search-result-info strong {
  color: #ffb347;
}

/* Layout */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.shop-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.shop-main {
  min-width: 0;
}

/* Toolbar */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.shop-results-count {
  margin: 0;
  font-size: .9rem;
  color: var(--muted, #6b7280);
  font-weight: 500;
}

.shop-view-toggles {
  display: flex;
  gap: .4rem;
}

.shop-view-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--rule, #e5e7eb);
  background: var(--white, #fff);
  color: var(--muted, #6b7280);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.shop-view-btn:hover,
.shop-view-btn.active {
  border-color: var(--saffron, #ff9933);
  color: var(--saffron, #ff9933);
  background: var(--saffron-pale, rgba(255,153,51,.08));
}

/* Filter sections */
.shop-filter-section {
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--white, #fff);
  border: 1px solid var(--rule, #e5e7eb);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}

.shop-filter-title {
  margin: 0 0 .85rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink, #1a1a2e);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.shop-filter-title i {
  color: var(--saffron, #ff9933);
  font-size: .85rem;
}

.shop-filter-options {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.shop-filter-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .85rem;
  border-radius: 10px;
  color: var(--ink, #1a1a2e);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: all .2s ease;
  border: 1.5px solid transparent;
}

.shop-filter-option:hover {
  background: var(--saffron-pale, rgba(255,153,51,.08));
  color: var(--saffron, #ff9933);
}

.shop-filter-option.active {
  background: linear-gradient(135deg, rgba(255,179,71,.12), rgba(255,153,51,.08));
  border-color: rgba(255,153,51,.25);
  color: var(--saffron, #ff9933);
  font-weight: 700;
}

.shop-filter-option i {
  width: 18px;
  text-align: center;
  font-size: .8rem;
  opacity: .7;
}

.shop-filter-option.active i {
  opacity: 1;
}

/* Search form */
.shop-search-form {
  display: flex;
  gap: .5rem;
}

.shop-filter-input {
  flex: 1;
  padding: .65rem .85rem;
  border-radius: 10px;
  border: 1.5px solid var(--rule, #e5e7eb);
  background: var(--bg, #fff);
  color: var(--ink, #1a1a2e);
  font-size: .88rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.shop-filter-input:focus {
  outline: none;
  border-color: rgba(255,153,51,.5);
  box-shadow: 0 0 0 4px var(--saffron-pale, rgba(255,153,51,.1));
}

.shop-filter-input::placeholder {
  color: var(--muted, #9ca3af);
}

.shop-filter-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--rule, #e5e7eb);
  background: var(--bg, #fff);
  color: var(--muted, #6b7280);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.shop-filter-btn:hover {
  border-color: var(--saffron, #ff9933);
  color: var(--saffron, #ff9933);
  background: var(--saffron-pale, rgba(255,153,51,.08));
}

/* Clear filters */
.shop-clear-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem;
  border-radius: 10px;
  color: #dc2626;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s ease;
  border: 1.5px dashed rgba(239,68,68,.3);
}

.shop-clear-filters:hover {
  background: rgba(239,68,68,.06);
  border-color: rgba(239,68,68,.5);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: var(--white, #fff);
  border: 1px solid var(--rule, #e5e7eb);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  border-color: rgba(255,153,51,.2);
}

.product-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg, #f9fafb);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform .3s ease;
}

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

.product-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--muted, #6b7280);
  opacity: .3;
}

.product-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}

.product-card-body > * {
  max-width: 100%;
}

.product-card-type {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--saffron, #ff9933);
}

.product-card-category {
  font-size: .72rem;
  color: var(--muted, #6b7280);
  font-weight: 500;
}

.product-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.product-card-title a {
  color: var(--ink, #1a1a2e);
  text-decoration: none;
  transition: color .2s ease;
}

.product-card-title a:hover {
  color: var(--saffron, #ff9933);
}

.product-card-desc {
  margin: 0;
  font-size: .82rem;
  color: var(--muted, #6b7280);
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  margin-top: auto;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .25rem;
}

.product-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink, #1a1a2e);
  letter-spacing: -.01em;
}

.product-stock-pill {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.product-stock-pill.low-stock {
  background: rgba(245,158,11,.1);
  color: #d97706;
}

.product-stock-pill.out-of-stock {
  background: rgba(239,68,68,.1);
  color: #dc2626;
}

.product-stock-pill:not(.low-stock):not(.out-of-stock) {
  background: rgba(16,185,129,.1);
  color: #059669;
}

.product-card-actions {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}

.product-card-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
  min-width: 0;
}

.product-variant-select {
  width: 100%;
  padding: .5rem .75rem;
  border-radius: 8px;
  border: 1.5px solid var(--rule, #e5e7eb);
  background: var(--bg, #fff);
  color: var(--ink, #1a1a2e);
  font-size: .82rem;
}

.product-out-of-stock {
  display: inline-flex;
  align-items: center;
  padding: .5rem .85rem;
  border-radius: 10px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.15);
  color: #dc2626;
  font-size: .82rem;
  font-weight: 600;
  width: 100%;
  justify-content: center;
}

/* Empty state */
.shop-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.shop-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,153,51,.1), rgba(255,153,51,.04));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--saffron, #ff9933);
  margin: 0 auto 1.25rem;
}

.shop-empty h3 {
  margin: 0 0 .5rem;
  font-size: 1.2rem;
  color: var(--ink, #1a1a2e);
}

.shop-empty p {
  margin: 0 0 1.25rem;
  color: var(--muted, #6b7280);
  font-size: .92rem;
}

/* Dark mode */
html.dark-mode .shop-hero {
  background: linear-gradient(180deg, rgba(255,153,51,.06) 0%, rgba(255,153,51,.02) 100%);
}

html.dark-mode .shop-filter-section {
  background: var(--dash-card-bg, #131d2e);
  border-color: rgba(255,255,255,.06);
}

html.dark-mode .shop-filter-title {
  color: #e2e8f0;
}

html.dark-mode .shop-filter-option {
  color: #8899aa;
}

html.dark-mode .shop-filter-option:hover,
html.dark-mode .shop-filter-option.active {
  color: var(--saffron, #ff9933);
  background: rgba(255,153,51,.1);
  border-color: rgba(255,153,51,.2);
}

html.dark-mode .shop-filter-input {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
  color: #e2e8f0;
}

html.dark-mode .shop-filter-btn {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
  color: #8899aa;
}

html.dark-mode .product-card {
  background: var(--dash-card-bg, #131d2e);
  border-color: rgba(255,255,255,.06);
}

html.dark-mode .product-card:hover {
  border-color: rgba(255,153,51,.2);
}

html.dark-mode .product-card-title a {
  color: #e2e8f0;
}

html.dark-mode .product-card-desc {
  color: #8899aa;
}

html.dark-mode .product-card-price {
  color: #e2e8f0;
}

html.dark-mode .product-variant-select {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
  color: #e2e8f0;
}

html.dark-mode .shop-view-btn {
  background: var(--dash-card-bg, #131d2e);
  border-color: rgba(255,255,255,.08);
  color: #8899aa;
}

/* Responsive */
@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
  }

  .shop-filter-section {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-card-actions {
    flex-direction: column;
  }

  .product-card-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
