/*
Theme Name: Sara Campbell
Version: 1.0.4
Requires at least: 6.4
Requires PHP: 7.4
Description: Sara Campbell clothing storefront for WooCommerce.
*/
:root {
  --ink: #231b19;
  --paper: #fff;
  --cream: #f7f2ec;
  --border: #ddd3cb;
  --wine: #802c3c;
  --serif: "Baskerville", "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 var(--sans); }
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; text-underline-offset: .23em; }
a:hover { color: var(--wine); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.07; margin: 0 0 .55em; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3.25rem); }
input, button, select, textarea { font: inherit; max-width: 100%; color: inherit; }
input, select, textarea { min-height: 42px; border: 1px solid var(--border); padding: .45em .65em; background: #fff; }
button { cursor: pointer; }
.sara-skip { position: absolute; left: 1rem; z-index: 10000; transform: translateY(-130%); color: var(--ink); background: #fff; padding: .7rem; }
.sara-skip:focus { transform: translateY(0); }
.sara-frame { width: min(1480px, calc(100% - 2 * clamp(16px, 4.5vw, 80px))); margin-inline: auto; }
.sara-header { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid var(--border); }
.sara-announcement { text-align: center; background: var(--wine); color: white; padding: .47rem 1rem; font-size: .8rem; letter-spacing: .02em; }
.sara-header-bar { min-height: 86px; display: grid; grid-template-columns: max-content 1fr max-content; align-items: center; gap: clamp(16px, 3.5vw, 56px); }
.sara-logo { display: inline-flex; align-items: center; width: max-content; max-width: 100%; color: var(--ink); text-decoration: none; letter-spacing: .10em; font: 500 clamp(1.2rem, 2.4vw, 2rem)/1 var(--serif); }
.sara-logo img { width: clamp(125px, 15vw, 222px); max-height: 61px; object-fit: contain; object-position: left center; }
.sara-desktop-menu { display: flex; align-items: center; gap: clamp(10px, 3vw, 45px); }
.sara-desktop-menu summary, .sara-mobile-menu summary, .sara-header-actions summary { cursor: pointer; list-style: none; }
.sara-header summary::-webkit-details-marker { display: none; }
.sara-desktop-menu summary { display: flex; min-height: 44px; align-items: center; font-size: .84rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.sara-mega[open] summary { color: var(--wine); }
.sara-mega ul { position: absolute; top: 100%; inset-inline: 0; margin: 0; padding: 24px max(5vw, calc((100% - 1200px) / 2)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem 1rem; list-style: none; border-bottom: 1px solid var(--border); background: #fff; box-shadow: 0 14px 20px #22151017; }
.sara-mega a, .sara-mobile-menu a, .sara-footer a { text-decoration: none; }
.sara-mega a { display: block; padding: .65rem .1rem; }
.sara-mega a:hover, .sara-footer a:hover { text-decoration: underline; }
.sara-header-actions { display: flex; align-items: center; }
.sara-header-actions a, .sara-header-actions summary, .sara-mobile-menu > summary, .sara-socials a { display: grid; place-items: center; min-height: 44px; min-width: 44px; text-decoration: none; }
.sara-header svg, .sara-footer svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#sara-search form { position: absolute; top: 100%; right: 5%; width: min(440px, 90%); background: white; border: 1px solid var(--border); padding: 16px; box-shadow: 0 8px 16px #22151020; }
#sara-search label { display: block; margin-bottom: 5px; }
#sara-search form div { display: flex; }
#sara-search input[type="search"] { min-width: 0; flex: 1; }
#sara-search button { padding: .5rem .75rem; background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.sara-mobile-menu { display: none; }
.sara-hero, .sara-secondary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: stretch; background: var(--cream); }
.sara-hero:not(.sara-has-photo) { grid-template-columns: 1fr; min-height: clamp(270px, 35vw, 520px); }
.sara-hero picture, .sara-secondary picture, .sara-story picture { display: block; min-width: 0; }
.sara-hero img, .sara-secondary img, .sara-story img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sara-hero picture { max-height: 700px; }
.sara-secondary { background: #ede6dc; }
.sara-secondary picture { order: 2; max-height: 530px; }
.sara-hero-panel, .sara-secondary > div, .sara-story > div { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(25px, 5vw, 78px); }
.sara-hero:not(.sara-has-photo) .sara-hero-panel { align-items: center; text-align: center; }
.sara-button, .woocommerce a.button, .woocommerce input.button, .woocommerce button.button { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; justify-content: center; padding: .7rem 1.15rem; color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: 0; text-decoration: none; font-size: .84rem; letter-spacing: .05em; text-transform: uppercase; white-space: normal; }
.sara-button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { color: var(--ink); background: #fff; }
.sara-home-collection, .sara-category-section, .sara-home-content { margin-block: clamp(40px, 7vw, 110px); }
.sara-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.sara-section-title a { white-space: nowrap; }
.sara-slider-actions { display: flex; align-items: center; gap: .4rem; }
.sara-slider-actions button { background: #fff; border: 1px solid var(--border); width: 44px; height: 44px; font-size: 1.35rem; }
.sara-slider-actions button:disabled { opacity: .4; cursor: default; }
.sara-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 26px); }
.sara-category-grid a { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; gap: .5rem; }
.sara-category-grid img, .woocommerce ul.products li.product a img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: contain; background: var(--cream); }
.sara-category-grid span { font: 1.45rem/1.15 var(--serif); }
.sara-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-block: clamp(40px, 7vw, 110px); background: var(--cream); }
.sara-story picture { max-height: 620px; }
.sara-story-text { grid-template-columns: minmax(0, 1fr); }
.sara-newsletter { margin-block: 3rem; text-align: center; }
.sara-page { padding-block: clamp(36px, 5vw, 86px); min-height: 42vh; }
.sara-page > article.page:not(.woocommerce-page):not(.type-product) { max-width: 100%; }
.sara-page > article > p { max-width: 75ch; }
.sara-footer { background: var(--cream); border-top: 1px solid var(--border); margin-top: 2rem; padding-top: clamp(30px, 4vw, 70px); }
.sara-footer-columns { display: grid; grid-template-columns: 1.2fr repeat(2, minmax(0, 1fr)); gap: clamp(18px, 4vw, 60px); }
.sara-footer section > a, .sara-footer nav > a { display: block; width: fit-content; padding: .28rem 0; overflow-wrap: anywhere; }
.sara-footer h2 { font-size: 1.3rem; }
.sara-socials { display: flex; margin-left: -10px; }
.sara-footer address { margin: .75rem 0 .35rem; font-style: normal; }
.sara-subfooter { border-top: 1px solid var(--border); padding-block: 1.25rem; margin-top: 1.8rem; font-size: .85rem; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(14px, 2.7vw, 36px) clamp(10px, 2vw, 26px); }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products[class*="columns-"] li.product { display: flex; flex-direction: column; float: none; margin: 0; width: auto; min-width: 0; }
.woocommerce ul.products li.product a { display: block; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font: 400 clamp(1.08rem, 1.6vw, 1.55rem)/1.15 var(--serif); }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--wine); }
.woocommerce ul.products li.product .button { margin-top: auto; display: inline-flex; }
.sara-home-collection .woocommerce ul.products { --sara-grid-gap: clamp(10px, 2vw, 26px); grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--sara-grid-gap)) / 4); gap: var(--sara-grid-gap); overflow-x: auto; padding: 3px 0 9px; scroll-snap-type: x mandatory; }
.sara-home-collection .woocommerce ul.products li.product { scroll-snap-align: start; }
.woocommerce span.onsale { background-color: var(--wine); border-radius: 0; margin: 0 !important; padding: .35rem .55rem; line-height: 1.1; min-height: 0; min-width: 0; z-index: 2; }
.woocommerce div.product form.cart .variations td, .woocommerce div.product form.cart .variations th { padding: .35rem; }
.woocommerce div.product form.cart .variations select { width: auto; max-width: 100%; }
.woocommerce div.product .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; padding-left: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: 0; margin: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.wc-block-cart, .wc-block-checkout { min-width: 0; }
@media (max-width: 840px) {
  .sara-header-bar { min-height: 62px; grid-template-columns: 1fr auto 1fr; gap: 6px; }
  .sara-header-actions { justify-self: end; }
  .sara-header .sara-logo img { width: clamp(100px, 25vw, 170px); }
  .sara-mobile-menu { display: block; justify-self: start; }
  .sara-mobile-menu > summary { font-size: 1.25rem; }
  .sara-mobile-menu nav { position: absolute; background: #fff; inset-inline: 0; top: 100%; max-height: 75vh; overflow: auto; border-bottom: 1px solid var(--border); box-shadow: 0 12px 18px #2215101c; padding: .4rem 1.15rem 1rem; }
  .sara-mobile-menu nav details { border-bottom: 1px solid var(--border); }
  .sara-mobile-menu nav summary, .sara-mobile-menu a { display: flex; align-items: center; min-height: 44px; }
  .sara-mobile-menu a { padding-left: 1rem; }
  .sara-desktop-menu { display: none; }
  .sara-footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .sara-header-actions a, .sara-header-actions summary { min-width: 36px; }
  .sara-hero, .sara-secondary, .sara-story { grid-template-columns: minmax(0, 1fr); }
  .sara-secondary picture { order: initial; }
  .sara-hero picture { max-height: none; }
  .sara-hero-panel, .sara-secondary > div, .sara-story > div { padding: 1.6rem 1.4rem; }
  .sara-category-grid, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sara-home-collection .woocommerce ul.products { grid-auto-columns: calc((100% - var(--sara-grid-gap)) / 2); }
  .sara-slider-actions button { width: 37px; }
  .woocommerce .woocommerce-ordering, .woocommerce .woocommerce-result-count { float: none; }
  .woocommerce table.shop_table_responsive tr td::before { margin-right: .7rem; }
  .woocommerce table.shop_table .coupon, .woocommerce table.shop_table .coupon .input-text { max-width: 100%; }
  .sara-header-actions svg { width: 18px; height: 18px; }
}

.sara-reference-content { max-width: 82ch; }
.sara-reference-content h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-top: 1.25em; }
.sara-reference-content img { display: block; max-width: 100%; height: auto; max-height: 660px; object-fit: contain; margin-block: 1rem; }
.sara-reference-section { margin-block: 1.5rem; }
.sara-reference-faq details { border-top: 1px solid var(--border); padding: .65rem 0; }
.sara-reference-faq summary { cursor: pointer; font-weight: 600; padding: .55rem 0; }
.sara-store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.1rem; }
.sara-store-card { border: 1px solid var(--border); padding: 1rem; }
.sara-store-card h2 { font-size: 1.5rem; margin-top: 0; }
.sara-reference-form input:not([type="hidden"]), .sara-reference-form textarea { width: min(100%, 32rem); padding: .6rem; border: 1px solid var(--border); }

