/* ==========================================================================
   SHOP — compact intro + filters/toolbar + a 2026 luxury product grid.
   Product cards are a DELIBERATELY different visual language from the
   homepage's architectural category cards: clean full-bleed image, soft
   shadow, minimal editorial info, no arches/frames/notches.
   ========================================================================== */

.shop-layout{ padding-block: calc(var(--nav-height) + var(--sp-5)) var(--sp-8); }

/* ---- Category filters: compact pills, not big buttons ---- */
.shop-filters{
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-4);
  scrollbar-width: none;
}
.shop-filters::-webkit-scrollbar{ display: none; }
.shop-filter{
  flex: 0 0 auto;
  position: relative;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--bronze);
  white-space: nowrap;
  transition: color var(--d2) var(--ease), border-color var(--d2) var(--ease), background var(--d2) var(--ease);
}
.shop-filter:hover{ color: var(--forest); border-color: var(--gold); }
.shop-filter.is-active{
  color: var(--forest);
  font-weight: 700;
  border-color: var(--gold);
  background: rgba(200,168,107,.08);
}

/* ---- Toolbar ---- */
.shop-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-5);
}
.shop-count{ font-size: var(--text-small); color: var(--bronze); }
.shop-toolbar-actions{ display: flex; align-items: center; gap: var(--sp-2); }

.shop-sort{ position: relative; }
.shop-sort-trigger{
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--forest);
  font-size: var(--text-small); font-weight: 600; cursor: pointer;
  padding: 6px 4px;
}
.shop-sort-trigger svg{ width: 14px; height: 14px; transition: transform var(--d2) var(--ease); }
.shop-sort.is-open .shop-sort-trigger svg{ transform: rotate(180deg); }

.shop-sort-panel{
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  min-width: 160px;
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--d2) var(--ease), transform var(--d2) var(--ease), visibility 0s linear var(--d2);
}
.shop-sort.is-open .shop-sort-panel{
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity var(--d2) var(--ease), transform var(--d2) var(--ease), visibility 0s;
}
.shop-sort-panel a{
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: var(--text-small); color: var(--ink);
}
.shop-sort-panel a:hover{ background: var(--linen); }
.shop-sort-panel a.is-active{ color: var(--gold); font-weight: 700; }

.shop-filter-btn{
  display: none; /* only meaningful once real faceted filters exist */
  align-items: center; gap: 6px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-full);
  padding: 8px 14px; font-size: var(--text-small); color: var(--forest); cursor: pointer;
}
.shop-filter-btn svg{ width: 14px; height: 14px; }

/* ---- Product grid ---- */
.product-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4) var(--sp-3);
}

/* ---- Product card — 2026 language: clean image, soft shadow, minimal
   info, editorial spacing. No thick borders, no architectural cuts. ---- */
.product-card{ display: flex; flex-direction: column; }

.product-card-media{
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--linen);
  box-shadow: var(--shadow-1);
  transition: box-shadow 500ms var(--ease), transform 500ms var(--ease);
}
.product-card:hover .product-card-media{ transform: translateY(-4px); box-shadow: var(--shadow-2); }

.product-card-img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 550ms var(--ease), opacity 550ms var(--ease);
}
.product-card-img--primary{ transform: scale(1); }
.product-card:hover .product-card-img--primary{ transform: scale(1.04); }
.product-card-img--secondary{ opacity: 0; }
.product-card:hover .product-card-img--secondary{ opacity: 1; }

