/* ==========================================================
   SAMAIA Shop — WordPress additions
   Loaded after style.css and shop.css. Only adds what WordPress
   needs and the larger card title and price.
   ========================================================== */

/* ---------- Card caption: larger, clearer title and price ---------- */
.card__caption { align-items: baseline; gap: 16px; padding-top: 12px; }
.card__caption .card__name {
  min-width: 0;
  font-size: clamp(15px, 1.12vw, 19px); font-weight: 600; line-height: 1.2; letter-spacing: -.005em;
  color: var(--ink);
}
.card__caption span.card__price {
  flex: none; white-space: nowrap;
  font-size: clamp(16px, 1.28vw, 21px); font-weight: 600; line-height: 1.2; letter-spacing: -.01em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.card__caption span.card__price s { font-size: .74em; font-weight: 500; color: var(--ink-soft); margin-right: 6px; }

/* hover panel: price a little larger too */
.card__panel-meta { font-size: 13px; align-items: baseline; }
.card__panel-meta span:last-child { font-weight: 600; }

@media (max-width: 900px) {
  .card__caption { flex-direction: column; align-items: flex-start; gap: 3px; padding-top: 10px; }
  .card__caption .card__name { width: 100%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card__caption span.card__price { font-size: 16px; }
  .rows .card.is-wide .card__caption { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
  .rows .card.is-wide .card__caption .card__name { width: auto; font-size: 16px; }
  .rows .card.is-wide .card__caption span.card__price { font-size: 17px; }
}

/* ---------- Empty shop ---------- */
.samaia-empty { margin: -40vh auto 0; padding: 0 var(--gutter) 30vh; max-width: 60ch; text-align: center; font-size: 15px; position: relative; z-index: 2; }
.samaia-empty a { border-bottom: 1px solid currentColor; }
@media (max-width: 900px) { .samaia-empty { margin-top: 0; padding-bottom: 16vh; } }

/* ---------- Guard against theme styles when theme CSS is kept ---------- */
.samaia-shop a, .samaia-shop a:hover, .samaia-shop a:focus { text-decoration: none; box-shadow: none; }
.samaia-shop .card, .samaia-shop .card:hover { color: inherit; }
.samaia-shop button { text-transform: none; border-radius: 0; min-height: 0; box-shadow: none; line-height: inherit; }
.samaia-shop h1, .samaia-shop h2 { color: inherit; }
.samaia-shop .card__media img { height: 100%; max-width: 100%; margin: 0; border-radius: 0; }
.samaia-shop input[type="email"] { box-shadow: none; border-radius: 0; min-height: 0; }

/* ---------- Elementor editor preview ---------- */
.elementor-editor-active .curtain, .elementor-editor-active .curtain__fill { display: none; }

/* ==========================================================
   Header: logo left, cart right (same position and blend as the
   original site header)
   ========================================================== */
.samaia-header { align-items: center; }
.samaia-header .logo { max-width: 40vw; }
.samaia-header .logo--image img { display: block; width: 100%; height: auto; }
.scart-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 16px;
  background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line);
  font-size: 13.5px; font-weight: 700; letter-spacing: .01em; transition: background .3s;
}
.scart-btn:hover { background: #fff; }
.scart-btn.has-items .scart-btn__count { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scart-btn__count {
  min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center;
  border: 1.5px solid currentColor; font-size: 11.5px; font-variant-numeric: tabular-nums; line-height: 1;
}
.scart-btn.is-bump .scart-btn__count { animation: scart-bump .55s var(--ease); }
@keyframes scart-bump { 35% { transform: scale(1.3); } }
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .site-header { top: 0; } }
@media (max-width: 900px) { .scart-btn { height: 40px; padding: 0 10px 0 13px; } }

/* ---------- Quick add on shop cards (hover panel) ---------- */
.card__panel > span.card__add {
  position: absolute; top: 12px; right: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 0;
  font-size: 12px; font-weight: 700; border-bottom: 1px solid currentColor; cursor: pointer;
}
.card__add b { font-weight: 500; font-size: 15px; line-height: 1; transition: transform .4s var(--ease); }
.card__add:hover b { transform: rotate(90deg); }
.card__add.is-loading { opacity: .55; pointer-events: none; }
.card__add.is-added b { transform: none; }
.card__add:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* WordPress adds "home" to <body> on the front page: never let the old
   static-site .home section rule lock page scrolling (touch devices). */
body.home { height: auto; overflow-y: visible; touch-action: auto; }

/* ==========================================================
   Cart drawer
   ========================================================== */
html.scart-lock, html.scart-lock body { overflow: hidden; }
.scart [hidden], .scart-veil[hidden] { display: none !important; }
.scart-veil { position: fixed; inset: 0; z-index: 180; background: rgba(31, 36, 33, .38); opacity: 0; transition: opacity .45s; }
.scart-veil.is-on { opacity: 1; }
.scart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 181; width: min(440px, 100vw);
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  transform: translateX(101%); transition: transform .65s var(--ease); visibility: hidden;
}
.scart.is-open { transform: translateX(0); visibility: visible; }
body.admin-bar .scart { top: 32px; }
@media (max-width: 782px) { body.admin-bar .scart { top: 46px; } }
.scart__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.scart__head h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: var(--display-weight); font-stretch: 84%; letter-spacing: -.015em; }
.scart__head h2 span { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-left: 6px; }
.scart__close { font-size: 12px; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.scart__notice {
  margin: 0; padding: 0 24px; max-height: 0; overflow: hidden; background: var(--limestone);
  font-size: 12.5px; font-weight: 600; line-height: 1.45; transition: max-height .4s var(--ease), padding .4s var(--ease);
}
.scart__notice.is-on { max-height: 120px; padding: 12px 24px; }
.scart__notice.is-error { background: #F1DEDF; color: var(--brand); }
.scart__notice button { margin-left: 6px; font-weight: 700; border-bottom: 1px solid currentColor; }

.scart__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.scart__items { list-style: none; margin: 0; padding: 0 24px; }
.scart-item { display: grid; grid-template-columns: 78px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: opacity .3s; }
.scart-item.is-updating .scart-item__side b { opacity: .45; }
.scart-item.is-removing { opacity: .35; pointer-events: none; }
.scart-item img { width: 78px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--stone); }
.scart-item__info { min-width: 0; }
.scart-item h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; line-height: 1.25; }
.scart-item h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.scart-item p { margin: 0 0 2px; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.scart-item__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }
.scart-item__side b { font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.scart-item__remove { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid currentColor; }
.scart-item__remove:hover { color: var(--ink); }

.scart-qty { display: inline-grid; grid-template-columns: 30px 38px 30px; height: 34px; margin-top: 10px; border: 1px solid var(--line); }
.scart-qty button { font-size: 16px; }
.scart-qty button:hover:not([disabled]) { background: var(--limestone); }
.scart-qty button[disabled] { opacity: .3; cursor: default; }
.scart-qty input {
  width: 100%; border: 0; background: transparent; text-align: center; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); padding: 0;
  -moz-appearance: textfield;
}
.scart-qty input::-webkit-outer-spin-button, .scart-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.scart-qty--fixed { display: inline-block; height: auto; border: 0; font-size: 12px; color: var(--ink-soft); }

