/* ==========================================================
   GLOWUP ONLINE — SHOP TEMPLATES CUSTOM CSS
   Paste this entire file into: Design > Custom CSS
========================================================== */


/* ==========================================================
   1. MAIN LAYOUT (Sidebar + Grid Framework)
========================================================== */
.product-list {
  display: flex !important;
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--black);
  padding: 0 !important;
  gap: 0 !important;
}


/* ==========================================================
   2. SIDEBAR — Structure
========================================================== */
.product-list-nav-and-filters,
.product-list-filters-container {
  border-right: 1px solid var(--black) !important;
  width: 250px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 30px 24px !important;
  /* Column layout so the native filter UI can be ordered below the
     custom category list regardless of DOM order */
  display: flex;
  flex-direction: column;
}

/* Hide the native category link tree everywhere (the custom CATEGORY
   list replaces it on desktop; the drawer's Categories dropdown covers
   it on mobile). Everything else of Squarespace's default filter
   system stays untouched. (July 2026: custom industry links reverted
   to this default UI.) */
.product-list-nav {
  display: none !important;
}

/* The current Squarespace markup leaves the hidden desktop category nav
   inside its own direct flex child. Collapse that empty wrapper too. */
.product-list-category-subnav-container {
  display: none !important;
}

/* Desktop/tablet only: the custom CATEGORY list makes the native
   Categories dropdown redundant. On mobile it stays visible inside
   the native drawer — the single Filter button consolidates
   Categories + Best For. */
@media (min-width: 769px) {
  #product-categories-filter-dropdown {
    display: none !important;
  }
}

/* Sidebar stacking order (native filters render before our injected
   custom sidebar in the DOM) */
.custom-sidebar { order: 1; }
.product-list-filters { order: 2; }

/* CATEGORY and BEST FOR already provide the useful sidebar labels. */
.product-list-filters-sidebar-title {
  display: none !important;
}


/* ==========================================================
   2b. SIDEBAR — Custom Sections (built by JS)
========================================================== */
.custom-sidebar-section {
  padding-bottom: 28px;
  margin-bottom: 28px;
}
.custom-sidebar-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Section headings */
.custom-sidebar-heading {
  font-family: sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px 0;
  padding-bottom: 12px;
  border-bottom: 1px dotted var(--black);
}

/* Link lists */
.custom-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.custom-sidebar-list li {
  margin-bottom: 4px;
}
.custom-sidebar-list li:last-child {
  margin-bottom: 0;
}

/* Individual links */
.custom-sidebar-link {
  font-family: sans-serif;
  font-size: 0.9rem;

  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}
.custom-sidebar-link:hover {

}
.custom-sidebar-link.active {
  font-weight: 700;

}

/* Superscript counts */
.custom-sidebar-link sup {
  font-size: 0.6rem;

  font-weight: 400;
  margin-left: 2px;
}


/* ==========================================================
   2c. NATIVE FILTER UI RESTYLE (Industry dropdown + buttons)
   Same classes serve the desktop sidebar and the mobile drawer.
========================================================== */

/* "N Results" text — a direct flex child of .product-list that pops
   into the row when a filter applies; counts already live in the
   sidebar links and the Filter button's applied-count badge */
.product-list-result-count-container {
  display: none !important;
}

/* Filter label styled to match .custom-sidebar-heading
   (!important where Squarespace's own label styles otherwise win) */
.product-list-filters .product-filter-label {
  display: block;
  width: 100%;
  font-family: sans-serif;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  color: var(--black);
  margin: 0 0 12px 0 !important;
  padding: 0 0 12px 0 !important;
  border-bottom: 1px dotted var(--black);
}

/* Compact pill select */
.product-list-filters .product-filter-dropdown-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  border: 1px solid var(--black) !important;
  border-radius: 100px !important;
  background-color: transparent !important;
  padding: 10px 38px 10px 16px !important;
  font-family: sans-serif;
  font-size: 0.85rem !important;
  color: var(--black) !important;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Native form-effect underline spans inside the dropdown wrapper —
   redundant under the pill select */
.product-list-filters .form-input-effects-border,
.product-list-filters .form-input-effects-highlight {
  display: none !important;
}

/* Compact solid apply button. NOTE: Squarespace sets the button's
   padding (and the select's border-color/font-size, and the mobile
   drawer-open button's height) with !important inside a CSS cascade
   layer — unbeatable from unlayered stylesheets, so shop.js mirrors
   those exact properties as inline !important styles. */
.product-list-filter-button {
  font-family: sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  padding: 12px 18px !important;
  border-radius: 100px !important;
  background: var(--black) !important;
  color: var(--white) !important;
}


/* ==========================================================
   3. PRODUCT GRID SETUP
========================================================== */
.product-list-container {
  flex-grow: 1;
}
.product-list-layout-container {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-gap: 0 !important;
  margin-bottom: -1px;
}


