/* ============ Products hero ============ */
.p-hero {
  position: relative;
  height: 430px;
  background: #9b9b9b;
  overflow: hidden;
}

.p-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.p-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.p-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  color: #fff;
  padding-top: 18px;
  padding-bottom: 18px;
}

.p-hero__kicker {
  font-size: 12px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  font-weight: 800;
  opacity: .9;
}

.p-hero__title {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: .2px;
}

.p-hero__desc {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.8;
  opacity: .92;
}

/* ============ Filters ============ */
.filters {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 16px 12px;
  box-shadow: var(--shadow);
}

.filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.filters__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.filters__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}

.filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.filters__meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* ============ Products grid & cards ============ */
.products {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.pcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.pcard__media {
  position: relative;
  background: var(--soft);
}

.pcard__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(100%);
}

.pcard__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, .80);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 800;
}

.pcard__wish {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.pcard__wish.is-wished {
  background: #0b0b0b;
  border-color: #0b0b0b;
  color: #fff;
}

.pcard__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pcard__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.pcard__desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  min-height: 34px;
  line-height: 1.6;
}

.pcard__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.pcard__price {
  font-weight: 800;
}

.pcard__color {
  color: var(--muted);
  font-weight: 700;
}

.pcard__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.size-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 7px;
  font-weight: 700;
}

.size-chip.is-off {
  color: var(--muted);
  background: var(--soft);
}

.pcard__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
}

.view-btn,
.rent-btn {
  border-radius: 999px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============ Responsive ============ */
@media (max-width: 1000px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .p-hero {
    height: 380px;
  }

  .p-hero__title {
    font-size: 34px;
  }
}

@media (max-width: 760px) {
  .products {
    grid-template-columns: 1fr;
  }

  .p-hero {
    height: 340px;
  }

  .p-hero__title {
    font-size: 30px;
  }

  .p-hero__desc {
    font-size: 13.5px;
  }
}

/* assets/css/products.css */

/* hero slider */
.heroSlider {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.heroSlider__track {
  display: flex;
  width: 100%;
  transform: translateX(0%);
  transition: transform 420ms ease;
}

.heroSlide {
  min-width: 100%;
  height: clamp(220px, 42vw, 520px);
  background: rgba(255, 255, 255, .04);
  display: grid;
  place-items: center;
}

.heroSlider__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.heroSlider__ph {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, .06);
}

.heroSlider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.heroSlider__btn--prev {
  left: 12px;
}

.heroSlider__btn--next {
  right: 12px;
}

.heroSlider__dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.heroDot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
}

.heroDot.is-active {
  background: rgba(255, 255, 255, .85);
}

.filters {
  background: var(--card, #fff);
  border: 1px solid var(--line, rgba(0, 0, 0, .08));
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .05);
  margin-bottom: 18px;
}

.filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.filters__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.filters__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(0, 0, 0, .10));
  background: rgba(0, 0, 0, .02);
  font-size: 14px;
  line-height: 1;
}

/* ✅ key: grid that wraps nicely (not 1 under the other) */
.filters__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}

/* With Mode filter (7 items) => it will wrap elegantly */
@media (max-width: 1100px) {
  .filters__grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 720px) {
  .filters__grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 420px) {
  .filters__grid {
    grid-template-columns: 1fr;
  }
}

.filters .field label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted, #6b6b6b);
  font-weight: 700;
  letter-spacing: .2px;
}

.filters .select {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(0, 0, 0, .12));
  background: #fff;
  padding: 0 12px;
  outline: none;
}

.filters .field.is-disabled {
  opacity: .55;
  pointer-events: none;
}

/* ✅ Sale badge on cards */
.pcard__media {
  position: relative;
}

.pcard__sale {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(212, 175, 55, .35);
  background: rgba(212, 175, 55, .18);
  color: #6a5200;
  backdrop-filter: blur(6px);
}

/* ✅ Better action buttons */
.pcard__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.pcard__footer .btn {
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

/* Notice modal */
dialog.noticeModal {
  border: 0;
  padding: 0;
  width: min(520px, calc(100% - 24px));
  border-radius: 16px;
  background: transparent;
}

dialog.noticeModal::backdrop {
  background: rgba(0, 0, 0, .55);
}

.noticeModal__panel {
  background: var(--card, #fff);
  border: 1px solid var(--line, rgba(0, 0, 0, .08));
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.noticeModal__title {
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 6px;
}

.noticeModal__text {
  margin: 0 0 14px;
  color: var(--muted, #666);
  line-height: 1.45;
}

.noticeModal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* =========================================================
   MOBILE: full-bleed product cards (no side whitespace)
   Paste at END of products.css
========================================================= */
@media (max-width: 760px) {
  /* 1) Make the grid edge-to-edge (override .container padding effect) */
  #productsGrid {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    gap: 0 !important;
    grid-template-columns: 1fr !important;
  }

  /* 2) Cards should be full width, no rounded corners on the sides */
  #productsGrid .pcard {
    border-radius: 0 !important;
    border-left: 0;
    border-right: 0;
  }

  /* 3) Make the image area take the main space of the card */
  #productsGrid .pcard__media {
    height: min(72vh, 620px); /* big image on mobile without being insane */
    background: var(--soft);
  }

  /* 4) Force the image to fill that area */
  #productsGrid .pcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto !important; /* overrides your 4/5 ratio */
  }

  /* Optional: nicer padding for the text area */
  #productsGrid .pcard__body {
    padding: 14px 16px 18px;
  }
}