.product-badge{
  position: absolute;
  top: 12px; inset-inline-start: 12px;
  z-index: 2;
  background: var(--warm-white);
  color: var(--forest);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.product-card-wishlist{
  position: absolute;
  top: 12px; inset-inline-end: 12px;
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(253,252,250,.9);
  border: none;
  color: var(--forest);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform var(--d2) var(--ease), color var(--d2) var(--ease);
}
.product-card-wishlist svg{ width: 16px; height: 16px; transition: fill var(--d2) var(--ease); }
.product-card-wishlist:hover{ transform: scale(1.08); }
.product-card-wishlist.is-active{ color: var(--gold); }
.product-card-wishlist.is-active svg{ fill: var(--gold); }

.product-card-view{
  position: absolute;
  inset-inline: 0; bottom: 0; z-index: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ivory);
  background: linear-gradient(0deg, rgba(15,13,10,.65) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 450ms var(--ease), transform 450ms var(--ease);
}
.product-card:hover .product-card-view{ opacity: 1; transform: translateY(0); }

/* ---- Card info — luxury Persian label typography (2026 redesign) ---- */
.product-card-info{
  padding: 10px 22px 12px;
  height: auto;
  text-align: right;
  direction: rtl;
  display: flex; flex-direction: column;
}

.product-card-category{
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: #8C8172;
  margin-bottom: 3px;
}
.category-rule{
  display: inline-block;
  width: 12px; height: 1px;
  background: #C6A46C;
  flex-shrink: 0;
}

.product-card-name{
  font-size: 17px;
  margin-bottom: 2px;
}
.product-card-name a{
  font-family: var(--font-display); font-weight: 600; color: #172F2A;
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 300ms var(--ease);
}
.product-card:hover .product-card-name a{ color: #B08D4F; }

.product-card-price{
  padding-top: 3px;
  border-top: 1px solid rgba(198,164,108,.14);
}
.product-card-price .price-row{ display: flex; align-items: baseline; }
.product-card-price .price-row--was{ gap: 8px; margin-bottom: 2px; }
.product-card-price .price-compare{
  font-family: var(--font-display);
  font-size: 12px; font-weight: 400;
  color: #A79D90;
  text-decoration: line-through;
}
.product-card-price .price-discount{
  font-family: var(--font-display);
  font-size: 11px; font-weight: 500;
  color: #8a5a45;
  background: #f7ece6;
  border-radius: var(--radius-full);
  padding: 3px 8px;
  white-space: nowrap;
}
.product-card-price .price-row--final{ gap: 6px; }
.product-card-price .price-final{ font-family: var(--font-display); font-weight: 700; color: #123E34; font-size: 19px; }
.product-card-price .price-unit{ font-family: var(--font-display); font-weight: 400; color: #8C8172; font-size: 11px; }

@media (prefers-reduced-motion: reduce){
  .product-card-media, .product-card-img, .product-card-view, .product-card-wishlist{
    transition-duration: .01ms !important;
  }
}

/* ---- Pagination ---- */
.shop-pagination{
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: var(--sp-6);
}
.shop-page-btn, .shop-page-num{
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding-inline: 4px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--forest);
  font-size: var(--text-small);
  transition: border-color var(--d2) var(--ease), background var(--d2) var(--ease), color var(--d2) var(--ease);
}
.shop-page-btn svg{ width: 14px; height: 14px; }
.shop-page-btn:hover, .shop-page-num:hover{ border-color: var(--gold); }
.shop-page-num.is-active{ background: var(--forest); border-color: var(--forest); color: var(--ivory); }
.shop-page-ellipsis{ color: var(--bronze); padding-inline: 4px; }

/* ---- Empty state ---- */
.shop-empty{
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--bronze);
}
.shop-empty svg{ width: 40px; height: 40px; opacity: .5; }
.shop-empty p{ font-size: var(--text-1); }

@media (max-width: 1100px){
  .product-grid{ grid-template-columns: repeat(3, 1fr); }
  .product-card-name{ font-size: 16px; }
  .product-card-price .price-final{ font-size: 18px; }
}
@media (max-width: 780px){
  .product-grid{ grid-template-columns: repeat(2, 1fr); gap: var(--sp-3) var(--sp-2); }
  .shop-hero{ min-height: 200px; padding-top: calc(var(--nav-height) + var(--sp-4)); }
  .product-card-name{ font-size: 15px; }
  .product-card-price .price-final{ font-size: 17px; }
  .product-card-info{ padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 460px){
  .product-card-view{ display: none; } /* no hover on touch; card itself is the tap target */
  .product-card-name{ font-size: 14px; }
  .product-card-price .price-final{ font-size: 16px; }
}
