/* ============================================================
   shop.css — Shop Listing Page Styles
   Base variables and utilities come from style.css
============================================================ */

/* ── Page Hero Strip ─────────────────────────────────────── */
.page-hero-strip {
  background: var(--cream2);
  border-bottom: 1px solid var(--border);
  padding: 32px 48px;
}
.phs-inner { max-width: 1400px; margin: 0 auto; }
.phs-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 400;
  color: var(--dark);
  margin: 8px 0 4px;
}
.phs-count { font-size: 13px; color: var(--warm); }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  margin-bottom: 6px;
}
.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--warm);
}
.breadcrumb a { 
  color: var(--warm); 
  transition: color .2s; 
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--light); }
.breadcrumb li:last-child span { color: var(--dark); }

/* ── Shop Layout: Sidebar + Main ────────────────────────── */
.shop-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 48px 30px;
  gap: 40px;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.shop-sidebar {
  position: sticky;
  top: 90px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  overflow: hidden;
}
.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-title { font-size: 13px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.clear-filters {
  font-size: 11px;
  color: var(--gold);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  letter-spacing: .5px;
}
.clear-filters:hover { text-decoration: underline; }

/* Filter Groups */
.filter-group { border-bottom: 1px solid var(--border); }
.filter-group--last { border-bottom: none; padding: 16px 20px; }
.filter-group-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dark);
  cursor: pointer;
  font-family: var(--sans);
  transition: background .2s;
}
.filter-group-hdr:hover { background: var(--cream); }
.filter-group-hdr i { font-size: 14px; color: var(--warm); transition: transform .25s; }
.filter-group-hdr.open i { transform: rotate(180deg); }

.filter-body {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}
.filter-body.open {
  max-height: 400px;
  padding: 4px 20px 16px;
  overflow-y: auto;
}

/* ── Sidebar Categories Styling ───────────────────────────── */
.cat-item {
  margin-bottom: 8px;
}
.filter-cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.2s;
}
.filter-cat-link:hover, 
.filter-cat-link.active {
  color: var(--gold);
}
.filter-cat-link img {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 4px;
}

/* Subcategories Indentation */
.subcat-list {
  list-style: none;
  padding-left: 28px;
  margin: 4px 0 8px;
  border-left: 1px dashed var(--border);
}
.subcat-list li {
  margin-bottom: 5px;
}
.subcat-list a {
  font-size: 13px;
  color: var(--warm);
  text-decoration: none;
  display: block;
  padding: 4px 0 4px 10px;
  transition: color 0.2s;
}
.subcat-list a:hover, 
.subcat-list li.active > a {
  color: var(--gold);
}

/* Sub-subcategories Indentation */
.subsubcat-list {
  list-style: none;
  padding-left: 14px;
  margin: 4px 0 0;
}
.subsubcat-list a {
  font-size: 12px;
  color: var(--light);
}
.subsubcat-list li.active > a {
  color: var(--dark);
}

/* ── Checkboxes & Quick Filters ──────────────────────────── */
.checkmark {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  flex-shrink: 0;
  transition: all .2s;
  position: relative;
}

.filter-check-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--warm);
  text-decoration: none;
  transition: color 0.15s;
}
.filter-check-link:hover { color: var(--dark); }

.filter-check-link.active .checkmark {
  background: var(--gold);
  border-color: var(--gold);
}
.filter-check-link.active .checkmark::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(40deg);
}

/* Price Slider */
.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--warm);
  margin-bottom: 10px;
}
.price-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.price-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.price-preset {
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--warm);
  transition: all .2s;
  text-decoration: none;
}
.price-preset:hover,
.price-preset.active { background: var(--dark); color: #fff; border-color: var(--dark); }

/* ── Toolbar ─────────────────────────────────────────────── */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 16px; }

/* Mobile Filter Toggle */
.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--dark);
  transition: all .2s;
}
.filter-toggle-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Active Filter Chips */
.active-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--cream2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--dark);
}
.chip a {
  color: var(--warm);
  font-size: 14px;
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s;
}
.chip a:hover { color: var(--dark); }

/* Sort Select */
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 12px; color: var(--warm); white-space: nowrap; }
.sort-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 13px;
  font-family: var(--sans);
  color: var(--dark);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6560' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}
.sort-select:focus { border-color: var(--gold); }

