/* ============================================================
   QUEENIE-B HONEY — Shop Styles
   shop.css: shop layout, image cards, PDP modal, filters, search
   ============================================================ */

/* ── SHOP CONTROLS ────────────────────────────────────────── */
.shop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 0 32px;
  border-bottom: 3px solid var(--rich-black);
  margin-bottom: 40px;
}

.shop-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--rich-black);
  font-size: 13px;
  font-weight: 600;
  color: var(--rich-black);
  cursor: pointer;
  background: transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--rich-black);
}

.filter-tab:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--rich-black);
}

.filter-tab.active {
  background: var(--gold);
  border-color: var(--rich-black);
  color: var(--rich-black);
  box-shadow: 4px 4px 0 var(--rich-black);
}

.shop-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-search {
  position: relative;
}

.shop-search svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

#product-search {
  padding: 9px 14px 9px 38px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--rich-black);
  background: var(--white);
  font-size: 13px;
  color: var(--text-primary);
  width: 200px;
  box-shadow: 3px 3px 0 var(--rich-black);
  transition: border-color 0.2s, box-shadow 0.2s, width 0.25s;
}

#product-search:focus {
  border-color: var(--amber);
  box-shadow: 3px 3px 0 var(--amber);
  width: 240px;
  outline: none;
}

.sort-select {
  padding: 9px 32px 9px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--rich-black);
  background: var(--white);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-shadow: 3px 3px 0 var(--rich-black);
  transition: border-color 0.2s;
  font-weight: 500;
}

.sort-select:focus { border-color: var(--amber); outline: none; }

.view-toggle {
  display: flex;
  border: 2px solid var(--rich-black);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--rich-black);
}

.view-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.view-btn.active { background: var(--gold); color: var(--rich-black); }
.view-btn:not(.active):hover { background: var(--cream-dark); color: var(--text-muted); }

.shop-count {
  font-size: 13px;
  color: var(--text-faint);
  white-space: nowrap;
  font-weight: 500;
}

/* ── PRODUCTS GRID ────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
  align-items: start;
}

/* ── IMAGE-FORWARD PRODUCT CARD ───────────────────────────── */
.product-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.product-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  border-radius: 20px;
}

.pcard-img {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 17px 17px 0 0;
  transition: filter 0.25s;
}

.product-card:hover .pcard-img { filter: brightness(1.06); }

.pcard-icon {
  width: 90px;
  height: 90px;
  color: var(--rich-black);
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
  transition: transform 0.3s var(--ease-out);
}

.product-card:hover .pcard-icon { transform: scale(1.08) translateY(-4px); }

.pcard-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pcard-body {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pcard-cat { font-size: 11px; }

.pcard-name {
  font-family: var(--fd);
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--rich-black);
  line-height: 1.25;
}

.pcard-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.pcard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 10px;
}

.pcard-price {
  font-family: var(--fd);
  font-size: 24px;
  color: var(--rich-black);
  line-height: 1;
}

.pcard-cta {
  flex-shrink: 0;
  border: 2px solid var(--rich-black);
  box-shadow: 3px 3px 0 var(--rich-black);
}

.pcard-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--rich-black);
}

/* ── HIDDEN / EMPTY STATES ────────────────────────────────── */
.product-card.hidden { display: none; }

.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-faint);
}

.shop-empty h3 {
  font-family: var(--fd);
  font-size: 22px;
  color: var(--text-muted);
}

/* ── LIST VIEW ────────────────────────────────────────────── */
.products-grid.list-view {
  grid-template-columns: 1fr;
  gap: 20px;
}

.products-grid.list-view .product-card {
  flex-direction: row;
}

.products-grid.list-view .pcard-img {
  width: 180px;
  min-width: 180px;
  aspect-ratio: 1;
  border-radius: 17px 0 0 17px;
}

.products-grid.list-view .pcard-body {
  padding: 20px 28px;
}

.products-grid.list-view .pcard-name { font-size: clamp(18px, 1.6vw, 24px); }

