/* Coastal Eddy: retro beach storefront */
:root {
  --sand: #fbf6ec;
  --sand-2: #f3ead7;
  --paper: #ffffff;
  --ink: #1f2b2d;
  --muted: #5b6868;
  --line: #e6dcc8;
  --teal: #2f6f6a;
  --teal-dark: #245753;
  --sage: #8db7ad;
  --mint: #bfeedd;
  --gold: #f3bf55;
  --sun: #f1653c;
  --coral: #cd3545;
  --cream: #f7e8c5;

  --head: 'Josefin Sans', 'Trebuchet MS', sans-serif;
  --body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(31, 43, 45, .09);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.eyebrow {
  font-family: var(--head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .18em; font-size: .78rem; color: var(--sun); margin-bottom: .6em;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--head); font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .15s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled { background: #9fb3b1; cursor: not-allowed; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--sand); }
.btn-sun { background: var(--sun); color: #fff; }
.btn-sun:hover { background: #d9532c; }
.btn-block { width: 100%; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--teal);
  font-size: .85rem; text-decoration: underline; text-underline-offset: 3px;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--sand-2); }

/* ---------------------------------------------------------------- header */
#site-header { min-height: 106px; }
.announce {
  background: var(--teal); color: var(--cream); text-align: center;
  font-size: .82rem; letter-spacing: .04em; padding: 8px 16px;
}
.header-bar {
  background: rgba(251, 246, 236, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
}
#site-header { position: sticky; top: -36px; z-index: 40; }
.header-row { display: flex; align-items: center; gap: 24px; height: 70px; }
.logo {
  display: inline-flex; flex-direction: column; border: 2px solid var(--ink); text-decoration: none;
  font-family: var(--head); font-weight: 700; text-transform: uppercase; line-height: 1;
  letter-spacing: .14em; font-size: 15px; flex-shrink: 0;
}
.logo span { padding: 6px 10px 4px; text-align: center; }
.logo span:first-child { background: #fff; color: var(--ink); }
.logo span:last-child { background: var(--ink); color: #fff; }
.nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav a {
  font-family: var(--head); font-weight: 600; text-transform: uppercase; font-size: .84rem; letter-spacing: .1em;
  color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { background: var(--sand-2); }
.nav a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -2px 0 var(--sun); border-radius: 0; }
.nav-toggle { display: none; }
.cart-btn { margin-left: auto; }
.nav + .cart-btn { margin-left: 0; }
.cart-count {
  position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--sun); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.cart-count[hidden] { display: none; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .header-row { gap: 8px; justify-content: space-between; }
  .logo { font-size: 13px; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0;
    background: var(--sand); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
    display: none; box-shadow: var(--shadow);
  }
  .nav-open .nav { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .header-bar { position: relative; }
}

/* ---------------------------------------------------------------- hero */
.hero { position: relative; background: #7d8b83; overflow: hidden; }
.hero-img {
  width: 100%; height: clamp(180px, 25vw, 520px); object-fit: cover; object-position: 60% 50%;
}
@media (max-width: 600px) { .announce-extra { display: none; } }
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: linear-gradient(90deg, var(--gold) 0 25%, var(--sun) 25% 50%, var(--coral) 50% 75%, var(--sage) 75% 100%);
}

.intro { text-align: center; padding: 64px 20px 24px; max-width: 760px; }
.intro .lead { font-size: 1.15rem; color: var(--muted); }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ---------------------------------------------------------------- sections */
.section { padding: 48px 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-family: var(--head);
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; white-space: nowrap;
}
.link-arrow:hover { color: var(--sun); }

/* category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-tile {
  background: var(--tint); border-radius: var(--radius); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-art { padding: 20px 20px 0; }
.cat-art .mockup { width: 100%; aspect-ratio: 1; }
.cat-text { padding: 4px 18px 18px; }
.cat-text h3 { margin-bottom: 2px; text-transform: uppercase; letter-spacing: .08em; }
.cat-text p { font-size: .9rem; color: var(--muted); margin: 0 0 6px; }
.cat-count { font-size: .78rem; font-weight: 700; color: var(--teal); }
@media (max-width: 960px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-text p { display: none; }
}

/* product cards */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 20px; }
.card { text-decoration: none; color: var(--ink); display: block; }
.card-media {
  position: relative; background: var(--tint, var(--sand-2)); border-radius: var(--radius); padding: 18px;
  aspect-ratio: 1; display: grid; place-items: center; transition: box-shadow .2s;
}
.card-media .mockup { width: 100%; height: 100%; transition: transform .35s ease; }
.card:hover .card-media { box-shadow: var(--shadow); }
.card:hover .mockup { transform: scale(1.04); }
.badge {
  position: absolute; top: 12px; left: 12px; background: var(--sun); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px;
}
.card-body { padding: 12px 2px 0; }
.card-body h3 { font-size: 1rem; margin: 0 0 2px; letter-spacing: .02em; }
.card:hover h3 { color: var(--teal); }
.price { font-weight: 700; margin: 0 0 8px; }
.dots { display: flex; gap: 6px; }
.dots span { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); }
@media (max-width: 960px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .product-grid { grid-template-columns: 1fr 1fr; gap: 20px 14px; } }

/* story band */
.story {
  margin-top: 32px; background: url('/images/beach.jpg') center 60% / cover no-repeat;
  padding: clamp(60px, 10vw, 140px) 0;
}
.story-inner { display: flex; }
.story-card {
  background: rgba(251, 246, 236, .93); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px);
  max-width: 480px; box-shadow: var(--shadow);
}
.story-card p:not(.eyebrow) { color: var(--muted); }

/* perks */
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 56px 20px 0; }
.perk { display: flex; gap: 14px; align-items: flex-start; }
.perk-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cream); color: var(--sun);
}
.perk h3 { margin: 4px 0 4px; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.perk p { margin: 0; color: var(--muted); font-size: .93rem; }
@media (max-width: 760px) { .perks { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- shop page */
.page-head { padding: 48px 20px 12px; }
.page-head p { color: var(--muted); max-width: 560px; }
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 20px 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current="page"] { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.sort { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.sort select {
  font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.empty { grid-column: 1 / -1; color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------------------------------------------------------------- product page */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); padding: 24px 0 20px; }
.crumbs a { color: var(--muted); }
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.gallery { position: sticky; top: 90px; }
.gallery-main { background: var(--tint); border-radius: var(--radius); padding: 7%; aspect-ratio: 1; }
.gallery-main .mockup { width: 100%; height: 100%; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
  width: 76px; height: 76px; padding: 6px; border-radius: 10px; background: var(--sand-2);
  border: 2px solid transparent; cursor: pointer;
}
.thumb[aria-current="true"] { border-color: var(--ink); }
.thumb .mockup { width: 100%; height: 100%; }
.pdp-info h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: .25em; }
.pdp-price { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.2em; }
.opt { margin-bottom: 22px; }
.opt-label { display: flex; gap: 10px; align-items: baseline; font-weight: 600; margin-bottom: 10px; }
.opt-label strong { font-weight: 400; color: var(--muted); }
.opt-error { color: var(--coral); font-size: .88rem; font-weight: 600; margin: 8px 0 0; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 38px; height: 38px; border-radius: 50%; background: var(--sw); cursor: pointer;
  border: 2px solid var(--sand); box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ink); }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.size {
  min-width: 56px; height: 44px; padding: 0 14px; border-radius: 10px; background: var(--paper);
  border: 1.5px solid var(--line); cursor: pointer; font-weight: 600;
}
.size:hover { border-color: var(--ink); }
.size[aria-checked="true"] { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.buy-row { display: flex; gap: 12px; margin: 28px 0 16px; }
.buy-row .add-btn { flex: 1; }
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper); height: 48px;
}
.qty button { width: 42px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 1.2rem; border-radius: 999px; }
.qty button:hover { background: var(--sand-2); }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.qty-sm { height: 34px; }
.qty-sm button { width: 32px; font-size: 1rem; }
.made { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--teal); margin-bottom: 24px; }
.made svg { flex-shrink: 0; }
details { border-top: 1px solid var(--line); padding: 4px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-family: var(--head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; font-size: .88rem; display: flex; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: '−'; }
details p { color: var(--muted); }
.features { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.features li { margin-bottom: 4px; }
.features li::marker { color: var(--sun); }
.size-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 10px; }
.size-table th, .size-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.size-table th { background: var(--sand-2); font-weight: 700; }
.fine { font-size: .82rem; color: var(--muted); }
.related { padding-top: 72px; }
.not-found { text-align: center; padding: 80px 0; }
@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; }
  .gallery { position: static; }
}

