/* ============================================================
   See Sea - Shopline integration layer
   Bridges the design CSS to Shopline's markup: custom elements,
   real product forms, server-rendered grids and the cart drawer.
   Loaded after seesea.css.
   ============================================================ */

/* ---------- custom elements need an explicit box ---------- */
theme-cart-bubble.cart-btn,
theme-cart-bubble.m34-top {
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
/* Each cart entry point is a real link to the cart page wrapping its own
   label, icon and count. The button keeps its padding, border and
   background; the link just fills it and inherits the type. */
.cart-bubble__link {
  display: flex;
  align-items: center;
  gap: inherit;
  justify-content: inherit;
  width: 100%;
  height: 100%;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-decoration: none;
}
/* No position here: seesea.css fixes .float-cart to the corner, and
   theme-cart-bubble.float-cart { position: relative } outranked it. */
theme-cart-bubble.float-cart {
  border: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
theme-cart-bubble.m34-top {
  width: 100%;
  text-align: left;
}

/* the design shows a literal 0 when the cart is empty */
.cart-btn .count:empty::before,
.float-cart .fc-count:empty::before,
.m34-top .menu-cart-count:empty::before {
  content: '0';
}

/* ---------- product card: Shopline wiring ---------- */
.card-media-link {
  position: absolute;
  inset: 0;
  /* above .card-media .alt (absolute, z-index auto), below the badges and
     the add-to-cart control at z-index 3 so those stay clickable */
  z-index: 2;
  display: block;
  text-indent: -9999px;
  overflow: hidden;
}
.card-info h3 a {
  text-decoration: none;
  color: inherit;
}
.card-info h3 a:hover {
  color: var(--ocean);
}

/* the add-to-cart control is wrapped by Shopline's form / modal elements;
   keep the button itself anchored to the media box exactly as designed.
   display:contents removes the wrapper from layout without creating a
   containing block, so .card-add still anchors to .card-media. <details>
   is left alone so it keeps its open/closed behaviour. */
.card-add-form,
.card-add-modal,
.card-add-form form {
  display: contents;
}
summary.card-add {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
summary.card-add::-webkit-details-marker,
summary.card-add::marker {
  display: none;
  content: '';
}
.card-add--soldout {
  pointer-events: none;
  opacity: 0.72;
}
.card-add .icon-loading,
.card-add.loading .icon-quick-add {
  display: none;
}
.card-add.loading .icon-loading {
  display: inline-block;
}

/* Quick-add modal shell. Shopline's own mask sits at --z-index-modal (1030),
   and the base rule puts the panel one above it; the old flat 320 here was
   below the mask, so the whole panel rendered under a 40% black veil. Stay
   above the mask - every piece of See Sea chrome is under 200. */
.card-add-modal .block-product-card__modal {
  z-index: calc(var(--z-index-modal, 1030) + 2);
}
/* The See Sea card reuses Shopline's quick-add modal but not
   blocks/product-list/card.css, which is where that modal's content gets its
   height cap. Without it the whole product page was injected at full height:
   the panel grew past 1500px and hung off the top and bottom of the screen
   with nothing to scroll. These are that stylesheet's geometry rules, scoped
   to our own modal. */
.card-add-modal .block-product-card__modal-content {
  width: min(80vw, 1200px);
  max-height: 80vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--pearl);
}
.card-add-modal .block-product-card__modal-content theme-product-detail {
  --page-padding: 40px;
  --detail-padding-inline-start: 0px !important;
  --detail-padding-inline-end: 0px !important;
  --detail-padding-block-start: 0px !important;
  --detail-padding-block-end: 0px !important;

  display: block;
  padding: var(--page-padding);
}
@media (max-width: 959px) {
  .card-add-modal .block-product-card__modal-content {
    width: 100%;
    max-height: 86svh;
  }
  .card-add-modal .block-product-card__modal-content theme-product-detail {
    --page-padding: 20px;
  }
}
.card-add-modal .block-product-card__modal-close {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 15px;
  z-index: 2;
  color: #fff;
  background: rgb(0 0 0 / 40%);
}

/* ---------- category filtering over a server-rendered grid ---------- */
.ss-grid .card[hidden] {
  display: none !important;
}
.grid-empty {
  display: none;
  padding: 40px 6px;
  font-family: 'Oswald', 'DIN Next', sans-serif;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(11, 31, 42, 0.6);
}
.ss-grid.is-empty + .grid-empty {
  display: block;
}

/* ---------- cart drawer, dressed as the See Sea cart ---------- */
.cart-drawer__body {
  background: var(--pearl);
  color: var(--ink);
}
.cart-drawer__header h2,
.cart-drawer .cart-drawer__header .title4 {
  font-family: 'Oswald', 'DIN Next', sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cart-drawer .button,
.cart-drawer button[name='checkout'],
.cart-drawer .cart-checkout__button {
  border-radius: 0;
  font-family: 'Oswald', 'DIN Next', sans-serif;
  font-weight: 500;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

/* richtext settings emit sibling paragraphs; keep the designed rhythm */
.pvd .reveal-l > p + p,
.warranty .wrap > p + p,
.about-copy > p + p {
  margin-top: 15px;
}

/* ---------- header/footer bridges ---------- */
.site .brand img,
.mobile-hero-logo img {
  max-width: none;
}

/* ---------- forms rendered by Shopline keep the design's shape ---------- */
.join-form input,
.contact-form input,
.contact-form textarea {
  border-radius: 0;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .card,
  .reveal,
  .reveal-l,
  .reveal-r {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   Form-helper fallbacks
   Shopline's {{#customer_form}} / {{#contact_form}} helpers render the
   <form> element themselves. If a build does not forward the `class`
   argument, these structural selectors keep the designed layout.
   ============================================================ */
.join .wrap form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
/* The status line is a sibling of the input inside the form, so it has to
   claim its own row rather than sit in the email/button track. */
.join .wrap form .join-msg {
  flex: 0 0 100%;
  margin-top: 0;
}
.join .wrap form input[type='email'] {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  padding: 14px 20px;
  color: #fff;
  font: inherit;
  font-size: 16px;
  transition: border-color 0.3s, background 0.3s;
}
.join .wrap form input[type='email']::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.join .wrap form input[type='email']:focus {
  outline: none;
  border-color: var(--gold-2);
  background: rgba(255, 255, 255, 0.1);
}
.join .wrap form.err input[type='email'] {
  border-color: #ffb4a0;
}
@media (max-width: 480px) {
  .join .wrap form {
    flex-direction: column;
  }
  .join .wrap form .btn {
    width: 100%;
  }
}

.ct-panel form {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}
.ct-panel form label {
  display: grid;
  gap: 6px;
}
.ct-panel form label span {
  font-family: 'Oswald', 'DIN Next', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(11, 31, 42, 0.6);
}
.ct-panel form input,
.ct-panel form textarea {
  font-family: 'DIN Next', sans-serif;
  font-size: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(11, 31, 42, 0.2);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  width: 100%;
}
.ct-panel form input:focus,
.ct-panel form textarea:focus {
  outline: none;
  border-color: #1076af;
}
.ct-panel form .btn {
  justify-self: start;
  min-width: 200px;
}

/* ============================================================
   Demo / placeholder content
   Shown on a fresh install before collections, menus and images
   are connected, so the layout reads correctly out of the box.
   ============================================================ */
.card[data-demo] .card-media {
  cursor: default;
}
.card-add--demo,
.stack-btn--demo {
  pointer-events: none;
}
.card-add--demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.stack-btn--demo {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
}

/* press logos and payment badges fall back to their name as a wordmark */
.pl-placeholder {
  font-family: 'Oswald', 'DIN Next', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(11, 31, 42, 0.42);
  white-space: nowrap;
}
.f34-pay-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 54px;
  padding: 0 10px;
  border: 1px solid rgba(31, 31, 31, 0.18);
  border-radius: 3px;
  font-family: 'Oswald', 'DIN Next', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(31, 31, 31, 0.55);
  white-space: nowrap;
}
.f34-pay-placeholder.wide {
  height: 22px;
  min-width: 74px;
}

/* The See Sea product grids use .ss-grid, which is their own layout and no
   longer inherits Shopline's base .grid carousel track, so they need no
   overflow correction here. */

/* Google customer-reviews badge anchors to a bottom corner, and the floating
   cart owns bottom right on phones. Lift the cart clear of it. */
@media (max-width: 980px) {
  body[data-merchant-widget='RIGHT_BOTTOM'] .float-cart {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}
   

/* ---------- mobile menu search (components/seesea/search-form.html) ---------- */
.m34-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 18px; padding: 10px 12px; color: #0b1f2a; background: #fff; border: 1px solid #fff; border-radius: 4px; }
.m34-search__icon { display: inline-flex; flex: 0 0 auto; }
.m34-search__icon svg { width: 18px; height: 18px; }
.m34-search__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; }
.m34-search__input::placeholder { color: #52646d; opacity: 1; }
.m34-search__input::-webkit-search-cancel-button { display: none; }

/* ---------- checkboxes on customer forms (sign-up agreement, marketing) ----------
   Stock draws the box with border: 1px solid rgb(var(--color-entry-line)). The
   See Sea schemes store "Entry line" as an rgba() string, which theme-css-var
   turns into an empty ",," triplet, so the whole border is dropped and the
   required "I agree" box is invisible (client email, sign-up page). Draw it
   from the scheme's text colour instead. Checked state keeps the stock fill. */
.field-checkbox .checkbox {
  border: 1px solid rgba(var(--color-text), 0.55);
}
.field-checkbox input[type='checkbox']:checked + .checkbox {
  border-color: rgb(var(--color-button-background));
}
.field-checkbox input[type='checkbox']:focus-visible + .checkbox {
  outline: 2px solid rgb(var(--color-text));
  outline-offset: 2px;
}

/* ---------- Add to Cart popup (quick add), client 2026-11-21 ----------
   1. A translate on .card-actions (the 3D-tilt click fix) made the card the
      containing block of the panel's position:fixed shell: the popup hung off
      the card (cut off on a phone, top left on desktop). Drop it while open.
   2. The stock rule centres the panel with margin:auto, but the unlayered
      reset in seesea.css beats it (the layer loses), so it sat at 0,0. */
.card-actions:has(details[open]),
.card > .card-actions:has(details[open]) {
  translate: none;
}
/* 3. The popup and its mask never leave the card (the stock modal only moves
      to <body> on custom:visible, which a display:contents wrapper never
      fires). .card-actions carries z-index:3 for the button over the image,
      and that makes it a stacking context (absolute on the Gifts card, a grid
      item on the stock card), so mask (1030) and panel (1032) were capped at
      3 and every later card's Add to Cart and overlays painted over them.
      Lift only the open card's actions layer to the modal level: the mask and
      panel then sit above every card and the header, and the open card's own
      button, inside the same layer with no z-index, stays under the mask. */
.card-actions:has(details[open]) {
  z-index: calc(var(--z-index-modal, 1030) + 2);
}
.card-add-modal .block-product-card__modal {
  inset: 0;
  width: fit-content;
  height: fit-content;
  max-width: 100vw;
  max-height: 100vh;
  margin: auto;
}
.card-add-modal .block-product-card__modal-content {
  width: min(980px, 92vw);
  max-height: min(90vh, 900px);
}
@media (min-width: 960px) {
  /* Picture and thumbnails on the left, the buying details on the right, so
     thumbnails and the Add to Cart button show without scrolling. */
  .card-add-modal .block-product-card__modal-content theme-product-detail {
    --page-padding: 32px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  .card-add-modal .block-product-card__modal-content theme-product-detail > .product-detail__col {
    width: 100% !important;
    max-width: none;
    min-width: 0;
    margin: 0;
    justify-self: stretch;
  }
  .card-add-modal .block-product-card__modal-content theme-product-detail > .product-detail__info {
    align-items: stretch;
    padding-inline-end: 44px;
  }
}
@media (max-width: 959px) {
  /* Bottom sheet, full width, never taller than the visible screen. */
  .card-add-modal .block-product-card__modal {
    inset: auto 0 0;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
  }
  .card-add-modal .block-product-card__modal-content {
    width: 100%;
    max-height: 88svh;
  }
}


/* Sold out on a card: solid slate, white text (7:1). It was the dark button at
   72% opacity, which let the page show through and read as light. */
.card-add.card-add--soldout,
.seesea-stock-collection .card-add.card-add--soldout.block-product-card__quick-add {
  color: #fff;
  background: #4b5b64;
  opacity: 1;
  pointer-events: none;
}
.card:hover .card-add.card-add--soldout {
  background: #4b5b64;
}