/* View Toggle */
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.view-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--white);
  color: var(--warm);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.view-btn.active { background: var(--dark); color: var(--white); }
.view-btn:hover:not(.active) { background: var(--cream); }

/* ── Product Grid & Card (Box Layout & Alignment) ────────── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.prod-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.prod-card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.06);
  border-color: #d1cfcb;
}

/* ── Image Area & Overlays (Badges, Buttons) ────────────── */
.prod-imgw {
  position: relative; /* Crucial for placing badges/buttons on top */
  width: 100%;
  aspect-ratio: 4/3;
  background: #fdfdfd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #f5f5f5;
}

/* Fixes the gap issue at top/bottom of the image */
.prod-imgw a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none !important;
  border: none !important;
}

.prod-imgw img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
  transition: transform 0.5s ease; /* Optional zoom effect */
}
.prod-card:hover .prod-imgw img {
  transform: scale(1.04);
}

/* Badge Styling (New / Sale / Trending) */
.prod-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.badge-new { background: var(--dark); color: #fff; }
.badge-sale { background: var(--gold); color: #fff; }
.badge-hot { background: #d9534f; color: #fff; }

/* Wishlist Button */
.prod-wish {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--warm);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}
.prod-wish:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.prod-wish.wished i {
  color: var(--gold);
}

/* Quick Add / Quick View Button */
.prod-qadd {
  position: absolute;
  bottom: -50px; /* Hidden below the image initially */
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 12px 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid var(--border);
}
.prod-card:hover .prod-qadd {
  bottom: 0; /* Slides up on hover */
}
.prod-qadd:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* ── Product Info Area ───────────────────────────────────── */
.prod-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.prod-name {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 12px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s;
}
.prod-name:hover { color: var(--gold); }

.prod-foot {
  margin-top: auto !important; /* Forces the footer to the bottom */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

/* ── Product View Button (Minimal Style) ─────────────────── */
.prod-atc-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: all 0.2s ease;
}
.prod-atc-btn:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── List View Override ──────────────────────────────────── */
.prod-grid.list-view {
  grid-template-columns: 1fr;
}
.prod-grid.list-view .prod-card {
  display: grid;
  grid-template-columns: 240px 1fr;
}
.prod-grid.list-view .prod-imgw { height: 200px; border-bottom: none; border-right: 1px solid #f5f5f5; }
.prod-grid.list-view .prod-info { padding: 24px 28px; }

/* ── Empty State ─────────────────────────────────────────── */
.shop-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--warm);
}
.shop-empty i { font-size: 52px; color: var(--light); display: block; margin-bottom: 16px; }
.shop-empty h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin-bottom: 10px; color: var(--dark); }
.shop-empty p { font-size: 14px; }
.shop-empty a { color: var(--gold); font-family: var(--sans); font-size: 14px; text-decoration: underline; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
      margin-bottom: 23px;
}
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--warm);
  text-decoration: none;
  transition: all .2s;
}
.pg-btn:hover { border-color: var(--dark); color: var(--dark); }
.pg-btn--active { background: var(--dark); color: var(--white); border-color: var(--dark); }
.pg-dots { color: var(--light); padding: 0 4px; }

/* Override width for Next/Prev buttons */
.pg-next, .pg-prev {
  width: auto;
  padding: 0 18px;
  font-size: 12px;
  letter-spacing: 1px;
}
.pg-next i, .pg-prev i { margin: 0 4px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .shop-wrap { grid-template-columns: 220px 1fr; padding: 32px 28px 60px; }
}

@media (max-width: 800px) {
  .shop-wrap { grid-template-columns: 1fr; padding: 24px 20px 80px; gap: 0; }
  .shop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 80%;
    max-width: 320px;
    z-index: 800;
    transform: translateX(-105%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--border);
    top: 0;
  }
  .shop-sidebar.sidebar-open { transform: translateX(0); }
  .filter-toggle-btn { display: flex; }
  .page-hero-strip { padding: 24px 20px; }
}

@media (max-width: 600px) {
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .prod-grid.list-view .prod-card { grid-template-columns: 1fr; }
  .prod-grid.list-view .prod-imgw { height: 220px; border-right: none; border-bottom: 1px solid #f5f5f5; }
  .sort-label { display: none; }
}