/* =========================
   SHOP PAGE CSS (ONLY)
========================= */

/* SECTION 1: Hero + Controls */
.shop-hero{
  padding: 46px 0 26px;
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(209,174,101,.12), transparent 60%),
    radial-gradient(900px 520px at 80% 30%, rgba(44,94,92,.20), transparent 60%),
    linear-gradient(180deg, #071010 0%, #0b1212 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.shop-hero__top{ margin-bottom: 16px; }

.crumbs{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
  font-size: 13px;
  margin-bottom: 14px;
}

.crumbs a{ color: rgba(255,255,255,.88); text-decoration: none; }
.crumbs a:hover{ text-decoration: underline; }
.crumbs__sep{ opacity: .55; }

.shop-hero__title{
  margin: 0 0 10px;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.5px;
  color: rgba(255,255,255,.94);
}

.shop-hero__subtitle{
  margin: 0;
  max-width: 78ch;
  color: rgba(255,255,255,.72);
  line-height: 1.65;
}

.shop-controls{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.shop-search{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.shop-search__icon{
  opacity: .75;
  color: rgba(255,255,255,.88);
  font-weight: 900;
}

.shop-search input{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(255,255,255,.92);
  font-size: 14px;
}

.shop-search input::placeholder{ color: rgba(255,255,255,.55); }

.shop-sort{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.shop-sort__label{
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 800;
}

.shop-sort select{
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(255,255,255,.92);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.shop-cats{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cat-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.84);
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.cat-pill:hover{
  transform: translateY(-1px);
  border-color: rgba(209,174,101,.28);
  background: rgba(255,255,255,.08);
}

.cat-pill.is-active{
  color: #071010;
  border: 0;
  background: linear-gradient(135deg, #d1ae65, #a38343);
  box-shadow: 0 16px 34px rgba(209,174,101,.16);
}

@media (max-width: 900px){
  .shop-controls{ grid-template-columns: 1fr; }
}

/* SECTION 2+3: Layout + Filters + Results */
.shop-products{
  background: #071010;
  color: rgba(255,255,255,.88); /* important: fixes dark text on dark bg if anything misses styles */
}

/* Make layout more stable on small screens / overflow */
.shop-results{ min-width: 0; }

.shop-layout{
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 10px;
}

.shop-filters{
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: 0 20px 50px rgba(0,0,0,.30);
  padding: 14px;
  position: sticky;
  top: 92px;
}

.shop-filters__head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
}

.shop-filters__close{
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  cursor: pointer;
}

.filter-block{
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.filter-block:last-child{ border-bottom: 0; padding-bottom: 0; }

.filter-title{
  margin: 0 0 10px;
  font-weight: 900;
  color: rgba(255,255,255,.92);
  letter-spacing: -0.2px;
}

.check, .radio{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin-bottom: 10px;
  color: rgba(255,255,255,.88);
  cursor: pointer;
  user-select: none;
}

.check input, .radio input{
  width: 16px;
  height: 16px;
  accent-color: #d1ae65;
}

.price-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.price-field{
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,.75);
  font-size: 12px;
}

.price-field input{
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 0 12px;
  outline: none;
}

.price-field input:focus{
  border-color: rgba(209,174,101,.35);
  box-shadow: 0 0 0 4px rgba(209,174,101,.12);
}

.price-hint{
  margin: 10px 0 0;
  color: rgba(255,255,255,.60);
  font-size: 12px;
  line-height: 1.5;
}

.filter-actions{ padding-top: 12px; }

.shop-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
}

.shop-count{
  color: rgba(255,255,255,.72);
  font-weight: 800;
}

.shop-filter-toggle{ display: none; }
.shop-filters-backdrop{ display: none; }

/* Product grid */
.shop-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* Responsive */
@media (max-width: 900px){
  .shop-layout{ grid-template-columns: 1fr; }
  .shop-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Filters become drawer */
  .shop-filters{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: min(360px, 88%);
    z-index: 9999;
    transform: translateX(-110%);
    transition: transform .25s ease;
    overflow: auto;
  }

  .shop-filters.is-open{ transform: translateX(0); }

  .shop-filters__close{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .shop-filter-toggle{ display: inline-flex; }

  .shop-filters-backdrop{
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }

  .shop-filters-backdrop.is-open{
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 560px){
  .shop-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (prefers-reduced-motion: reduce){
  .shop-filters, .shop-filters-backdrop{ transition: none !important; }
}

/* IMPORTANT: ensure shop never "looks empty" due to reveal animation */
.shop-products .reveal{
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Product card + rating (in case not already in main.css) */
.p-card{
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  transition: transform .18s ease, border-color .18s ease;
}

.p-card:hover{
  transform: translateY(-2px);
  border-color: rgba(209,174,101,.28);
}

.p-media{
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}

.p-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.03);
}

.p-badge{
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #071010;
  background: linear-gradient(135deg, #d1ae65, #a38343);
  box-shadow: 0 14px 26px rgba(209,174,101,.14);
}

.p-body{ padding: 14px 14px 16px; }

.p-title{ margin: 0 0 6px; font-size: 16px; letter-spacing: -0.2px; }
.p-title a{ color: rgba(255,255,255,.92); text-decoration: none; }
.p-title a:hover{ color: rgba(209,174,101,.95); }

.p-meta{ margin: 0; font-size: 13px; color: rgba(255,255,255,.68); }

.p-rating-row{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
}

.stars{
  --star-size: 14px;
  position: relative;
  display: inline-block;
  line-height: 1;
  font-size: var(--star-size);
  letter-spacing: 2px;
}

.stars::before{ content: "★★★★★"; color: rgba(255,255,255,.22); }
.stars::after{
  content: "★★★★★";
  position: absolute;
  left: 0; top: 0;
  width: calc((var(--rating) / 5) * 100%);
  overflow: hidden;
  color: #d1ae65;
}

.p-rating-num{ font-weight: 900; color: rgba(255,255,255,.86); }
.p-review-count{ color: rgba(255,255,255,.60); }

.p-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.p-price{ display: grid; gap: 4px; }
.price-now{ font-weight: 900; color: rgba(255,255,255,.92); }
.price-was{ font-size: 12px; color: rgba(255,255,255,.55); text-decoration: line-through; }

.btn-sm{ padding: 10px 12px; border-radius: 12px; font-size: 13px; }

/* ===== FIX: Force the Shop page to use the old dark background ===== */
body.page-shop,
body.page-shop main {
  background: #071010 !important;
}