/* ==========================================================
   4. PRODUCT ITEM — Borders & Card Layout
========================================================== */
.product-list-item {
  border-right: 1px solid var(--black) !important;
  border-bottom: 1px solid var(--black) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 24px !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

/* Remove right border on the last column */
.product-list-item:nth-child(3n) {
  border-right: none !important;
}
/* Remove bottom border on the last row */
.product-list-item:nth-last-child(-n+3) {
  border-bottom: none !important;
}

/* Make the inner link a flex column so tags stick to the bottom */
.product-list-item-link {
  display: flex !important;
  flex-direction: column;
  flex-grow: 1;
  text-decoration: none !important;
  gap: 0 !important;
}


/* ==========================================================
   5. PRODUCT IMAGE AREA
========================================================== */
.product-list-image-wrapper {
  background-color: #eae8e3;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  overflow: visible;
}
.product-list-item-image {
  margin: 0 !important;
  width: 100%;
}
.product-list-item-image img {
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}


/* ==========================================================
   6. PRODUCT META — Title & Price Row
========================================================== */
.product-list-item-meta {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.product-list-title-price {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 16px;
  width: 100%;
}
.product-list-item-title {
  font-size: 1.4rem;
  color: var(--black);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.product-list-item-price {
  font-family: sans-serif;
  font-size: 1.1rem;
  color: var(--black);
  font-weight: 400;
  white-space: nowrap;
  margin-left: auto !important; /* push price to far right */
  text-align: right;
}


/* ==========================================================
   7. HIDE BADGES (for now)
========================================================== */
.product-list-item-status {
  display: none !important;
}


/* ==========================================================
   8. INJECTED ELEMENTS — Excerpt & Tag Pills (built by JS)
========================================================== */

/* Product description / excerpt */
.custom-product-excerpt {
  font-family: sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0 0 18px 0;
  flex-grow: 1; /* pushes tags to the bottom of the card */
}

/* Tag pill container */
.custom-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: auto; /* stick to bottom */
}

/* Individual tag pill */
.custom-tag-pill {
  border: 1px solid var(--black);
  border-radius: 30px;
  padding: 0px 15px;
  line-height: 1.8;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.custom-tag-pill:hover {
  background-color: var(--black);
  color: var(--white);
}


/* ==========================================================
   9. RESPONSIVE
========================================================== */

/* Tablet — 2 columns */
@media (max-width: 1024px) {
  .product-list-layout-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .product-list-item:nth-child(3n) {
    border-right: 1px solid var(--black) !important;
  }
  .product-list-item:nth-child(2n) {
    border-right: none !important;
  }
  .product-list-item:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--black) !important;
  }
  .product-list-item:nth-last-child(-n+2) {
    border-bottom: none !important;
  }
}

/* Mobile — stacked layout, native filter drawer, 2-column grid.
   All filtering (Categories + Best For) consolidates into the native
   Filter button + bottom drawer. */
@media (max-width: 768px) {
  .product-list {
    flex-direction: column !important;
  }

  /* 1. Page heading breathing room */
  .product-list-header {
    margin: 40px 20px !important;
  }

  /* Nothing visible left inside the sidebar block on mobile (custom
     list hidden, drawer elements are overlays) — collapse it */
  .product-list-nav-and-filters,
  .product-list-filters-container {
    width: 100%;
    border-right: none !important;
    border-bottom: none !important;
    padding: 0 !important;
  }

  /* Native drawer-open button band: right-aligned pill carrying the
     toolbar's bottom border (the grid starts below it) */
  .product-list-filters-drawer-open-button-container {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--black);
  }

  .product-list-filters-drawer-open-button {
    font-family: sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    width: 100% !important;
    height: 40px !important; /* layer-trapped — shop.js mirrors inline */
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 1px solid var(--black) !important;
    border-radius: 100px !important;
    background: transparent !important;
    color: var(--black) !important;
  }

  /* JS moves the existing Categories dropdown into Squarespace's native
     drawer. Collapse only its now-empty sticky wrapper. */
  .product-list-category-select-container.is-glowup-category-relocated {
    display: none !important;
  }

  /* 2. Custom sidebar list is desktop-only */
  .custom-sidebar {
    display: none !important;
  }

  /* 3. Grid — 2 columns (the max-1024 border pattern already handles
     2-col edges; JS grid-edge classes refine on filter/resize) */
  .product-list-layout-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .product-list-item {
    padding: 14px !important;
  }

  /* Card tightening for the narrower columns */
  .product-list-item-title {
    font-size: 1.3rem !important;
  }
  .product-list-item-price {
    font-size: 1.3rem !important;
  }
  .product-list-title-price {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px !important;
    margin-bottom: 5px !important;
  }
  .product-list-item-title {
    min-width: 0;
    white-space: normal;
  }
  .custom-product-excerpt {
    font-size: 0.8125rem !important;
    margin-bottom: 12px !important;
  }
  .product-list-image-wrapper {
    padding: 12px !important;
    border-radius: 5px !important;
    margin-bottom: 10px !important;
  }
  .custom-tag-pill {
    font-size: 0.58rem !important;
    padding: 0 9px !important;
  }
}


/* ==========================================================
   10. JS-CALCULATED GRID EDGES
   Keeps borders correct when filtering returns partial rows.
   The nth-child rules above remain as a no-JS fallback.
========================================================== */
.product-list-layout-container.has-js-grid-edges .product-list-item {
  border-right: 1px solid var(--black) !important;
  border-bottom: 1px solid var(--black) !important;
}

.product-list-layout-container.has-js-grid-edges .product-list-item.is-row-end {
  border-right: none !important;
}

.product-list-layout-container.has-js-grid-edges .product-list-item.is-last-row {
  border-bottom: none !important;
}
