/* m-card.css — DKY-style mobile layout, Impulse brand. Loaded after impulse-design-system.css.
   Owns: the product card (used site-wide) and the shop / collection listing
   pages (breadcrumb, collection chips, toolbar, grid, load more, filter sheet).
   Card styles apply at every width so the card reads the same everywhere;
   listing layout changes are phone-only (max-width: 768px). */

/* ==========================================================================
   Product card
   ========================================================================== */
.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  box-shadow: none;
}

/* Photo on a soft mat, rounded, no frame around the card itself. */
.product-card__image-wrap {
  position: relative;
  display: block;
  margin: 0 0 0.6rem;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--productMat);
  isolation: isolate;
}
/* Cover, not contain: product shots are a hair wider than the card's aspect,
   and contain left thin mat bands above and below every photo. */
.product-card__image {
  border-radius: 0;
  background-color: var(--productMat);
  background-size: cover;
}
.product-card__image--placeholder { background: var(--productMat); }

/* Discount: small rounded pill, top left of the photo. */
.product-card .product-card__badge {
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brandOrange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}
/* Bestseller rides in the same corner style, on the right, quieter than the price cut. */
.product-card .product-card__ribbon {
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--brandNavy);
  box-shadow: none;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}
.product-card .product-card__shots {
  right: 8px;
  bottom: 8px;
  font-size: 0.75rem;
}

.product-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 0.2rem;
}

/* Name: one line, ellipsis. */
.product-card .product-card__title {
  display: block;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--brandInk);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: unset;
}
.product-card .product-card__title a {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}

.product-card .product-card__rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  color: var(--brandMuted);
  font-size: 0.8125rem;
  line-height: 1.3;
}
.product-card .product-card__rating .pdp-stars { font-size: 0.75rem; letter-spacing: 0.02em; }

/* Price row: price + struck MRP on the left, "+ Add" pill on the right. */
.product-card__buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: auto;
  min-height: 44px;
}
.product-card .product-card__price {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.35rem;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
}
.product-card .product-card__price strong {
  color: var(--brandInk);
  font-size: 0.9375rem;
  font-weight: 700;
}
.product-card .product-card__price s {
  margin: 0;
  color: var(--brandMuted);
  font-size: 0.8125rem;
  font-weight: 400;
}
.product-card .product-card__price .product-card__tax {
  flex-basis: 100%;
  color: var(--brandMuted);
  font-size: 0.75rem;
}

.product-card .product-card__add {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}
.product-card .product-card__add form { margin: 0; }

/* The pill looks ~32px tall but the control is 44px: the visible pill is a
   pseudo-element inset inside a taller transparent hit area. */
.product-card .product-card__add-btn {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0 0.8rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--brandNavy);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.product-card .product-card__add-btn::before {
  content: "";
  position: absolute;
  inset: 6px 0;
  z-index: -1;
  border: 1px solid var(--brandLine);
  border-radius: 999px;
  background: #fff;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.product-card .product-card__add-btn:hover::before {
  border-color: var(--brandNavy);
}
.product-card .product-card__add-btn:active::before {
  background: var(--brandSurface);
}
.product-card .product-card__add-btn:focus-visible {
  outline: none;
}
.product-card .product-card__add-btn:focus-visible::before {
  outline: 2px solid var(--brandOrange);
  outline-offset: 1px;
}

@media (min-width: 769px) {
  .product-card .product-card__title { font-size: 0.9375rem; }
  .product-card .product-card__price strong { font-size: 1rem; }
}

@media (max-width: 768px) {
  .product-card .product-card__price .product-card__tax { display: none; }
}

/* ==========================================================================
   Listing pages: shop + collections
   ========================================================================== */

/* Breadcrumb */
.shop-crumbs { padding-top: 0.75rem; }
.shop-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--brandInk);
  font-size: 0.8125rem;
}
.shop-crumbs li { display: inline-flex; align-items: center; }
.shop-crumbs li + li::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--brandMuted);
}
.shop-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--brandMuted);
  text-decoration: none;
}
.shop-crumbs a:hover { color: var(--brandInk); text-decoration: underline; }

/* Collection chips: one horizontally scrolling row of pills. */
.shop-filters a {
  border-color: var(--brandLine);
  background: #fff;
  color: var(--brandInk);
}
.shop-filters a.is-active {
  border-color: var(--brandNavy);
  background: var(--brandNavy);
  color: #fff;
}

/* Toolbar: Filter on the left, count + grid toggle on the right. */
.shop-toolbar { border-bottom: 0; background: #fff; }
.shop-toolbar__inner { gap: 0.5rem; min-height: 52px; }
.shop-toolbar .shop-toolbar__btn {
  gap: 0.45rem;
  min-height: 44px;
  margin-left: -0.5rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--brandInk);
  font-size: 0.9375rem;
  font-weight: 500;
}
.shop-toolbar__badge { background: var(--brandNavy); }
.shop-toolbar__count {
  margin: 0 0 0 auto;
  color: var(--brandMuted);
  font-size: 0.8125rem;
}
.shop-view { display: flex; align-items: center; gap: 0.25rem; }
.shop-view[hidden] { display: none; }
.shop-view__btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--brandMuted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shop-view__btn svg {
  box-sizing: content-box;
  padding: 6px;
  border-radius: 8px;
}
.shop-view__btn[aria-pressed="true"] { color: var(--brandNavy); }
.shop-view__btn[aria-pressed="true"] svg { background: var(--brandSurface); }
.shop-view__btn:focus-visible { outline: 2px solid var(--brandOrange); outline-offset: -2px; }
.shop-chip { background: var(--brandSurface); }

