@font-face {
  font-family: 'ZarameGothic';
  src: url('zarame-gothic.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('Pretendard-Medium.otf') format('opentype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --blue: #2A6F8E;
  --ink: #17323D;
  --sage: #7FA99B;
  --clay: #C1633C;
  --sand: #F4EDE0;

  --name-color: var(--blue);
  --ring: #8FC1D6;
  --cream: var(--sand);
  --cancel-hover: var(--clay);
  --cancel-active: var(--ink);

  --display: 'ZarameGothic', 'Pretendard', sans-serif;
  --body: 'Pretendard', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

button { position: relative; overflow: hidden; }

.section-title-plain {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--ink); margin-bottom: 1.5rem;
}

.fade-on-load { opacity: 0; transform: translateY(14px); animation: fadeUp 0.9s ease forwards; animation-delay: 0.15s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.hero-wrap { position: relative; }

.banner {
  width: 100%;
  aspect-ratio: 1.618 / 1;
  max-height: 46vh;
  background: linear-gradient(135deg, var(--ink) 0%, var(--blue) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.flag-toggle {
  position: absolute; top: 1rem; right: 1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: var(--sand); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.3s ease;
  opacity: 0; pointer-events: none;
}
.flag-toggle.is-revealed { opacity: 1; pointer-events: auto; }
.admin-mode .flag-toggle { opacity: 1; pointer-events: auto; }
.flag-toggle:hover { background: rgba(255,255,255,0.32); transform: scale(1.06); }
.admin-mode .flag-toggle { background: var(--clay); color: #fff; }

.banner-edit {
  position: absolute; bottom: 1rem; right: 1rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(23,50,61,0.55); color: var(--sand); border: none;
  cursor: pointer; font-size: 1rem;
}
.banner-delete {
  position: absolute; bottom: 1rem; right: 4rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(23,50,61,0.55); color: var(--sand); border: none;
  cursor: pointer; font-size: 1rem;
  display: none;
}
.admin-mode .banner-delete.has-banner { display: flex; align-items: center; justify-content: center; }
.banner-delete:hover { background: var(--clay); }

.profile {
  position: relative;
  padding: 0 clamp(1.5rem, 6vw, 4rem) 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Bubble — bigger now */
.profile-bubble {
  width: clamp(11rem, 34vw, 16rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg);
  border: 10px solid var(--ring);
  box-shadow: 0 4px 14px rgba(23,50,61,0.25);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin-left: 0;
  margin-top: calc(-1 * clamp(5.5rem, 17vw, 8rem));
  flex-shrink: 0;
}
.profile-bubble-clip {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.profile-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-placeholder { width: 55%; color: rgba(23,50,61,0.35); }

@media (max-width: 560px) {
  .profile { flex-direction: column; align-items: center; text-align: center; }
  .profile-bubble { margin-left: 0; }
  .profile-bio { max-width: 34ch; }
}

.profile-drag-handle {
  position: absolute; top: 0.3rem; left: clamp(1.5rem, 6vw, 4rem);
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: none;
  background: var(--blue); color: #fff; cursor: grab; font-size: 0.9rem;
  display: none; align-items: center; justify-content: center; z-index: 5;
}
.admin-mode .profile-drag-handle { display: flex; }
.profile-drag-handle.is-dragging { cursor: grabbing; background: var(--clay); }

.profile-edit {
  position: absolute; bottom: 0.15rem; right: 0.15rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--blue); color: #fff; border: none; cursor: pointer;
}

.profile-text { padding-top: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.profile-name { font-family: var(--display); font-weight: 700; font-size: 4.53rem; color: var(--blue); line-height: 1; }
.profile-bio { max-width: 46ch; color: var(--ink); font-size: 0.95rem; font-weight: 400; }
[contenteditable="true"] { outline: 1px dashed var(--blue); border-radius: 4px; padding: 2px 6px; cursor: text; }

/* Cart — floating, fixed to viewport, collapses to an icon on scroll-down, expands on hover */
.cart-box {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 25;
  background: var(--clay);
  color: #fff;
  overflow: hidden;
  width: 20rem;
  height: auto;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: width 0.5s cubic-bezier(0.25, 1, 0.35, 1), height 0.5s cubic-bezier(0.25, 1, 0.35, 1),
              border-radius 0.5s cubic-bezier(0.25, 1, 0.35, 1), padding 0.5s cubic-bezier(0.25, 1, 0.35, 1);
}
.cart-box[hidden] { display: none; }
.cart-box.is-collapsed {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.cart-box.is-collapsed:hover {
  width: 20rem;
  height: auto;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  align-items: stretch;
  justify-content: flex-start;
}
.cart-box.is-jumping-box { animation: cartJump 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); }

.cart-icon-pill {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  opacity: 0; position: absolute; inset: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-box.is-collapsed .cart-icon-pill {
  opacity: 1; position: relative; inset: auto; pointer-events: auto;
}
.cart-box.is-collapsed:hover .cart-icon-pill { opacity: 0; pointer-events: none; }
.cart-icon-pill .cart-icon { width: 24px; height: 24px; color: #fff; flex-shrink: 0; }
.cart-icon-pill .cart-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--blue); color: #fff; font-family: var(--display); font-weight: 700;
  font-size: 0.65rem; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--clay);
}

.cart-full-panel {
  display: flex; flex-direction: column; gap: 0.6rem;
  opacity: 1;
  transition: opacity 0.3s ease 0.12s;
}
.cart-box.is-collapsed .cart-full-panel {
  opacity: 0; position: absolute; inset: 0; pointer-events: none;
  transition: opacity 0.15s ease;
}
.cart-box.is-collapsed:hover .cart-full-panel {
  opacity: 1; position: relative; inset: auto; pointer-events: auto;
  transition: opacity 0.3s ease 0.15s;
}

.cart-title { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.cart-items { display: flex; flex-direction: column; gap: 0.5rem; max-height: 40vh; overflow-y: auto; }
.cart-item { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.78rem; border-bottom: 1px solid rgba(255,255,255,0.25); padding-bottom: 0.5rem; }
.cart-item-title { font-family: var(--display); font-weight: 700; }
.cart-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.cart-item-size { opacity: 0.85; }
.cart-item-qty { display: flex; align-items: center; gap: 0.25rem; }
.cart-item-qty input {
  width: 2.2rem; text-align: center; font-family: var(--display); font-size: 0.75rem;
  border: none; border-radius: 999px; padding: 0.1rem 0; background: #fff; color: var(--ink);
}
.cart-item-price { font-weight: 700; }
.cart-total-line { display: flex; justify-content: space-between; font-weight: 700; font-size: 0.9rem; padding-top: 0.2rem; }
.cart-actions { display: flex; gap: 0.5rem; margin-top: 0.2rem; }
.cart-actions button {
  flex: 1; font-family: var(--display); font-weight: 400; font-size: 0.75rem;
  padding: 0.4rem 0.6rem; border-radius: 999px; border: none; cursor: pointer;
}
.cart-clear { background: rgba(255,255,255,0.2); color: #fff; }
.cart-clear:hover { background: rgba(255,255,255,0.32); }
.cart-order { background: var(--sage); color: #fff; }
.cart-order:hover { filter: brightness(1.08); }

@keyframes cartJump {
  0% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-14px) scale(1.08); }
  45% { transform: translateY(0) scale(0.96); }
  65% { transform: translateY(-6px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .cart-box { right: 1rem; top: 1rem; width: min(88vw, 20rem); }
}

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: center;
  padding: 1rem 2rem;
  background: rgba(255,255,255,1);
  border-bottom: 1px solid rgba(23,50,61,0.15);
  transition: background 0.35s ease;
}
.site-header.is-scrolled { background: rgba(255,255,255,0.9); }
.nav { display: flex; gap: 2.5rem; }
.nav-link {
  font-family: var(--display); font-weight: 400; font-size: 1.15rem; letter-spacing: 0.02em; position: relative;
  color: var(--ink); background: none; border: none; cursor: pointer; padding: 0.3rem 0;
}
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px; background: var(--blue); transition: width 0.25s ease; }
.nav-link:hover::after { width: 100%; }

.nav-link.is-active::after { width: 100%; }

:root { --content-margin: clamp(2rem, 9vw, 6rem); }
.content-margin-wrap { position: relative; }
.gallery-section { padding: 4rem var(--content-margin); }

.margin-handle {
  position: absolute; top: 0; bottom: 0; width: 14px; z-index: 15;
  background: rgba(42,111,142,0.15);
  border: none; cursor: ew-resize;
  display: none;
}
.admin-mode .margin-handle { display: block; }
.margin-handle::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 4px; height: 40px; border-radius: 4px; background: var(--blue);
}
.margin-handle:hover, .margin-handle.is-dragging { background: rgba(42,111,142,0.3); }
.margin-handle--left { left: var(--content-margin); margin-left: -7px; }
.margin-handle--right { right: var(--content-margin); margin-right: -7px; }
#boutique.gallery-section {
  background: var(--sand);
  border-radius: 0;
}

.gallery-grid { position: relative; width: 100%; }

.gallery-gap-filler {
  position: absolute; background: var(--ink); color: var(--sand);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 400; font-size: 0.85rem;
  letter-spacing: 0.03em; pointer-events: none; user-select: none;
}

.plate {
  position: absolute;
  transition: left 0.35s ease, top 0.35s ease, width 0.35s ease, height 0.35s ease;
}

.plate-frame {
  width: 100%; height: 100%; background: var(--sand);
  border-radius: 16px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.plate-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plate-frame .plate-art { width: 100%; height: 100%; padding: 1.5rem; color: var(--ink); }
.plate:hover .plate-frame { box-shadow: 0 10px 24px rgba(23,50,61,0.22); transform: translateY(-3px); }

.plate-tag {
  font-family: var(--display); font-weight: 400; font-size: 0.7rem; color: var(--sand);
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 2;
  background: rgba(23,50,61,0.55); padding: 2px 8px; border-radius: 999px;
}
.plate-frame img {
  -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none;
}

.plate-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: linear-gradient(0deg, rgba(23,50,61,0.75), rgba(23,50,61,0));
  color: var(--sand);
  font-size: 0.75rem; font-weight: 400; font-style: italic; padding: 1.2rem 0.7rem 0.6rem;
  opacity: 0; transition: opacity 0.25s ease;
}
.plate:hover .plate-caption { opacity: 1; }
.admin-mode .plate-caption { display: none; }

.plate-remove {
  position: absolute; bottom: 0.5rem; right: 0.5rem; z-index: 3;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; border: none;
  background: rgba(23,50,61,0.6); color: var(--sand); cursor: pointer; display: none;
}
.admin-mode .plate-remove { display: block; }

.resize-handle {
  position: absolute; bottom: 0.4rem; left: 0.4rem; z-index: 3;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: none; color: var(--ink);
  cursor: pointer; display: none; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.resize-handle::before { content: '⤢'; }
.admin-mode .resize-handle { display: flex; }

.size-preset-popover {
  position: fixed; z-index: 40; background: #fff; border-radius: 12px;
  padding: 0.7rem; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
  width: 15rem;
}
.size-preset-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  background: var(--sand); border: none; border-radius: 8px; padding: 0.4rem;
  cursor: pointer; font-family: var(--display); font-size: 0.6rem; color: var(--ink);
}
.size-preset-btn:hover { background: var(--ring); }
.size-preset-swatch {
  width: 1.6rem; background: var(--ink); border-radius: 2px; display: block;
}

.lightbox-overlay .login-modal,
.lightbox-content {
  background: transparent; box-shadow: none; padding: 0;
  max-width: min(90vw, 1100px); max-height: 90vh;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.is-open .lightbox-content { transform: scale(1); }
.lightbox-content img { max-width: 100%; max-height: 90vh; border-radius: 12px; display: block; }
.lightbox-close {
  position: absolute; top: -1rem; right: -1rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: none;
  background: var(--ink); color: #fff; cursor: pointer; font-size: 1rem;
}
.lightbox-close:hover { background: var(--clay); }

.plate-add {
  width: 100%; height: 100%; border: 2px dashed rgba(23,50,61,0.3); background: transparent;
  border-radius: 16px;
  display: none; align-items: center; justify-content: center; flex-direction: column;
  cursor: pointer; color: rgba(23,50,61,0.55); font-family: var(--display); gap: 0.5rem;
}
.plate-add:hover { border-color: var(--blue); color: var(--blue); }
.plate-add .plus { font-size: 2rem; line-height: 1; }
.admin-mode .plate-add { display: flex; }

/* Shop carousel — banner with autoplay, dots, and overlaid admin controls */
.shop-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 32 / 7;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sand);
  margin-bottom: 2.5rem;
}
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.carousel-slide.is-active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-dots {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.5rem; z-index: 2;
}
.carousel-dot {
  width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--ink); border: 2px solid rgba(255,255,255,0.7); cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
  padding: 0;
}
.carousel-dot:hover { transform: scale(1.3); }
.carousel-dot.is-active { background: #fff; border-color: var(--ink); transform: scale(1.25); }

.carousel-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(23,50,61,0.5); font-family: var(--display); font-size: 0.9rem; text-align: center; padding: 1rem;
}
.carousel-admin-bar {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  display: flex; gap: 0.5rem;
}
.carousel-admin-bar button {
  font-family: var(--display); font-weight: 400; font-size: 0.75rem;
  background: rgba(23,50,61,0.7); color: #fff; border: none;
  border-radius: 999px; padding: 0.4rem 0.9rem; cursor: pointer;
}
.carousel-admin-bar button:hover { background: var(--clay); }

.shop-rows-wrap { display: flex; flex-direction: column; gap: 1.5rem; }
.shop-row-container { position: relative; }
.shop-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.6rem; height: 2.6rem; border-radius: 50%; border: none;
  background: rgba(23,50,61,0.75); color: #fff; font-size: 1.3rem; cursor: pointer;
  z-index: 8; display: flex; align-items: center; justify-content: center;
}
.shop-arrow:hover { background: var(--clay); }
.shop-arrow--left { left: -0.5rem; }
.shop-arrow--right { right: -0.5rem; }
@media (max-width: 720px) {
  .shop-arrow--left { left: 0.2rem; }
  .shop-arrow--right { right: 0.2rem; }
}

/* Shop grid — horizontal scrolling row, fading out at the edges, like a "Nouveautés" carousel */
.gallery-grid--shop {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  padding: 0.5rem 0.25rem 1rem;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 36px, black calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 36px, black calc(100% - 36px), transparent 100%);
  scrollbar-width: none;
}
.gallery-grid--shop::-webkit-scrollbar { display: none; }

.shop-cell {
  flex: 0 0 240px;
  scroll-snap-align: start;
  cursor: default;
}

.shop-tile-wrap {
  position: relative; width: 100%; aspect-ratio: 1 / 1.618;
  display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(23,50,61,0.12);
}
.shop-card-media {
  position: relative; width: 100%; flex: 2 1 0; min-height: 0;
  cursor: pointer;
}
.shop-tile { background: var(--ink); width: 100%; height: 100%; display: block; }
.shop-tile-wrap.is-soldout .shop-tile { filter: grayscale(1) brightness(0.65); }

/* White info block — the bottom third of the card: price, title, cart button */
.shop-card-body {
  flex: 1 1 0; min-height: 0; background: #fff;
  padding: 0.6rem 0.8rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  position: relative;
}
.shop-card-body-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }

