/* Kmode shop pages (product page, product cards). Uses the tokens in styles.css. */

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 28px 0 20px; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

.pdp__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-bottom: var(--section); }

/* Gallery */
.pdp__gallery { position: sticky; top: 110px; }
.pdp__main { background: var(--stone); aspect-ratio: 1 / 1; overflow: hidden; }
.pdp__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp__thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 10px; }
.pdp__thumbs button { padding: 0; border: 1px solid transparent; background: var(--stone); aspect-ratio: 1 / 1; cursor: pointer; overflow: hidden; }
.pdp__thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.pdp__thumbs button:hover img { opacity: .8; }
.pdp__thumbs button[aria-current="true"] { border-color: var(--brand); }

/* Info column */
.pdp__info .eyebrow { margin-bottom: 8px; }
.pdp__title { font-size: clamp(26px, 3vw, 36px); font-weight: 500; line-height: 1.2; margin: 0 0 12px; color: var(--ink); }
.pdp__price { font-size: 20px; font-weight: 500; color: var(--brand); margin: 0 0 28px; }
.pdp__price s { color: var(--muted); font-weight: 400; font-size: 16px; margin-left: 8px; }

.opt { border: 0; padding: 0; margin: 0 0 22px; }
.opt legend { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; padding: 0; }
.opt__val { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.opt__list { display: flex; flex-wrap: wrap; gap: 10px; }

.swatch { width: 44px; height: 44px; border-radius: 50%; padding: 3px; border: 1px solid var(--line); background: var(--white); cursor: pointer; overflow: hidden; transition: border-color .2s; }
.swatch img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; transform: scale(1.6); }
.swatch span { font-size: 10px; }
.swatch:hover { border-color: var(--accent); }
.swatch[aria-pressed="true"] { border: 2px solid var(--brand); padding: 2px; }

.pill { min-width: 64px; padding: 10px 16px; font: inherit; font-size: 14px; color: var(--text); background: var(--white); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, background .2s; }
.pill:hover { border-color: var(--brand); }
.pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--white); }

.is-unavailable { opacity: .45; position: relative; }
.pill.is-unavailable { text-decoration: line-through; }

.pdp__stock { font-size: 14px; margin: 4px 0 18px; display: flex; align-items: center; gap: 8px; }
.pdp__stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pdp__stock.is-in { color: #4f7a4b; }
.pdp__stock.is-order { color: var(--accent); }
.pdp__stock.is-out { color: #a8423b; }
.pdp__stock:empty { display: none; }

.pdp__buy { display: flex; gap: 12px; margin-bottom: 26px; }
.qty { display: flex; border: 1px solid var(--line); }
.qty button { width: 40px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty button:hover { color: var(--brand); }
.qty input { width: 44px; border: 0; text-align: center; font: inherit; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp__add { flex: 1; justify-content: center; }
.pdp__add:disabled { opacity: .5; cursor: not-allowed; }

.pdp__perks { list-style: none; padding: 0; margin: 0 0 28px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.pdp__perks li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); position: relative; }
.pdp__perks li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-50%); }
.pdp__perks a { color: var(--brand); }

.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; padding: 16px 0; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); display: flex; justify-content: space-between; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 18px; font-weight: 300; line-height: 1; }
.accordion details[open] summary::after { content: "−"; }
.rte { font-size: 14.5px; color: var(--text); padding-bottom: 18px; }
.rte p { margin: 0 0 12px; }
.rte ul { padding-left: 18px; margin: 0 0 12px; }
.rte a { color: var(--brand); }