/* ---------------------------------------------------------------- cart drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(31, 43, 45, .45); z-index: 80; opacity: 0; transition: opacity .25s;
}
.cart-open .drawer-backdrop { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--sand); z-index: 90;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .15); outline: none;
}
.cart-open .drawer { transform: none; }
.cart-open { overflow: hidden; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 24px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 1.3rem; margin: 0; text-transform: uppercase; letter-spacing: .08em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); background: var(--paper); }
.subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: 4px; }
.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { background: var(--sand-2); border-radius: 10px; padding: 6px; width: 76px; height: 76px; }
.cart-thumb .mockup { width: 100%; height: 100%; }
.cart-name { color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.3; display: block; }
.cart-name:hover { color: var(--teal); }
.cart-meta { font-size: .85rem; color: var(--muted); margin: 2px 0 8px; }
.cart-row { display: flex; align-items: center; gap: 14px; }
.cart-price { font-weight: 700; }

/* ---------------------------------------------------------------- real product photos */
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.card-media:has(.photo), .gallery-main:has(.photo), .thumb:has(.photo), .cart-thumb:has(.photo) { padding: 0; overflow: hidden; }
.card:hover .photo { transform: scale(1.04); transition: transform .35s ease; }
.cat-art .photo { aspect-ratio: 1; border-radius: 10px; }
.size:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 100;
  background: var(--ink); color: var(--sand); padding: 12px 20px; border-radius: 999px; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- footer */
#site-footer { background: var(--ink); color: #d7dedc; margin-top: 64px; min-height: 200px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.5fr; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand img { width: 112px; height: auto; background: var(--cream); border-radius: 50%; padding: 8px; margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; max-width: 260px; }
#site-footer h3 { color: #fff; text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; margin-bottom: 14px; }
#site-footer ul { list-style: none; margin: 0; padding: 0; }
#site-footer li { margin-bottom: 8px; }
#site-footer a { color: #d7dedc; text-decoration: none; }
#site-footer a:hover { color: var(--gold); }
.footer-news p { font-size: .92rem; }
.subscribe { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe input {
  flex: 1; min-width: 180px; height: 48px; border-radius: 999px; border: 1px solid #4a5759;
  background: #2a3739; color: #fff; padding: 0 18px; font: inherit;
}
.subscribe input::placeholder { color: #93a19f; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid #3a4749; padding-top: 18px; padding-bottom: 28px; font-size: .85rem; color: #93a19f;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
