/*
 * products.css — IndoCraft Product List (Category / Search) Page
 * Page-specific only. Global tokens, reset, header, footer → style.css
 * v2.0 — 2026-08-04 (design improvements: card image contain, hover polish,
 *         hero ornament, filter open state, grid rhythm, noUiSlider fix)
 */

/*#ic-main*/

#ic-main { background: #fff !important; }

/*#ic-main*/

/* ============================================================
   BREADCRUMB
   ============================================================ */
.ic-plp-breadcrumb {
  padding: 14px 0 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ic-muted);
}

.ic-plp-breadcrumb a {
  color: var(--ic-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.ic-plp-breadcrumb a:hover {
  color: var(--ic-primary);
}

.ic-plp-breadcrumb span {
  margin: 0 7px;
  opacity: 0.5;
}

/* ============================================================
   CATEGORY HERO
   ============================================================ */
.ic-plp-hero {
  text-align: center;
  padding: 28px 0 0;
  margin-bottom: 28px;
}

/* Gold ornament divider — matches homepage section style */
.ic-plp-hero::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--ic-gold);
  margin: 20px auto 0;
  border-radius: 1px;
}

/*.ic-plp-hero__eyebrow {*/
/*  font-family: var(--font-accent);*/
/*  font-size: 0.72rem;*/
/*  letter-spacing: 0.14em;*/
/*  text-transform: uppercase;*/
/*  color: var(--ic-gold);*/
/*  margin-bottom: 8px;*/
/*}*/

.ic-plp-hero__eyebrow {	font-family: var(--font-accent);	font-size: 0.72rem;
	letter-spacing: 0.32em;	text-transform: uppercase;	color: #8E0B0B;
	margin-bottom: 8px; }


.ic-plp-hero__title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--ic-ink);
  margin: 0 0 12px;
  line-height: 1.15;
}

.ic-plp-hero__desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ic-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ============================================================
   PAGE LAYOUT — sidebar + main
   ============================================================ */

/*.ic-plp-layout {*/
/*  display: flex;*/
/*  align-items: flex-start;*/
/*  gap: 36px;*/
/*  padding: 28px 0 72px;*/
/*}*/

.ic-plp-layout {	display: flex;	align-items: flex-start;
	gap: 36px;	padding: 28px 0 72px;	border-top: 1px solid rgb(239, 234, 224); }

	


/* ============================================================
   FILTER SIDEBAR
   ============================================================ */
.ic-plp-sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
}

.ic-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 16px;
  border-bottom: 1px solid #EAE2D4;
  margin-bottom: 0;
}

.ic-filter-header__title {
  font-family: var(--font-accent);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #1C1A17;
}

.ic-filter-header__clear {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9A8E7C;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.ic-filter-header__clear:hover {
  color: var(--ic-primary);
}

/* Mobile toggle button */
.ic-filter-mobile-btn {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ic-ink);
  background: var(--ic-white);
  border: 1px solid var(--ic-border);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  margin-bottom: 16px;
}

/* Hidden utility */
.is-hidden {
  display: none !important;
}

/* Sidebar filter skeleton lines */
.ic-skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0e8df 25%, #e8ddd4 50%, #f0e8df 75%);
  background-size: 200% 100%;
  animation: ic-shimmer 1.5s infinite;
}

.ic-skeleton-line--filter-cat  { width: 60%; }
.ic-skeleton-line--filter-attr { width: 55%; margin-bottom: 8px; }

/* Filter group (collapsible) */
.ic-filter-group {
  border-bottom: 1px solid #EFE9DD;
  padding: 0;
  transition: border-color 0.2s;
}

.ic-filter-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 13px 2px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2C281F;
  text-align: left;
}

.ic-filter-group__toggle .ic-filter-icon {
  font-size: 1rem;
  transition: transform 0.2s ease;
  color: #B3A998;
  flex-shrink: 0;
}

.ic-filter-group__toggle[aria-expanded="true"] .ic-filter-icon {
  transform: rotate(180deg);
  color: #B3A998;
}

.ic-filter-group__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}

.ic-filter-group__body.is-open {
  max-height: 360px;
  padding: 2px 2px 16px;
  overflow-y: auto;
}