/* Load more */
.shop-more .shop-more__btn {
  min-width: 220px;
  min-height: 48px;
  border: 1px solid var(--brandNavy);
  border-radius: 999px;
  background: #fff;
  color: var(--brandNavy);
  font-weight: 600;
}
.shop-more__progress { font-size: 0.8125rem; }

/* The grid toggle only changes density on phones; desktop keeps four across. */
@media (min-width: 769px) {
  .shop-view, .shop-view:not([hidden]) { display: none; }
}

@media (max-width: 768px) {
  .shop-crumbs { padding-top: 0.5rem; }

  .shop-listing__head { padding-top: 0.25rem; padding-bottom: 0.5rem; }
  .shop-listing__head h1 {
    margin: 0 0 0.2rem;
    color: var(--brandInk);
    font-size: 1.25rem;
    line-height: 1.25;
  }
  .shop-listing__head p,
  .shop-listing__intro,
  .shop-listing__intro p {
    margin: 0;
    color: var(--brandMuted);
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .shop-filters {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0.25rem 0.75rem 0.5rem;
    overflow-x: auto;
    border-bottom: 0;
    scroll-padding-inline: 0.75rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .shop-filters::-webkit-scrollbar { display: none; }
  .shop-filters a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
  }
  .shop-filters a.is-active { font-weight: 600; }
  .shop-filters .shop-filters__aside {
    margin-left: 0;
    border-style: dashed;
    color: var(--brandMuted);
  }

  .shop-toolbar { position: static; }
  .shop-toolbar__chips { padding-bottom: 0.5rem; }
  .shop-chip { min-height: 36px; font-size: 0.8125rem; }
  .shop-chip--clear { min-height: 44px; }

  .shop-listing__body { padding-top: 0.25rem; padding-bottom: 1.5rem; }
  .shop-listing__grid,
  .shop-listing__grid[data-cols="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 0.625rem;
  }
  .shop-listing__grid[data-cols="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .shop-listing__grid[data-cols="1"] .product-card .product-card__title { font-size: 1rem; }
  .shop-listing__grid[data-cols="1"] .product-card .product-card__price strong { font-size: 1.0625rem; }
  .shop-listing__grid[data-cols="1"] .product-card .product-card__price s { font-size: 0.875rem; }
  .shop-listing__grid[data-cols="1"] .product-card .product-card__add-btn { padding: 0 1.1rem; font-size: 0.875rem; }

  .shop-more { padding: 1.5rem 0 0.5rem; }
  .shop-more .shop-more__btn { width: 100%; max-width: 360px; }

  /* Filter sheet: full-height panel, header with round close, sections with
     hairlines, size boxes four across, one big pill to apply. */
  .shop-sheet__scrim { background: rgb(26 26 46 / 40%); }
  .shop-sheet .shop-sheet__panel {
    inset: 0;
    max-height: none;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    animation: shop-sheet-in 220ms ease-out;
  }
  .shop-sheet .shop-sheet__head {
    padding: 1rem 1rem 0.75rem 1.25rem;
    border-bottom: 1px solid var(--brandLine);
  }
  .shop-sheet .shop-sheet__head h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brandInk);
    font-size: 1.5rem;
    font-weight: 500;
  }
  .shop-sheet__count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brandSurface);
    color: var(--brandInk);
    font-size: 0.8125rem;
    font-weight: 600;
  }
  .shop-sheet .shop-sheet__close {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 6px rgb(26 26 46 / 14%);
  }
  .shop-sheet .shop-sheet__body { flex: 1 1 auto; padding: 0 1.25rem 1rem; }
  .shop-sheet .shop-sheet__group { padding: 1.1rem 0 1.25rem; }
  .shop-sheet .shop-sheet__group legend {
    float: left;
    width: 100%;
    padding: 0 0 0.9rem;
    color: var(--brandInk);
    font-size: 0.9375rem;
    font-weight: 500;
  }
  .shop-sheet .shop-sheet__group legend + * { clear: both; }
  .shop-sheet .shop-sheet__sizes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.625rem; }
  .shop-sheet .shop-size-chip span {
    min-height: 44px;
    border: 1px solid var(--brandLine);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
  }
  .shop-sheet .shop-size-chip input:checked + span {
    border-color: var(--brandNavy);
    background: var(--brandNavy);
    color: #fff;
  }
  .shop-sheet .shop-sheet__guide { margin-top: 0.35rem; color: var(--brandNavy); font-size: 0.875rem; }
  .shop-sheet .shop-sort-option { gap: 0.75rem; min-height: 44px; color: var(--brandInk); font-size: 0.9375rem; }
  .shop-sheet .shop-sort-option input {
    width: 22px;
    height: 22px;
    accent-color: var(--brandNavy);
  }
  .shop-sheet .shop-sheet__foot {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top: 0;
    background: #fff;
    box-shadow: 0 -6px 16px rgb(26 26 46 / 6%);
  }
  .shop-sheet .shop-sheet__foot .btn { min-height: 52px; border-radius: 999px; font-size: 0.9375rem; }
  .shop-sheet .shop-sheet__foot .btn--tertiary { padding: 0 1rem; border: 0; background: none; color: var(--brandInk); text-decoration: underline; text-underline-offset: 3px; }
  .shop-sheet .shop-sheet__foot .btn--primary { background: var(--brandNavy); border-color: var(--brandNavy); color: #fff; }

  @keyframes shop-sheet-in {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: none; opacity: 1; }
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .shop-sheet .shop-sheet__panel { animation: none; }
}