/* ── PRODUCT DETAIL MODAL ─────────────────────────────────── */
#pdp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#pdp-backdrop.visible { opacity: 1; pointer-events: all; }

#pdp-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  width: min(1060px, 96vw);
  height: 88dvh;
  background: var(--cream);
  border: 3px solid var(--rich-black);
  border-radius: 24px;
  box-shadow: 12px 12px 0 var(--rich-black);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  overflow: hidden;
}

#pdp-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.pdp-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--rich-black);
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--rich-black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.18s, transform 0.18s;
}

.pdp-close:hover {
  background: var(--gold);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--rich-black);
}

.pdp-inner {
  display: grid;
  grid-template-columns: 420px 1fr;
  height: 100%;
}

.pdp-left {
  padding: 32px 28px 32px 32px;
}

.pdp-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
}

.pdp-img-area {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-icon {
  width: 130px;
  height: 130px;
  color: var(--rich-black);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2));
}

.pdp-right {
  padding: 40px 40px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 3px solid var(--rich-black);
  overflow-y: auto;
  overscroll-behavior: contain;
  height: 100%;
  min-height: 0;
}

.pdp-cat { font-size: 11px; }

.pdp-name {
  font-family: var(--fd);
  font-size: clamp(24px, 2.4vw, 36px);
  color: var(--rich-black);
  line-height: 1.15;
}

.pdp-price {
  font-family: var(--fd);
  font-size: 34px;
  color: var(--rich-black);
  line-height: 1;
}

.pdp-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.pdp-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.pdp-opt-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.pdp-variants { display: flex; gap: 8px; flex-wrap: wrap; }

.pdp-pill {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
  background: var(--white);
  color: var(--text-muted);
}

.pdp-pill:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-1px);
}

.pdp-pill.selected {
  border-color: var(--rich-black);
  background: var(--rich-black);
  color: var(--cream);
  box-shadow: 3px 3px 0 var(--amber);
}

.pdp-qty-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.pdp-qty-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  min-width: 70px;
}

.pdp-qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--rich-black);
  border-radius: var(--radius-pill);
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--rich-black);
}

.pdp-qty-btn {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--rich-black);
  font-weight: 300;
}

.pdp-qty-btn:hover { background: var(--gold); }

.pdp-qty-val {
  min-width: 36px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--rich-black);
  border-left: 2px solid var(--rich-black);
  border-right: 2px solid var(--rich-black);
}

.pdp-add-btn {
  width: 100%;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--rich-black);
  box-shadow: 5px 5px 0 var(--rich-black);
  font-size: 16px;
}

.pdp-add-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--rich-black);
}

.pdp-trust-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.pdp-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .shop-controls { flex-direction: column; align-items: stretch; }
  .shop-controls-right { justify-content: space-between; flex-wrap: wrap; }
  #product-search { width: 100%; }
  #product-search:focus { width: 100%; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
}

@media (max-width: 720px) {
  #pdp-modal { height: auto; max-height: 92dvh; overflow-y: auto; }
  .pdp-inner { grid-template-columns: 1fr; height: auto; }
  .pdp-left { padding: 20px 20px 12px; }
  .pdp-right { border-left: none; border-top: 3px solid var(--rich-black); padding: 24px 20px; height: auto; overflow-y: visible; }
  .pdp-img-wrap { aspect-ratio: 4/3; }
  .products-grid.list-view { grid-template-columns: 1fr 1fr; }
  .products-grid.list-view .product-card { flex-direction: column; }
  .products-grid.list-view .pcard-img { width: 100%; border-radius: 17px 17px 0 0; }
}

@media (max-width: 600px) {
  .shop-filters { gap: 6px; }
  .filter-tab { padding: 7px 14px; font-size: 12px; }
  .view-toggle { display: none; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .pcard-body { padding: 14px 16px 14px; gap: 6px; }
  .pcard-name { font-size: 15px; }
  .pcard-desc { display: none; }
  .pcard-price { font-size: 18px; }
}

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