/* Colour group: two-column swatch grid */
.ic-filter-group__body--color.is-open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 12px;
}
.ic-filter-group__body--color .ic-filter-check {
  padding: 0;
}

/* Scrollbar in filter body — thin */
.ic-filter-group__body::-webkit-scrollbar {
  width: 3px;
}

.ic-filter-group__body::-webkit-scrollbar-track {
  background: transparent;
}

.ic-filter-group__body::-webkit-scrollbar-thumb {
  background: var(--ic-border);
  border-radius: 2px;
}

/* Checkbox filters */
.ic-filter-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  cursor: pointer;
  min-width: 0;
}

/* Custom square checkbox (matches reference) */
.ic-filter-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.4px solid #CFC2AC;
  background: var(--ic-white);
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
}
.ic-filter-check input[type="checkbox"]:checked {
  background-color: var(--ic-primary);
  border-color: var(--ic-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Colour swatch circle */
.ic-filter-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  flex: none;
}

.ic-filter-check__label {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ic-ink);
  cursor: pointer;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-filter-check:hover .ic-filter-check__label {
  color: var(--ic-primary);
}

/* Per-value product count */
.ic-filter-count {
  font-size: 11px;
  color: #C2B8A6;
  flex: none;
}

/* Price slider */
.ic-price-slider-wrap {
  padding-top: 12px;
}

.ic-price-range-display {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ic-muted);
  margin-bottom: 16px;
}

.ic-price-range-display strong {
  color: var(--ic-ink);
  font-weight: 600;
}

/* noUiSlider overrides */
.noUi-target {
  background: var(--ic-border);
  border: none;
  box-shadow: none;
  border-radius: 4px;
  height: 4px;
}

.noUi-connect {
  background: var(--ic-primary);
}

.noUi-horizontal .noUi-handle {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: var(--ic-white) !important;
  border: 2px solid var(--ic-primary) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
  top: -7px !important;
  right: -9px !important;
  cursor: pointer;
}

.noUi-handle::before,
.noUi-handle::after {
  display: none !important;
}

/* ============================================================
   PRODUCT MAIN AREA
   ============================================================ */
.ic-plp-main {
  flex: 1;
  min-width: 0;
}

/* Sort bar */
.ic-plp-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ic-border);
}

.ic-plp-sort-bar__count {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ic-muted);
}

.ic-plp-sort-bar__count strong {
  color: var(--ic-ink);
  font-weight: 600;
}

/* Hide the dash placeholder until count loads */
.ic-plp-count:empty::before {
  content: '—';
  opacity: 0.3;
}

.ic-plp-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ic-muted);
}

.ic-plp-sort select {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ic-ink);
  background: var(--ic-white);
  border: 1px solid var(--ic-border);
  border-radius: 4px;
  padding: 6px 28px 6px 10px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B6B6B'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.ic-plp-sort select:focus {
  border-color: var(--ic-primary);
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.ic-plp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
}

/* ============================================================
   PRODUCT CARD
   v2 — white bg, contain image, cleaner hover, refined info
   ============================================================ */
.ic-plp-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ic-plp-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.09);
  transform: translateY(-3px);
}

.ic-plp-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image wrap — white background to match product photo backgrounds */
.ic-plp-card__img-wrap {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--ic-border);
  border-bottom: none;
  aspect-ratio: 3 / 4;
}

/* Use contain so full garment is always visible — no cropping */
.ic-plp-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
  transition: transform 0.4s ease;
}

.ic-plp-card:hover .ic-plp-card__img-wrap img {
  transform: scale(1.03);
}

/* Badge */
.ic-plp-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  z-index: 2;
  line-height: 1.6;
}

.ic-plp-card__badge--new       { background: var(--ic-primary); color: var(--ic-white); }
.ic-plp-card__badge--sale      { background: var(--ic-terra);   color: var(--ic-white); }
.ic-plp-card__badge--bestseller{ background: var(--ic-gold);    color: var(--ic-ink);   }

/* Wishlist — fixed top-right, always visible */
.ic-plp-card__wishlist-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.ic-plp-card__wishlist {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--ic-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ic-muted);
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
}

.ic-plp-card__wishlist:hover,
.ic-plp-card__wishlist.is-wished {
  color: var(--ic-primary);
  border-color: var(--ic-primary);
  background: var(--ic-white);
}