.scart__empty { padding: 48px 24px; }
.scart__empty p { margin: 0 0 14px; font-family: var(--display); font-size: 22px; font-weight: var(--display-weight); font-stretch: 86%; }
.scart__empty a { font-size: 13px; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.scart__foot { padding: 18px 24px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.scart__row { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: 15px; }
.scart__row b { font-size: 21px; font-variant-numeric: tabular-nums; }
.scart__row--disc { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.scart__note { margin: 4px 0 16px; font-size: 12px; color: var(--ink-soft); }
.scart__checkout { display: grid; place-items: center; height: 54px; background: var(--ink); color: var(--paper) !important; font-size: 14px; font-weight: 700; letter-spacing: .01em; transition: background .3s; }
.scart__checkout:hover { background: #333a36; }
.scart__view { display: block; width: max-content; margin: 14px auto 0; font-size: 12.5px; font-weight: 700; border-bottom: 1px solid currentColor; }

.scart__loading { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; }
.scart__loading::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--ink); animation: scart-load 1s var(--ease) infinite; }
.scart.is-busy .scart__loading { opacity: 1; }
@keyframes scart-load { from { left: -40%; } to { left: 100%; } }

@media (max-width: 600px) {
  .scart { width: 100vw; }
  .scart__head, .scart__items, .scart__foot { padding-left: 5vw; padding-right: 5vw; }
}