.shop-title-tag {
  display: block; font-family: var(--display); font-weight: 400; font-size: 0.8rem;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-title-tag[contenteditable="true"] { cursor: text; outline: 1px dashed var(--ring); border-radius: 4px; padding: 1px 4px; }

.shop-price-tag {
  position: static; transform: none;
  background: none; color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  padding: 0; border-radius: 0;
  display: flex; align-items: center; gap: 0.4rem;
}
.price-edit-box { display: none; align-items: center; gap: 0.4rem; }
.price-edit-box.is-active { display: flex; }
.price-display.is-hidden { display: none; }
.price-edit-box input {
  width: 3.6rem; font-family: var(--display); font-size: 0.9rem;
  border: 1px solid rgba(23,50,61,0.3); border-radius: 999px; padding: 0.15rem 0.5rem; text-align: center;
}
.price-validate {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; border: none;
  background: var(--sage); color: #fff; cursor: pointer; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.admin-mode .shop-price-tag { cursor: pointer; }

/* Quick-add circular button — one click adds exactly one unit */
.shop-quick-add {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: none;
  background: var(--clay); color: #fff; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: filter 0.15s ease;
}
.shop-quick-add:hover { filter: brightness(1.08); }
.shop-quick-add .cart-icon { width: 16px; height: 16px; }
.shop-quick-add.is-bouncing .cart-icon { animation: cartBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

.shop-hidden-overlay {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: #000; opacity: var(--hidden-overlay, 0);
  transition: opacity 0.1s linear;
}

.shop-quick-add { transition: filter 0.15s ease, opacity 0.2s ease; }
.shop-tile-wrap.is-btn-hidden .shop-quick-add { opacity: 0; pointer-events: none; }

.shop-tile-wrap.is-soldout .shop-quick-add {
  background: #a8a8a8; cursor: not-allowed; pointer-events: none; position: relative;
}
.shop-tile-wrap.is-soldout .shop-quick-add::after {
  content: ''; position: absolute; left: 15%; right: 15%; top: 50%;
  height: 3px; background: #1a1a1a; transform: translateY(-50%) rotate(-18deg);
  border-radius: 2px;
}

/* Custom admin badge (like "Nouveauté" / "Prix rouge" style tags) — top-left of the image */
.shop-custom-badge {
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 4;
  font-family: var(--display); font-weight: 700; font-size: 0.7rem;
  padding: 0.3rem 0.7rem; border-radius: 999px; color: #fff;
}
.shop-custom-badge--blue { background: var(--blue); }
.shop-custom-badge--orange { background: var(--clay); }

/* Badge edit trigger — small icon overlaid top-left of the image (shifts down if a badge is already showing) */
.shop-badge-edit-btn {
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 6;
  display: none; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: rgba(255,255,255,0.85); color: var(--ink); border: none;
  font-size: 0.85rem; cursor: pointer; align-items: center; justify-content: center;
}
.admin-mode .shop-badge-edit-btn { display: flex; }
.shop-badge-edit-btn:hover { background: #fff; }

.shop-badge-editor {
  position: absolute; z-index: 10; top: 2.6rem; left: 0.6rem;
  background: #fff; border-radius: 12px; padding: 0.8rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: flex; flex-direction: column; gap: 0.5rem; width: 12rem;
}
.badge-color-choice { display: flex; gap: 0.5rem; }
.badge-color-swatch {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
}
.badge-color-swatch--blue { background: var(--blue); }
.badge-color-swatch--orange { background: var(--clay); }
.badge-color-swatch.is-chosen { border-color: var(--ink); }
.badge-text-input {
  font-family: var(--body); font-size: 0.8rem; padding: 0.4rem 0.6rem;
  border: 1px solid rgba(23,50,61,0.3); border-radius: 8px;
}
.badge-editor-actions { display: flex; gap: 0.4rem; }
.badge-editor-actions button {
  font-family: var(--display); font-size: 0.72rem; border: none; border-radius: 999px;
  padding: 0.35rem 0.6rem; cursor: pointer;
}
.badge-validate { background: var(--sage); color: #fff; }
.badge-remove { background: rgba(23,50,61,0.1); color: var(--ink); }

.shop-remove-btn {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 5;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; border: none;
  background: rgba(23,50,61,0.65); color: #fff; cursor: pointer; font-size: 0.75rem;
  display: none; align-items: center; justify-content: center;
}
.admin-mode .shop-remove-btn { display: flex; }
.shop-remove-btn:hover { background: var(--clay); }

/* Image upload / delete controls — bottom-right of the image, admin only */
.shop-image-controls {
  position: absolute; bottom: 0.6rem; right: 0.6rem; z-index: 5;
  display: none; gap: 0.4rem;
}
.admin-mode .shop-image-controls { display: flex; }
.shop-image-edit-btn, .shop-image-delete-btn {
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.85); color: var(--ink); cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.shop-image-edit-btn:hover, .shop-image-delete-btn:hover { background: #fff; }

/* Drag-and-drop between/within rows */
.shop-cell[draggable="true"] { cursor: grab; }
.shop-cell.is-dragging { opacity: 0.4; }

.shop-stock-tag {
  position: absolute; bottom: 0.6rem; left: 0.6rem; z-index: 4;
  background: rgba(23,50,61,0.7); color: #fff;
  font-family: var(--display); font-weight: 400; font-size: 0.7rem;
  padding: 0.25rem 0.6rem; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; gap: 0.35rem;
}
.stock-edit-box { display: none; align-items: center; gap: 0.3rem; }
.stock-edit-box.is-active { display: flex; }
.stock-display.is-hidden { display: none; }
.stock-edit-box input {
  width: 2.6rem; font-family: var(--display); font-size: 0.7rem;
  border: none; border-radius: 999px; padding: 0.1rem 0.4rem; text-align: center;
}
.stock-validate {
  width: 1.2rem; height: 1.2rem; border-radius: 50%; border: none;
  background: var(--sage); color: #fff; cursor: pointer; font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.shop-low-stock {
  position: absolute; bottom: 0.6rem; right: 0.6rem; z-index: 4;
  background: var(--clay); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 0.7rem;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}

.soldout-badge {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(23,50,61,0.35);
  color: #fff; font-family: var(--display); font-weight: 700;
  font-size: 1.1rem; letter-spacing: 0.08em;
  pointer-events: none;
}

/* Admin "add product" tile, matches card proportions */
.shop-cell #shopAddProductBtn {
  width: 100%; aspect-ratio: 1 / 1.618; border-radius: 16px;
}

/* Product quick-view modal — same 2/3 image + 1/3 white block ratio as the card, no scrolling needed */
.product-modal {
  background: #fff; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  width: min(90vw, 420px);
  height: min(80vh, 620px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  transform: scale(0.92); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.is-open .product-modal { transform: scale(1); }
.product-modal-close-btn { position: absolute; top: 0.8rem; right: 0.8rem; z-index: 10; }

.product-modal-image { position: relative; width: 100%; flex: 2 1 0; min-height: 0; }
.product-modal-image .shop-tile {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
}
.shop-tile.is-soldout-tile { filter: grayscale(1) brightness(0.65); }

.product-modal-info {
  background: #fff; padding: 1.1rem 1.4rem 1.3rem; flex: 1 1 0; min-height: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 0.35rem;
}
.product-modal-info h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-modal-price { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--blue); }
.product-modal-size { color: rgba(23,50,61,0.6); font-size: 0.78rem; }
.product-modal-desc {
  color: rgba(23,50,61,0.85); font-size: 0.8rem; max-width: 48ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
[contenteditable="true"].product-modal-desc,
[contenteditable="true"].product-modal-size {
  outline: 1px dashed var(--blue); border-radius: 4px; padding: 2px 6px; cursor: text;
}
.product-modal-soldout {
  font-family: var(--display); font-weight: 700; color: var(--clay);
  text-align: center; padding: 0.4rem 0; letter-spacing: 0.05em; font-size: 0.85rem;
}

.shop-add-btn-wrap { border-radius: 14px; margin-top: 0.3rem; }
.shop-add-btn-wrap .shop-add-btn { color: #fff; padding: 0.55rem 0; }
.shop-add-btn-wrap .cart-icon-slot svg { width: 16px; height: 16px; }
@media (max-width: 560px) {
  .product-modal { width: 92vw; height: 78vh; }
  .product-modal-info { padding: 0.9rem 1.1rem 1.2rem; }
}

.shop-add-btn {
  width: 100%; background: var(--clay); border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 700; font-size: 0.9rem;
  padding: 0.7rem 0; border-radius: 999px;

}
.shop-add-btn:hover { filter: brightness(1.08); }
.shop-add-btn .cart-icon { width: 18px; height: 18px; flex-shrink: 0; }
.shop-add-btn.is-bouncing .cart-icon { animation: cartBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes cartBounce {
  0% { transform: translateY(0); }
  30% { transform: translateY(-7px); }
  50% { transform: translateY(0); }
  70% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* Confirmation phrase + confetti burst, shown on the shop tile after validating */
.confirm-burst {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
}
.confirm-phrase {
  font-family: var(--display); font-weight: 700; font-size: 2.2rem; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  opacity: 0; transform: translateY(50px) scale(0.8);
  animation: phraseIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  position: relative; z-index: 2;
}
@keyframes phraseIn {
  0% { opacity: 0; transform: translateY(50px) scale(0.8); }
  35% { opacity: 1; transform: translateY(0) scale(1.05); }
  55% { transform: translateY(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px) scale(0.95); }
}
.confetti-piece {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px;
  animation: confettiOut 1s ease-out forwards;
}
@keyframes confettiOut {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)) scale(0.7); opacity: 0; }
}

.cart-confetti-flyer {
  position: fixed; width: 78px; height: 78px; z-index: 60; pointer-events: none;
  transform: translate(0, 0) rotate(0deg) scale(1);
  opacity: 1;
  transition: transform 0.65s cubic-bezier(0.3, 0.6, 0.3, 1), opacity 0.65s ease;
}
.shop-tile-wrap.is-recharged {
  animation: rechargeBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center center;
}
@keyframes rechargeBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.dust-puff {
  position: fixed; z-index: 55; pointer-events: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #d8d8d8;
  opacity: 0.9;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.pseudo-sparkle {
  position: fixed; z-index: 50; pointer-events: none;
  opacity: 0; transform: rotate(0deg) scale(0.4);
  filter: drop-shadow(0 0 6px rgba(252,191,73,0.8));
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pseudo-sparkle.is-visible { opacity: 1; transform: rotate(var(--rot)) scale(1); }

/* Ripple — water-drop expansion feedback, applied globally to every button */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transform: scale(0); opacity: 1;
  animation: rippleExpand 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleExpand {
  to { transform: scale(1); opacity: 0; }
}

.about-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 4rem; align-items: center; padding: 4rem clamp(1.5rem, 6vw, 6rem) 5rem; }
.about-visual { display: flex; justify-content: center; }
.about-tool { width: 55%; color: var(--ink); }
.about-text p { max-width: 55ch; margin-bottom: 1.25rem; color: rgba(23,50,61,0.85); font-weight: 400; }
@media (max-width: 720px) { .about-section { grid-template-columns: 1fr; text-align: center; } .about-visual { order: -1; } .about-text p { margin-left: auto; margin-right: auto; } }

.site-footer { padding: 2rem; text-align: center; font-family: var(--display); font-weight: 400; font-size: 0.75rem; color: rgba(23,50,61,0.55); }
.footer-skull { font-size: 0.9rem; }

.admin-only { display: none; }
.admin-mode .admin-only { display: flex; }
.admin-mode .profile-edit { display: flex; align-items:center; justify-content:center; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(23,50,61,0.55); z-index: 30;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.modal-overlay.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.4s ease;
}
.login-modal {
  background: var(--bg); padding: 2rem; width: min(380px, 100%);
  border-radius: 14px; display: flex; flex-direction: column; gap: 1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  transform: scale(0.9) translateY(10px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.is-open .login-modal { transform: scale(1) translateY(0); }

.login-modal h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-bottom: 0.25rem; color: var(--ink); }
.login-modal label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; font-family: var(--display); font-weight: 400; color: var(--ink); }
.login-modal input, .login-modal textarea {
  font-family: var(--body); font-weight: 400; padding: 0.6rem 0.7rem; border: 1px solid rgba(23,50,61,0.3);
  border-radius: 10px; background: var(--sand); color: var(--ink); resize: vertical;
}
.contact-modal-text { font-size: 0.9rem; color: var(--ink); line-height: 1.5; font-weight: 400; }
.contact-modal-text a { color: var(--blue); border-bottom: 1px solid var(--blue); }
.login-hint { font-size: 0.78rem; color: var(--clay); min-height: 1em; }
.login-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 0.25rem; }
.btn-ghost, .btn-solid {
  font-family: var(--display); font-weight: 400; font-size: 0.8rem; padding: 0.55rem 1.1rem;
  border-radius: 999px; cursor: pointer; border: none; transition: background 0.15s ease, color 0.15s ease;
}
.btn-ghost { background: transparent; border: 1px solid rgba(23,50,61,0.35); color: var(--ink); }
.btn-ghost:hover { background: var(--cancel-hover); color: #fff; border-color: var(--cancel-hover); }
.btn-ghost:active { background: var(--cancel-active); color: #fff; border-color: var(--cancel-active); }
.btn-solid { background: var(--ink); color: var(--sand); }
.btn-solid:hover { background: var(--blue); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