/* Add to Bag — slides up from bottom on hover */
.ic-plp-card__bag-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 10px 10px;
  transform: translateY(100%);
  transition: transform 0.28s ease;
  z-index: 3;
}

.ic-plp-card:hover .ic-plp-card__bag-wrap {
  transform: translateY(0);
}

.ic-plp-card__bag {
  width: 100%;
  background: var(--ic-primary);
  color: var(--ic-white);
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px 0;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.ic-plp-card__bag:hover {
  background: var(--ic-primary-dk);
}

/* Card info — bottom panel with cream bg to separate from white image */
.ic-plp-card__info {
  padding: 12px 10px 14px;
  background: var(--ic-bg);
  border: 1px solid var(--ic-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.ic-plp-card__name {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ic-ink);
  line-height: 1.4;
  margin: 0;
  /* 2-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ic-plp-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
}

.ic-plp-card__sp {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ic-ink);
}

.ic-plp-card__mrp {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ic-muted);
  text-decoration: line-through;
}

/* ============================================================
   SKELETON PLACEHOLDERS
   ============================================================ */
.ic-plp-skeleton {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
}

.ic-plp-skeleton__card {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ic-border);
}

.ic-plp-skeleton__img {
  aspect-ratio: 3 / 4;
  background: linear-gradient(90deg, #f0e8df 25%, #e8ddd4 50%, #f0e8df 75%);
  background-size: 200% 100%;
  animation: ic-shimmer 1.5s infinite;
}

.ic-plp-skeleton__info {
  padding: 12px 10px 14px;
  background: var(--ic-bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ic-plp-skeleton__line {
  height: 11px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0e8df 25%, #e8ddd4 50%, #f0e8df 75%);
  background-size: 200% 100%;
  animation: ic-shimmer 1.5s infinite;
}

.ic-plp-skeleton__line--short { width: 60%; }
.ic-plp-skeleton__line--price { width: 40%; height: 14px; margin-top: 4px; }

@keyframes ic-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   EMPTY / NO PRODUCT STATE
   ============================================================ */
.ic-plp-empty {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}

.ic-plp-empty img {
  max-width: 160px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.ic-plp-empty__msg {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ic-muted);
  line-height: 1.5;
}

/* ============================================================
   PAGE-FETCH LOADER
   ============================================================ */
.ic-plp-loader {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 0;
  display: none;
}

.ic-plp-loader.is-active {
  display: block;
}

.ic-plp-loader__spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--ic-border);
  border-top-color: var(--ic-primary);
  border-radius: 50%;
  animation: ic-spin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes ic-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ic-plp-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 28px 0 8px;
}

.ic-plp-pagination:empty {
  display: none;
}

.ic-plp-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--ic-ink);
  background: var(--ic-white);
  border: 1px solid var(--ic-border);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

a.ic-plp-page:hover {
  border-color: var(--ic-primary);
  color: var(--ic-primary);
}

.ic-plp-page.is-active {
  background: var(--ic-primary);
  border-color: var(--ic-primary);
  color: var(--ic-white);
  cursor: default;
}

.ic-plp-page.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ic-plp-page--gap {
  border: none;
  background: transparent;
  min-width: 22px;
  padding: 0 4px;
  color: var(--ic-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .ic-plp-grid,
  .ic-plp-skeleton {
    grid-template-columns: repeat(2, 1fr);
  }

  .ic-plp-sidebar {
    width: 210px;
  }
}

@media (max-width: 768px) {
  .ic-plp-hero__title {
    font-size: 1.6rem;
  }

  .ic-plp-layout {
    flex-direction: column;
    gap: 0;
    padding-top: 16px;
  }

  .ic-plp-sidebar {
    width: 100%;
    position: static;
  }

  .ic-filter-mobile-btn {
    display: flex;
  }

  .ic-filter-panel {
    display: none;
  }

  .ic-filter-panel.is-open {
    display: block;
  }

  .ic-plp-grid,
  .ic-plp-skeleton {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
  }

  /* Bag button always visible on touch */
  .ic-plp-card__bag-wrap {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .ic-plp-hero__title {
    font-size: 1.3rem;
  }

  .ic-plp-grid,
  .ic-plp-skeleton {
    gap: 16px 10px;
  }
}