/* Related products and product cards (reused on category pages later) */
.pdp__related { background: var(--stone); }
.pdp__related-title { font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; margin: 0 0 28px; color: var(--ink); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.product-card { text-decoration: none; color: inherit; display: block; }
.product-card__img { aspect-ratio: 1 / 1; background: var(--white); overflow: hidden; margin-bottom: 12px; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__vendor { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.product-card__title { font-size: 15px; font-weight: 400; margin: 0 0 4px; color: var(--ink); line-height: 1.4; }
.product-card:hover .product-card__title { color: var(--brand); }
.product-card__price { font-size: 14px; margin: 0; color: var(--text); }

.product-card__img { position: relative; }
.product-card__alt { position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; }
.product-card:hover .product-card__alt { opacity: 1; }
.product-card__badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--white); color: var(--ink); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; }
.product-card__badge.is-sale { background: var(--brand); color: var(--white); }
.product-card__price s { color: var(--muted); margin-left: 6px; }

/* Category page */
.plp__head { text-align: center; max-width: 720px; margin: 8px auto 36px; }
.plp__title { font-size: clamp(30px, 4vw, 44px); font-weight: 500; color: var(--ink); margin: 0 0 12px; }
.plp__intro { color: var(--muted); }
.plp__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plp__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fdrop { position: relative; }
.fdrop summary { list-style: none; cursor: pointer; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px; border: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.fdrop summary::-webkit-details-marker { display: none; }
.fdrop summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.fdrop[open] summary, .fdrop summary:hover { border-color: var(--brand); color: var(--brand); }
.fdrop__panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 230px; max-height: 320px; overflow: auto; background: var(--white); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.08); padding: 12px 14px; }
.fcheck { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.fcheck input { accent-color: var(--brand); width: 16px; height: 16px; }
.fcheck em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12px; }
.fdrop__price { display: grid; gap: 10px; min-width: 220px; }
.fdrop__price label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.fdrop__price input { width: 100%; padding: 8px; border: 1px solid var(--line); font: inherit; }
.plp__sort { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.plp__sort select { font: inherit; text-transform: none; letter-spacing: 0; padding: 8px 10px; border: 1px solid var(--line); background: var(--white); color: var(--text); }
.plp__active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 0 0; }
.plp__active:empty { padding: 0; }
.chip { font: inherit; font-size: 13px; padding: 6px 12px; background: var(--blush); border: 0; color: var(--ink); cursor: pointer; }
.chip:hover { background: #e6d6ce; }
.link-btn { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; }
.plp__grid { padding-top: 32px; row-gap: clamp(28px, 3vw, 44px); transition: opacity .2s; }
.plp.is-loading .plp__grid { opacity: .45; }
.plp__empty { text-align: center; padding: 48px 0; color: var(--muted); }
.plp__more { text-align: center; padding: 48px 0 var(--section); }

/* Shop menu bar (under the main header on shop pages) */
.shopbar { position: sticky; top: 86px; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
/* Three columns: empty | menu (centred) | search, so the menu sits in the middle of the page */
.shopbar__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 clamp(20px, 4vw, 64px); }
.shopbar__in .shopnav { grid-column: 2; }
.shopbar__in .shopsearch { grid-column: 3; justify-self: end; }
.shopnav__list { list-style: none; display: flex; gap: clamp(14px, 2vw, 30px); margin: 0; padding: 0; }
.shopnav__list > li > a { display: block; padding: 17px 0; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.shopnav__list > li > a:hover, .shopnav__list > li:hover > a, .shopnav__list > li > a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.has-menu > a::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; transform: rotate(45deg) translateY(-3px); }

.megamenu { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 18px 30px rgba(0,0,0,.07); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s; }
.has-menu:hover .megamenu, .has-menu:focus-within .megamenu { opacity: 1; visibility: visible; transform: none; }
.megamenu__in { display: grid; grid-template-columns: 220px 220px 1fr; gap: 40px; max-width: var(--wrap); margin: 0 auto; padding: 34px var(--gutter) 40px; }
.megamenu__col h4 { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.megamenu__col ul { list-style: none; margin: 0; padding: 0; }
.megamenu__col a, .megamenu__brands a { display: block; padding: 6px 0; font-size: 14.5px; color: var(--text); text-decoration: none; }
.megamenu__col a:hover, .megamenu__brands a:hover { color: var(--brand); }
.megamenu__all { font-weight: 500; color: var(--brand) !important; margin-top: 6px; }
.megamenu__feature { position: relative; display: block; max-width: 360px; margin-left: auto; aspect-ratio: 4 / 3; overflow: hidden; }
.megamenu__feature img { width: 100%; height: 100%; object-fit: cover; }
.megamenu__feature span { position: absolute; left: 16px; bottom: 14px; color: var(--white); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.megamenu--brands .megamenu__in { display: block; }
.megamenu__brands { list-style: none; margin: 0; padding: 0; columns: 5 170px; column-gap: 32px; }

/* Search */
.shopsearch { position: relative; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 6px 2px; width: min(260px, 100%); color: var(--muted); }
.shopsearch:focus-within { border-color: var(--brand); color: var(--brand); }
.shopsearch input { border: 0; outline: 0; font: inherit; font-size: 14px; width: 100%; background: transparent; color: var(--text); }
.shopsearch input::-webkit-search-cancel-button { cursor: pointer; }
.shopsearch__results { position: absolute; right: 0; top: calc(100% + 8px); width: min(420px, 92vw); background: var(--white); border: 1px solid var(--line); box-shadow: 0 18px 30px rgba(0,0,0,.1); z-index: 60; padding: 8px 0; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 8px 16px; text-decoration: none; color: var(--text); }
.sr-item:hover, .sr-item.is-active { background: var(--stone); }
.sr-item img { width: 48px; height: 48px; object-fit: cover; background: var(--stone); flex: none; }
.sr-item__t { font-size: 14px; line-height: 1.3; }
.sr-item__p { font-size: 12.5px; color: var(--muted); }
.sr-head { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding: 8px 16px 4px; }
.sr-cols a { display: inline-block; margin: 2px 6px 6px 16px; font-size: 13.5px; color: var(--brand); }
.sr-all { display: block; padding: 10px 16px 6px; font-size: 13px; font-weight: 500; color: var(--brand); border-top: 1px solid var(--line); margin-top: 6px; }
.sr-empty { padding: 12px 16px; font-size: 14px; color: var(--muted); }

@media (max-width: 1100px) {
  .shopbar { top: 56px; }
  .shopbar__in { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
  .shopnav { overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .shopnav::-webkit-scrollbar { display: none; }
  .shopnav__list { padding: 0 20px; gap: 20px; }
  .shopnav__list > li > a { padding: 13px 0; font-size: 11.5px; }
  .has-menu > a::after { display: none; }
  .megamenu { display: none; }
  .shopsearch { width: auto; margin: 8px 20px; border: 1px solid var(--line); padding: 8px 12px; }
  .shopsearch__results { left: 0; right: 0; width: auto; }
}

/* Shop home */
.shop-hero.hero--full { min-height: clamp(460px, 72vh, 760px); }
.shop-row { margin-top: 40px; row-gap: clamp(28px, 3vw, 44px); }
.shop-row:empty { min-height: 320px; background: linear-gradient(90deg, var(--stone), #fff, var(--stone)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.section--stone .product-card__img { background: var(--white); }
.cat-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.cat-links a { padding: 9px 16px; border: 1px solid var(--line); background: var(--white); font-size: 14px; color: var(--text); text-decoration: none; transition: border-color .2s, color .2s; }
.cat-links a:hover { border-color: var(--brand); color: var(--brand); }
.brand-list { list-style: none; padding: 0; margin: 36px 0 0; columns: 4 200px; column-gap: 32px; }
.brand-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.brand-list a { display: block; padding: 11px 0; font-size: 15px; color: var(--text); text-decoration: none; }
.brand-list a:hover { color: var(--brand); padding-left: 4px; transition: padding .2s; }

@media (max-width: 900px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .pdp__gallery { position: static; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pdp__thumbs { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .plp__bar { flex-direction: column; align-items: stretch; }
  .plp__sort { justify-content: space-between; }
  .fdrop { position: static; }
  .plp__filters { position: relative; }
  .fdrop__panel { left: 0; right: 0; min-width: 0; }
  .crumbs { padding-top: 18px; }
}

/* Shop home: the shop menu floats over a full-screen photo in white, then turns burgundy once you scroll past the photo */
.shop-home-page { --header-h: 87px; }
.shop-home-page .shopbar { margin-bottom: calc(-1 * var(--shopbar-h, 53px)); background: rgba(86, 51, 49, .55); border-bottom-color: transparent; transition: background-color .25s, border-color .25s; }
.shop-home-page .shopbar.is-solid { background: var(--brand); border-bottom-color: transparent; }
.shop-home-page .header { border-bottom-color: transparent; }
.shop-home-page .shopnav__list > li > a { color: var(--white); }
.shop-home-page .shopnav__list > li > a:hover, .shop-home-page .shopnav__list > li:hover > a, .shop-home-page .shopnav__list > li > a[aria-current="page"] { color: var(--white); border-bottom-color: var(--white); }
.shop-home-page .shopsearch { color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .55); }
.shop-home-page .shopsearch:focus-within { color: var(--white); border-color: var(--white); }
.shop-home-page .shopsearch input { color: var(--white); }
.shop-home-page .shopsearch input::placeholder { color: rgba(255, 255, 255, .8); }
.shop-home-page .shop-hero.hero--full { min-height: max(520px, calc(100vh - var(--header-h))); min-height: max(520px, calc(100svh - var(--header-h))); }
.shop-home-page .shop-hero .hero__copy { padding-top: calc(var(--shopbar-h, 53px) + 48px); }
@media (max-width: 1100px) {
  .shop-home-page { --header-h: 56px; }
  .shop-home-page .shopnav { border-bottom-color: transparent; }
}
/* Shop home hero text: sits a little higher and further left */
.shop-home-page .shop-hero .hero__inner { max-width: none; padding-left: clamp(20px, 4vw, 64px); padding-right: clamp(20px, 4vw, 64px); }
.shop-home-page .shop-hero .hero__copy { padding-bottom: 300px; margin-left: clamp(0px, 10vw, 190px); }
@media (max-width: 800px) { .shop-home-page .shop-hero .hero__copy { padding-bottom: 36px; margin-left: 0; } }
/* Shop home photo: fades lighter at the top so the shop menu (dark text) reads clearly; the left shade keeps the headline readable */
.shop-home-page .shop-hero .hero__shade { background:
  linear-gradient(180deg, rgba(247, 247, 245, .82) 0, rgba(247, 247, 245, .72) var(--shopbar-h, 53px), rgba(247, 247, 245, .18) calc(var(--shopbar-h, 53px) + 220px), rgba(247, 247, 245, .12) 100%),
  linear-gradient(90deg, rgba(58, 32, 31, .7) 0%, rgba(58, 32, 31, .5) 32%, rgba(58, 32, 31, .1) 62%, rgba(58, 32, 31, 0) 80%); }
.shop-home-page .shopbar:not(.is-solid) { background: transparent; }
.shop-home-page .shopbar:not(.is-solid) .shopnav__list > li > a { color: var(--brand); }
.shop-home-page .shopbar:not(.is-solid) .shopnav__list > li > a:hover, .shop-home-page .shopbar:not(.is-solid) .shopnav__list > li:hover > a { color: var(--brand); border-bottom-color: var(--brand); }
.shop-home-page .shopbar:not(.is-solid) .shopsearch { color: var(--brand); border-color: rgba(86, 51, 49, .45); }
.shop-home-page .shopbar:not(.is-solid) .shopsearch input { color: var(--text); }
.shop-home-page .shopbar:not(.is-solid) .shopsearch input::placeholder { color: rgba(86, 51, 49, .75); }
/* Shop home: menu headings a little bolder and larger so they stand out over the photo */
.shop-home-page .shopnav__list > li > a { font-size: 13px; font-weight: 600; letter-spacing: .11em; }
.shop-home-page .shopbar:not(.is-solid) .shopnav__list > li > a { color: var(--brand-dark, #44282a); }
@media (max-width: 1100px) { .shop-home-page .shopnav__list > li > a { font-size: 12px; } }

/* Shop pages keep the burgundy top header with the white logo and white menu */
.header { background: var(--brand); border-bottom-color: rgba(255, 255, 255, .07); }
.header .logo__on-light { display: none; }
.header .logo__on-dark { display: block; }
.header .nav a, .header .header__shop-mobile, .header .menu-toggle { color: var(--white); }
.header .nav a:hover { color: #e6cfc3; }
@media (max-width: 1100px) {
  .header .nav { background: var(--brand); border-bottom-color: rgba(255, 255, 255, .14); }
  .header .nav a { border-bottom-color: rgba(255, 255, 255, .16); }
}
.shop-home-page .header { border-bottom-color: transparent; }

/* Shop pages have a burgundy header, so the quote button turns white on hover */
@media (min-width: 1101px) { .header .nav a.nav__quote:hover { background: var(--white); border-color: var(--white); color: var(--brand); } }
@media (min-width: 1101px) {
  .header .nav a.nav__quote { border-color: rgba(255, 255, 255, .2); }
  .header .nav a.nav__quote:hover { border-color: var(--white); }
}
