/* 2026-09-06 — responsive polish + homepage category carousel */

/* Homepage category carousel */
.catalog .section-head {
  margin-bottom: 34px;
}
.category-directory {
  display: block;
  border: 0;
  position: relative;
}
.category-slider-shell {
  position: relative;
}
.category-slider-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}
.category-slider-viewport::-webkit-scrollbar { display: none; }
.category-slider-track {
  --category-gap: 14px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--category-gap) * 4)) / 5);
  gap: var(--category-gap);
}
.category-slide {
  min-width: 0;
  scroll-snap-align: start;
  display: block;
  color: var(--ink);
}
.category-slide-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f7f5f1;
}
.category-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 650ms cubic-bezier(.22,.65,.25,1), filter 320ms ease;
}
.category-slide:hover .category-slide-media img,
.category-slide:focus-visible .category-slide-media img {
  transform: scale(1.025);
  filter: brightness(.985);
}
.category-slide-copy {
  min-height: 74px;
  padding: 17px 2px 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.category-slide-copy strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.15;
}
.category-slide-copy span {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 300;
  transition: transform 220ms ease;
}
.category-slide:hover .category-slide-copy span,
.category-slide:focus-visible .category-slide-copy span { transform: translateX(4px); }
.category-slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-bottom: 15px;
}
.category-slider-button {
  width: 38px;
  height: 38px;
  border: 1px solid #dedad5;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, opacity 180ms ease;
}
.category-slider-button:hover:not(:disabled),
.category-slider-button:focus-visible:not(:disabled) {
  border-color: var(--wine);
  color: var(--wine);
}
.category-slider-button:disabled { opacity: .28; cursor: default; }
.category-slider-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.category-slider-status {
  margin-top: 15px;
  color: #8e8680;
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* Cleaner client-facing catalog: remove internal prototype notes. */
.demo-note,
.category-demo { display: none !important; }

/* General responsive hardening */
img { max-width: 100%; }
.header,
main,
footer { min-width: 0; }
.desktop-nav { white-space: nowrap; }

/* PDP: keep all primary actions available on laptop-height viewports. */
@media (min-width: 901px) {
  .pdp-panel {
    top: 86px;
    max-height: calc(100vh - 86px);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
  }
  .pdp-panel::-webkit-scrollbar { width: 4px; }
  .pdp-panel::-webkit-scrollbar-thumb { background: #ddd; }
}

/* Large laptop / small desktop */
@media (max-width: 1280px) {
  .category-slider-track {
    grid-auto-columns: calc((100% - (var(--category-gap) * 3)) / 4);
  }
  .desktop-nav { gap: 22px; }
  .pdp-panel { padding-left: 36px; padding-right: 36px; }
}

@media (max-width: 1024px) {
  .section-pad { padding-left: 32px; padding-right: 32px; }
  .category-slider-track {
    grid-auto-columns: calc((100% - (var(--category-gap) * 2)) / 3);
  }
  .category-slide-copy { min-height: 68px; }
  .store-grid article { padding-right: 32px; }
}

/* Tablet */
@media (max-width: 900px) {
  .category-slider-track {
    --category-gap: 12px;
    grid-auto-columns: calc((100% - var(--category-gap)) / 2);
  }
  .category-slider-controls { margin-bottom: 12px; }
  .pdp-main { display: block; }
  .pdp-panel {
    position: relative;
    top: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #e4e0db;
  }
  .pdp-media { min-width: 0; }
}

/* Phone */
@media (max-width: 620px) {
  .section-pad { padding-left: 20px; padding-right: 20px; }
  .catalog .section-head { margin-bottom: 22px; }
  .category-slider-track {
    --category-gap: 10px;
    grid-auto-columns: min(72vw, 290px);
  }
  .category-slider-controls {
    justify-content: flex-start;
    margin-bottom: 12px;
  }
  .category-slider-button { width: 34px; height: 34px; }
  .category-slide-copy { min-height: 62px; padding-top: 13px; }
  .category-slide-copy strong { font-size: 21px; }
  .category-slider-status { margin-top: 10px; }

  .header-actions { gap: 0; }
  .icon-button { padding: 8px 6px; }
  .hero h1 { max-width: 330px; }
  .brand-story { overflow: hidden; }
  .story-copy { min-width: 0; }
  .store-grid article { padding-right: 0; }

  .catalog-page .catalog-heading h1 { font-size: 38px; }
  .catalog-page .category-tabs { padding-top: 10px; padding-bottom: 20px; }
  .catalog-quick-select { scrollbar-width: none; }
  .catalog-quick-select::-webkit-scrollbar { display: none; }
  .catalog-page .catalog-toolbar { gap: 8px 12px; }
  .toolbar-action { font-size: 9px; }
  .catalog-page .category-products .product-grid { gap: 26px 8px; }
  .catalog-page .product-info { min-height: 112px; }

  .pdp-panel { padding: 30px 20px 34px; }
  .pdp-panel h1 { font-size: 34px; }
  .metal-options { gap: 6px; }
  .metal-thumb { height: 74px; }
  .pdp-actions { gap: 8px; }
  .pdp-cta { min-height: 52px; }
  .recommendations { overflow: hidden; }

  .cart-layout { gap: 28px; }
  .cart-summary { margin-top: 0; }
  footer { overflow: hidden; }
}

@media (max-width: 390px) {
  .topline { letter-spacing: .09em; }
  .hero h1 { font-size: 39px; }
  .category-slider-track { grid-auto-columns: 78vw; }
  .catalog-page .catalog-heading h1 { font-size: 34px; }
  .toolbar-action span { font-size: 8px; }
  .pdp-panel h1 { font-size: 31px; }
  footer { grid-template-columns: 1fr; }
  .footer-brand,
  .newsletter { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .category-slider-viewport { scroll-behavior: auto; }
  .category-slide-media img,
  .category-slide-copy span { transition: none; }
}


/* 2026-09-11 — mobile drawer hierarchy + expandable jewelry categories */
@media (max-width: 980px) {
  .mobile-drawer {
    padding: 88px clamp(24px, 7vw, 42px) 36px;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #520b17;
    transition: transform 420ms cubic-bezier(.22,.72,.24,1);
  }

  .drawer-close {
    right: 22px;
    top: 20px;
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    font-family: var(--sans);
    font-size: 31px;
    font-weight: 200;
    line-height: 1;
    opacity: .9;
    cursor: pointer;
  }

  .drawer-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    width: 100%;
  }

  .mobile-drawer .drawer-main-link,
  .drawer-catalog-toggle {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff8f5;
    text-align: left;
    font-family: var(--serif);
    font-size: clamp(29px, 8vw, 36px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.015em;
  }

  .drawer-catalog-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
  }

  .drawer-catalog-toggle svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
    opacity: .72;
    transition: transform 280ms cubic-bezier(.22,.72,.24,1);
  }

  .drawer-catalog-group.is-expanded .drawer-catalog-toggle svg {
    transform: rotate(180deg);
  }

  .drawer-category-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0 0 0 16px;
    border-left: 1px solid rgba(255,255,255,.18);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: max-height 380ms cubic-bezier(.22,.72,.24,1), opacity 220ms ease, margin-top 280ms ease, padding-top 280ms ease;
  }

  .drawer-catalog-group.is-expanded .drawer-category-list {
    max-height: 520px;
    opacity: 1;
    margin-top: 17px;
    padding-top: 1px;
  }

  .mobile-drawer .drawer-category-link {
    padding: 7px 0;
    color: rgba(255,248,245,.82);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: .015em;
    transition: color 180ms ease, transform 180ms ease;
  }

  .mobile-drawer .drawer-category-link:active,
  .mobile-drawer .drawer-category-link:focus-visible {
    color: #fff;
    transform: translateX(3px);
  }

  .drawer-contacts {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.18);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .drawer-contact-label {
    margin-bottom: 2px;
    color: rgba(255,248,245,.48);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
  }

  .mobile-drawer .drawer-contact-link {
    color: rgba(255,248,245,.78);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: .01em;
  }
}

@media (max-width: 420px) {
  .mobile-drawer {
    padding-top: 82px;
    padding-bottom: 28px;
  }
  .drawer-nav { gap: 21px; }
  .mobile-drawer .drawer-main-link,
  .drawer-catalog-toggle { font-size: 30px; }
  .drawer-category-list { padding-left: 14px; }
  .mobile-drawer .drawer-category-link { font-size: 13.5px; padding: 6px 0; }
  .drawer-contacts { margin-top: 28px; padding-top: 19px; gap: 10px; }
  .mobile-drawer .drawer-contact-link { font-size: 14px; }
}
