/*Products Page (hard-coded)*/
.products-page { padding: 2rem; margin-top: 100px; }
.page-inner { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; max-width: 1400px; margin: 0 auto; }
.filters { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; background: #fff; border-radius: 12px; box-shadow: var(--box-shadow); padding: 1.5rem; }
.filters__title { font-size: 2.4rem; margin: 0 0 1rem; color: #111; }
.filter-group { margin-top: 1.5rem; }
.filter-group__title { font-size: 1.6rem; color: #111; margin-bottom: .5rem; }
.filter-list { list-style: none; padding-left: 0; }
.filter-list li { padding: .6rem 0; font-size: 1.4rem; color: #222; }
.filter-list a { color: inherit; }
.filter-list a { display: block; text-decoration: none; }
.filter-list a:hover { text-decoration: underline; }
.filter-list a.is-active { font-weight: 700; text-decoration: underline; }
.filter-list .clear-item a { opacity: .8; font-style: italic; }

.products-area .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.filter-toggle { border: 1px solid #ddd; background: #fff; border-radius: 10px; padding: .6rem 1rem; cursor: pointer; }
.sort { font-size: 1.4rem; color: #333; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.product-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--box-shadow); }
.product-card .img-wrap { display: block; position: relative; }
.product-card .img-skeleton { width: 100%; padding-top: 125%; background: linear-gradient(180deg, #2A2F36, #414854); }
.product-card img { width: 100%; display: block; object-fit: cover; }
.product-card .meta { padding: 1.2rem 1.2rem 1.6rem; }
.badge { font-size: 1.3rem; font-weight: 700; margin-bottom: .4rem; }
.badge--orange { color: #E85D04; }
.badge--green { color: #2e7d32; }
.brand { font-size: 1.6rem; color: #111; margin: .2rem 0; }
.name { font-size: 1.3rem; color: #555; margin: .2rem 0 .4rem; }
.colors { font-size: 1.2rem; color: #666; margin: 0 0 .6rem; }
.price { font-size: 1.6rem; color: #111; font-weight: 600; }

@media (max-width: 1100px) {
    .page-inner { grid-template-columns: 1fr; }
    .filters { position: static; max-height: none; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .product-grid { grid-template-columns: 1fr; }
}

/* Collapsible filter lists */
.filter-group__more {
  margin-top: .25rem;
  padding: .4rem .6rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}
.filter-list .is-hidden { display: none; }

/* Collapsing the sidebar */
.page-inner.filters-hidden { grid-template-columns: 1fr; }
.filters.is-collapsed { display: none; }

/* ---- Toolbar with title and controls ---- */
.products-area .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; }
.page-title { font-size: 2.4rem; line-height: 1.1; color: #111; margin: 0; }
.toolbar-controls { display: flex; align-items: center; gap: 1rem; }

/* ---- Accordion filter titles ---- */
.filter-group__title { width: 100%; text-align: left; background: #fff; border: 1px solid #e6e6e6; border-radius: 10px; padding: .75rem 1rem; font-size: 1.5rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.filter-group__title:focus { outline: 2px solid var(--accent-cyan, #0aa); outline-offset: 2px; }
.filter-group .caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #333; transition: transform .2s ease; }
.filter-group:not(.collapsed) .caret { transform: rotate(180deg); }

/* ---- Collapsed state hides lists & more button ---- */
.filter-group.collapsed .filter-list { display: none; }
.filter-group.collapsed .filter-group__more { display: none; }

/* ---- Spacing for expanded lists ---- */
.filter-group .filter-list { margin-top: .5rem; }

/* --- Layout polish to match reference grid + sidebar --- */
.products-page { padding: 2rem 2rem 4rem; }
.page-inner { grid-template-columns: 260px 1fr; gap: 2.4rem; }
.filters { background: #fff; border: 1px solid #eaeaea; box-shadow: none; }

/* Hide Filters button matches ref */
.filter-toggle { border: 0; background: transparent; font-size: 1.4rem; display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .6rem; }
.filter-toggle::before { content: '\2699'; font-size: 1.2rem; opacity: .7; }

/* Vertical list look */
.filter-group { margin-top: 1.2rem; }
.filter-group__title { border: 1px solid #eaeaea; }
.filter-group .filter-list { margin: .5rem 0 0; }
.filter-list li { padding: .35rem 0; }
.filter-list a { display: block; text-decoration: none; color: #111; }
.filter-list a:hover { text-decoration: underline; }
.filter-list a.is-active { font-weight: 700; text-decoration: underline; }
.filter-list .clear-item a { opacity: .8; font-style: italic; }

/* Product grid like reference */
.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.product-card { box-shadow: none; border: 1px solid #f0f0f0; }
.product-card .img-wrap { aspect-ratio: 4/3; background: #f7f7f7; }
.product-card img { width: 100%; height: 100%; object-fit: cover; }
.product-card .meta { padding: 1rem 0; }
.brand { font-size: 1.5rem; margin: .25rem 0; }
.name { font-size: 1.25rem; color: #555; margin: .1rem 0 .4rem; }
.price { font-size: 1.5rem; }

/* Sidebar collapse matches reference 'Hide Filters' */
.page-inner.filters-hidden { grid-template-columns: 1fr; }
.filters.is-collapsed { display: none; }

@media (max-width: 1100px) {
  .page-inner { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
}

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; font-size: 1.4rem; }
.pager__inner { display: flex; gap: 1rem; align-items: center; width: 100%; justify-content: space-between; }
.pager__links { display: flex; gap: 1rem; align-items: center; }
.pager__page strong { font-weight: 700; }

/* --- Toggleable filter rows (checkbox style) --- */
.check-row { display: flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.check-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid #111; border-radius: 4px; display: inline-block; position: relative; }
.check-row input[type="checkbox"]:checked { background: #111; }
.check-row input[type="checkbox"]:checked::after { content: '\2713'; position: absolute; top: -2px; left: 2px; font-size: 16px; color: #fff; }
.check-row .label { font-size: 1.4rem; color: #111; }
.clear-item .clear-filters { background: none; border: 0; padding: 0; font-size: 1.3rem; text-decoration: underline; cursor: pointer; }

/* ----- Toolbar controls ----- */
.toolbar-controls { display: flex; align-items: center; gap: 1.5rem; }
.filter-toggle { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid #ddd; background: #fff; border-radius: 20px; padding: .4rem .9rem; cursor: pointer; }
.icon-sliders { width: 16px; height: 16px; display: inline-block; position: relative; }
.icon-sliders::before, .icon-sliders::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: #111; }
.icon-sliders::before { top: 4px; }
.icon-sliders::after { bottom: 4px; }

/* Sort dropdown */
.sort { position: relative; }
.sort__btn { border: 1px solid #ddd; background: #fff; border-radius: 20px; padding: .4rem .9rem; cursor: pointer; font-size: 1.4rem; display: inline-flex; align-items: center; gap: .4rem; }
.sort__btn .caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #333; transition: transform .15s ease; }
.sort.is-open .sort__btn .caret { transform: rotate(180deg); }
.sort__menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #eaeaea; border-radius: 10px; padding: .6rem 0; box-shadow: 0 8px 24px rgba(0,0,0,.08); min-width: 220px; z-index: 10; }
.sort__menu[aria-hidden="true"] { display: none; }
.sort__menu a { display: block; padding: .6rem 1rem; color: #111; text-decoration: none; font-size: 1.4rem; }
.sort__menu a:hover { background: #f6f6f6; }
.sort__menu a.is-active { font-weight: 700; }

/* ===== Product Quick-View Modal (modern) ===== */
.product-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(960px, 96vw);
  width: 100%;
  margin: 8vh auto;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
  transform: translateY(10px);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.product-modal[open] { opacity: 1; transform: translateY(0); }
.product-modal::backdrop {
  background: rgba(17,17,17,.45);
  backdrop-filter: blur(4px);
}

.product-modal__container { position: relative; }
.product-modal__content {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.product-modal__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
}
@media (max-width: 860px) {
  .product-modal__layout { grid-template-columns: 1fr; }
}

.product-modal__media {
  background: linear-gradient(180deg,#f6f7f8,#eceef1);
  display: grid;
  place-items: center;
  min-height: 420px;
}
.product-modal__media img { width: 100%; height: auto; object-fit: contain; }

.product-modal__details { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.product-modal__header { display: grid; gap: 10px; }
.product-modal__vendor { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; }
.product-modal__title { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.15; margin: 0; color: #111; }
.product-modal__price-container { display: flex; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 700; }
.product-modal__compare-price { font-weight: 500; font-size: 16px; color: #9ca3af; text-decoration: line-through; }

.product-modal__description { max-height: 160px; overflow: auto; border-top: 1px solid #f0f0f0; padding-top: 12px; }
.product-modal__description-text { color: #4b5563; font-size: 14px; line-height: 1.5; }
.product-modal__description-text p { margin: 0 0 .6rem; }

shopify-variant-selector { display: block; border: 1px solid #eee; border-radius: 12px; padding: 12px; }

.product-modal__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
@media (max-width: 520px) {
  .product-modal__buttons { grid-template-columns: 1fr; }
}
.product-modal__add-button,
.product-modal__buy-button {
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #111;
}
.product-modal__add-button { background: #111; color: #fff; }
.product-modal__add-button:hover { background: #222; }
.product-modal__buy-button { background: #fff; color: #111; }
.product-modal__buy-button:hover { background: #f6f6f6; }
.product-modal__add-button:disabled,
.product-modal__buy-button:disabled { opacity: .4; cursor: not-allowed; }

.product-modal__close-container { position: absolute; right: 10px; top: 10px; z-index: 2; }
.product-modal__close {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
  color: #111;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.product-modal__close:hover { background: #fff; }