/* ─── Product List Page ─────────────────────────────────────────── */

/* Wrapper — site standard container */
.pl-wrap {
  width: min(1200px, 92%);
  margin-inline: auto;
  padding: 28px 0 56px;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────── */
.pl-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: .82rem;
  opacity: .72;
  margin-bottom: 10px;
}
.pl-breadcrumb a { color: inherit; text-decoration: none; }
.pl-breadcrumb a:hover { color: var(--accent); }
.pl-breadcrumb .current { color: var(--accent); font-weight: 700; opacity: 1; }

/* ─── Page title ─────────────────────────────────────────────────── */
.pl-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--accent);
  margin: 0 0 22px;
}

/* ─── Filter / Search bar ────────────────────────────────────────── */
.pl-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 26px;
}

/* Left side: discount + sort */
.pl-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Discount toggle */
.disc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .88rem;
  user-select: none;
  white-space: nowrap;
}
.disc-toggle input[type="checkbox"] { display: none; }
.disc-box {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1.5px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.12);
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.disc-toggle input:checked ~ .disc-box,
.disc-toggle input:checked + .disc-box {
  background: var(--accent);
  border-color: var(--accent);
}
.disc-toggle input:checked + .disc-box::after {
  content: "✓";
  font-size: .72rem;
  color: #1b1b1b;
  font-weight: 900;
}

/* Sort */
.pl-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pl-sort-lbl {
  font-size: .85rem;
  white-space: nowrap;
  opacity: .85;
}
.pl-select {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12);
  color: var(--ink);
  font-size: .88rem;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

/* Right side: search */
.pl-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 9px 14px;
  min-width: 0;
}
.pl-search-icon { font-size: .95rem; flex-shrink: 0; opacity: .75; }
.pl-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: .9rem;
  font-family: inherit;
}
.pl-search-input::placeholder { opacity: .55; }

/* ─── Product grid ───────────────────────────────────────────────── */
.pl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* ─── Product card ───────────────────────────────────────────────── */
.pl-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  transition: transform .22s, box-shadow .22s;
}
.pl-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(0,0,0,.28);
}

/* Thumbnail */
.pl-thumb {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  text-decoration: none;
}
.pl-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .35s;
}
.pl-card:hover .pl-thumb img { transform: scale(1.05); }

.pl-no-img {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 2.5rem; opacity: .3;
}

/* Discount badge */
.pl-badge {
  position: absolute;
  top: 10px; inset-inline-start: 10px;
  background: var(--accent); color: #1b1b1b;
  font-size: .72rem; font-weight: 900;
  padding: .2rem .6rem; border-radius: 999px;
}

/* Card body */
.pl-card-body {
  padding: 13px 15px 6px;
  flex: 1;
  display: flex; flex-direction: column; gap: 6px;
}
.pl-card-title {
  margin: 0;
  font-size: .97rem; font-weight: 800;
  line-height: 1.45; color: var(--ink);
}
.pl-card-desc {
  margin: 0;
  font-size: .8rem; line-height: 1.65; opacity: .72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price row */
.pl-price-row {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 8px;
  margin-top: auto; padding-top: 8px;
}
.pl-price { font-size: .95rem; font-weight: 900; }
.pl-currency { font-size: .78rem; margin-inline-start: 2px; }
.pl-call { font-size: .9rem; font-weight: 800; color: var(--accent); }
.pl-old {
  font-size: .76rem; font-weight: 600;
  text-decoration: line-through;
  opacity: .6;
}

/* Card footer */
.pl-card-footer {
  padding: 10px 15px 15px;
  display: flex; justify-content: center;
}
.pl-detail-btn {
  display: inline-block;
  background: var(--accent); color: #1b1b1b;
  border-radius: 999px; font-weight: 800; font-size: .86rem;
  padding: .48rem 1.3rem; text-decoration: none;
  transition: filter .18s, transform .18s;
  white-space: nowrap;
}
.pl-detail-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Empty state */
.pl-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 0;
  opacity: .6; font-size: 1rem;
}

/* ─── Responsive — Tablet ≤1000px ───────────────────────────────── */
@media (max-width: 1000px) {
  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .pl-title { font-size: 1.35rem; }
}

/* ─── Responsive — Large mobile ≤720px ─────────────────────────── */
@media (max-width: 720px) {
  .pl-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pl-controls { width: 100%; justify-content: space-between; }
}

/* ─── Responsive — Mobile ≤540px ───────────────────────────────── */
@media (max-width: 540px) {
  .pl-wrap { padding: 20px 0 40px; }
  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pl-card-body { padding: 10px 11px 4px; }
  .pl-card-title { font-size: .88rem; }
  .pl-card-footer { padding: 8px 11px 12px; }
  .pl-detail-btn { font-size: .8rem; padding: .42rem 1rem; }
  .pl-bar { padding: 12px 14px; }
}

/* ─── Responsive — Small mobile ≤380px ─────────────────────────── */
@media (max-width: 380px) {
  .pl-grid { grid-template-columns: 1fr; }
  .pl-thumb { aspect-ratio: 4 / 3; }
  .pl-controls { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ─── Light theme ────────────────────────────────────────────────── */
html.theme-light .pl-bar {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.09);
}
html.theme-light .disc-box {
  border-color: rgba(0,0,0,.3);
  background: rgba(255,255,255,.8);
}
html.theme-light .pl-select {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.15);
  color: var(--ink);
}
html.theme-light .pl-search {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.12);
}
html.theme-light .pl-search-input { color: var(--ink); }
html.theme-light .pl-card {
  background: #fff;
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 5px 18px rgba(0,0,0,.09);
}
html.theme-light .pl-thumb { background: rgba(0,0,0,.04); }
html.theme-light .pl-old { color: rgba(180,0,0,.65); }