/* Storefront campaign and centered masthead */
.sara-header { position: sticky; top: 0; }
.admin-bar .sara-header { top: var(--wp-admin--admin-bar--height, 32px); }
.sara-announcement { background: #f5efe7; color: var(--ink); }
@media (min-width: 841px) {
  .sara-header-bar { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); min-height: 76px; gap: clamp(8px, 1.6vw, 32px); }
  .sara-header-bar > .sara-logo { grid-column: 2; grid-row: 1; justify-self: center; }
  .sara-desktop-menu { grid-column: 1; grid-row: 1; gap: clamp(9px, 1.6vw, 28px); }
  .sara-header-actions { grid-column: 3; grid-row: 1; justify-self: end; }
  .sara-desktop-menu summary { font-size: clamp(.73rem, 1.1vw, .94rem); text-transform: none; font-weight: 500; letter-spacing: 0; }
  .sara-header .sara-logo img { width: clamp(150px, 17vw, 234px); }
}
.sara-holiday-hero { position: relative; isolation: isolate; background: #eeeae3; }
.sara-holiday-hero picture, .sara-holiday-hero picture img { display: block; width: 100%; }
.sara-holiday-hero picture img { height: auto; }
.sara-holiday-hero::after { content: ""; position: absolute; inset: 0; background: #0004; pointer-events: none; }
.sara-holiday-copy {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 1rem; text-align: center; color: #fff;
}
.sara-holiday-copy h1 { margin: 0; font-size: clamp(2.25rem, 5.4vw, 5rem); font-weight: 400; text-wrap: balance; }
.sara-holiday-copy p { margin: .85rem 0 1.55rem; font-size: clamp(.8rem, 1.65vw, 1.3rem); text-transform: uppercase; letter-spacing: .045em; }
.sara-holiday-copy .sara-button { min-width: min(13.75rem, 85%); min-height: clamp(44px, 4vw, 62px); background: #fff; border-color: #fff; color: #171717; letter-spacing: .13em; }
.sara-holiday-copy .sara-button:hover { color: #fff; background: #171717; border-color: #171717; }
.sara-editorial-home .sara-home-collection, .sara-home-group { margin-block: clamp(36px, 5vw, 78px); }
.sara-editorial-home .sara-section-title { flex-wrap: wrap; }
.sara-editorial-home .sara-section-title h2, .sara-home-group h2 { font-size: clamp(1.7rem, 3vw, 2.8rem); }
.sara-editorial-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.7vw, 24px); }
.sara-editorial-grid a { min-width: 0; text-decoration: none; text-align: center; }
.sara-editorial-grid a:hover span { text-decoration: underline; }
.sara-editorial-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #f6f3ee; }
.sara-editorial-grid span { display: block; font: 1.2rem/1.25 var(--serif); padding: .8rem .3rem .3rem; }
.sara-editorial-feature { align-items: center; background: #f7f4f0; }
.sara-editorial-feature img { display: block; width: 100%; height: auto; }
.sara-feature-store { background: white; }
.sara-kicker { margin-bottom: .8rem; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.sara-editorial-note { max-width: 68ch; text-align: center; padding-block: 2rem; }
.sara-editorial-note h2 { font-size: 1.5rem; }
.sara-home-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 3.5rem); text-align: center; padding-block: clamp(2rem, 4vw, 3.5rem); }
.sara-service-icon { display: block; margin: 0 auto 1rem; }
.sara-home-services h2 { font: 500 clamp(.9rem, 1.5vw, 1.05rem)/1.3 var(--sans); text-transform: uppercase; letter-spacing: .11em; }
.sara-home-services p { margin: .35rem auto 0; overflow-wrap: anywhere; color: #454545; max-width: 48ch; }
.sara-home-services p a { color: inherit; }
.sara-service-action { display: inline-block; margin-top: .4rem; }
@media (max-width: 680px) {
  .sara-editorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sara-editorial-feature, .sara-home-services { grid-template-columns: minmax(0, 1fr); }
  .sara-feature-store img { grid-row: 1; }
  .sara-holiday-copy { justify-content: flex-end; padding-bottom: clamp(1.5rem, 8vw, 4rem); }
  .sara-holiday-hero::after { background: linear-gradient(transparent 35%, #0009); }
  .sara-holiday-copy p { margin: .6rem 0 1rem; }
  .sara-home-services { gap: 2rem; }
}
.sara-mega-promos { max-height: calc(100dvh - 125px); overflow-y: auto; }
.sara-mega-promos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; display: block; margin-bottom: .55rem; background: #f7f4f0; }
.sara-mega-promos a { text-align: center; }
.sara-mega-promos .sara-mega-text-link { grid-column: 1 / -1; grid-row: 2; }
.sara-instagram { padding: clamp(2rem, 4.5vw, 5rem) clamp(.75rem, 1.1vw, 1.75rem); }
.sara-instagram h2 { text-align: center; margin-bottom: clamp(1.25rem, 3vw, 2.75rem); }
.sara-instagram-carousel { position: relative; }
.sara-instagram-posts {
  --sara-instagram-columns: 7;
  --sara-instagram-gap: clamp(.42rem, .7vw, .8rem);
  display: grid; grid-auto-flow: column; gap: var(--sara-instagram-gap);
  grid-auto-columns: calc((100% - (var(--sara-instagram-columns) - 1) * var(--sara-instagram-gap)) / var(--sara-instagram-columns));
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; list-style: none; margin: 0; padding: 0;
}
.sara-instagram-posts li { min-width: 0; scroll-snap-align: start; }
.sara-instagram-posts a { display: block; }
.sara-instagram-posts a:focus-visible { outline-offset: -3px; }
.sara-instagram-posts img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #f5f2ed; }
.sara-instagram-arrow { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; color: #383838; background: #fffe; font-size: 2rem; line-height: 1; }
.sara-instagram-arrow:disabled { opacity: .58; cursor: default; }
.sara-instagram-arrow[data-sara-instagram-step="-1"] { left: .65rem; }
.sara-instagram-arrow[data-sara-instagram-step="1"] { right: .65rem; }
@media (max-width: 1199px) { .sara-instagram-posts { --sara-instagram-columns: 5; } }
@media (max-width: 840px) { .sara-instagram-posts { --sara-instagram-columns: 3; } }
@media (max-width: 520px) { .sara-instagram-posts { --sara-instagram-columns: 2; } }
