/* Sweet Petal — blush palette based on #ffd0e2. */
:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  --brand: #ffd0e2;
  --brand-soft: #ffeaf2;
  --canvas: #fff9fb;
  --surface: #ffffff;
  --text: #4c2938;
  --muted: #765661;
  --accent: #a33862;
  --border: #ebc6d4;
  --input-border: #b48697;
  --positive: #725080;
  --negative: #b3324e;
  --warning: #85501b;
  --warning-bg: #fff0dd;
  color: var(--text);
  background: var(--canvas);
  accent-color: var(--accent);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  cursor: pointer;
}
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--surface);
  padding: 11px 17px;
  font-weight: 600;
}
button:hover {
  filter: brightness(0.93);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.danger {
  color: var(--negative);
}
a {
  color: var(--accent);
}
input,
select,
textarea {
  border: 1px solid var(--input-border);
  border-radius: 7px;
  padding: 11px;
  background: var(--surface);
  color: var(--text);
  max-width: 100%;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-weight: 500;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.2px;
  margin: 0 0 10px;
}
h2 {
  font-size: 21px;
}
p {
  color: var(--muted);
  line-height: 1.6;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.brand {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.8px;
}
#app {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
#app[hidden] {
  display: none;
}
aside {
  background: var(--brand);
  border-right: 1px solid var(--border);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
aside small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}
nav {
  display: grid;
  gap: 8px;
}
nav button {
  text-align: left;
  background: transparent;
  color: var(--text);
  padding: 13px;
}
nav button.active {
  background: var(--accent);
  color: var(--surface);
}
aside > a {
  margin-top: 30px;
}
main {
  padding: 0 42px 24px;
  min-width: 0;
}
header {
  min-height: 90px;
  padding-block: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
}
.currency {
  flex-direction: row;
  align-items: center;
  margin: 0;
  font-size: 12px;
}
.title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 26px 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.stat small {
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 26px;
  margin-top: 11px;
  letter-spacing: -0.6px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 23px 0;
}
.toolbar input {
  flex: 1;
}
/* Shared page actions stay available while scrolling long admin lists. */
#app .admin-action-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  margin: 0 0 20px;
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 12px -12px #4c293866;
}
.inventory-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.inventory-actions #new-product {
  margin-left: auto;
}
@media (max-width: 600px) {
  #app .admin-action-bar button {
    min-height: 44px;
    font-size: 12px;
    padding: 10px;
  }
  .inventory-actions > button,
  .page-actions > button {
    flex: 1 1 auto;
  }
  .inventory-actions #new-product {
    flex-basis: 100%;
    margin-left: 0;
  }
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  background: var(--brand-soft);
  padding: 16px;
}
td {
  padding: 17px 16px;
  border-top: 1px solid var(--brand-soft);
}
td button {
  padding: 7px 9px;
  font-size: 11px;
  margin: 2px;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.thumb {
  width: 45px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  font-size: 23px;
  color: var(--accent);
}
.product-cell small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.badge {
  border-radius: 20px;
  background: var(--brand-soft);
  padding: 5px 9px;
  font-size: 11px;
}
.low {
  background: var(--warning-bg);
  color: var(--warning);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  padding: 24px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.card button {
  margin: 4px;
}
.empty {
  text-align: center;
  padding: 65px 20px;
  color: var(--muted);
}
.positive {
  color: var(--positive);
}
.negative {
  color: var(--negative);
}
footer {
  font-size: 11px;
  color: var(--muted);
  margin-top: 25px;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 620px;
  max-width: 94vw;
  max-height: 90vh;
  padding: 26px;
  box-shadow: 0 25px 100px #4c29382a;
}
dialog::backdrop {
  background: #4c293860;
}
.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dialog-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* Every admin editor shares this shell; only the fields scroll. */
html:has(#modal[open]) {
  overflow: hidden;
}
#modal {
  padding: 0;
  overflow: hidden;
  max-height: 90vh;
  max-height: 90dvh;
}
#editor {
  display: flex;
  flex-direction: column;
  max-height: calc(90vh - 2px);
  max-height: calc(90dvh - 2px);
}
#modal .dialog-head,
#modal .dialog-footer {
  flex: 0 0 auto;
  padding: 16px 24px;
  background: var(--surface);
}
#modal .dialog-head {
  border-bottom: 1px solid var(--border);
}
#modal-title {
  min-width: 0;
  margin: 0;
  max-height: 20vh;
  max-height: 20dvh;
  overflow: auto;
  overflow-wrap: anywhere;
}
#modal #close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
}
#modal .dialog-footer {
  border-top: 1px solid var(--border);
}
#modal .dialog-actions button {
  min-height: 44px;
}
#fields {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  scroll-padding-block: 20px;
}
#modal #form-error {
  margin: 0 0 12px;
  max-height: 15vh;
  max-height: 15dvh;
  overflow: auto;
  overflow-wrap: anywhere;
}
#modal #form-error:empty {
  display: none;
}
@media (max-width: 700px), (max-height: 500px) {
  #modal {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  #editor {
    max-height: calc(100vh - 26px);
    max-height: calc(100dvh - 26px);
  }
  #modal .dialog-head,
  #modal .dialog-footer {
    padding: 12px 16px;
  }
  #fields {
    padding: 16px;
  }
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.check {
  flex-direction: row;
  align-items: center;
}
#form-error {
  color: var(--negative);
}
.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.photo {
  display: flex;
  flex-direction: column;
}
.photo img {
  width: 85px;
  height: 85px;
  object-fit: cover;
  border-radius: 8px;
}
.photo button {
  font-size: 10px;
  padding: 5px;
}
.login {
  max-width: 450px;
  margin: 9vh auto;
  padding: 28px;
}
.login .brand {
  margin-bottom: 45px;
}
.customer-panel {
  max-width: 560px;
  margin: 4vh auto;
  padding: 28px;
}
.customer-panel h1 {
  font-size: clamp(30px, 6vw, 44px);
  overflow-wrap: anywhere;
}
.customer-panel form {
  margin: 26px 0;
}
.login h1 {
  font-size: 45px;
}
.login form {
  margin-top: 28px;
}
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  border-radius: 10px;
  background: var(--text);
  color: var(--surface);
  padding: 14px 22px;
  max-width: 80vw;
  z-index: 5;
}
.store {
  max-width: 1200px;
  margin: auto;
  padding: 35px;
}
.store header {
  margin-bottom: 55px;
}
.store h1 {
  font-size: 58px;
}
.store .card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
}
.store .price {
  font-size: 22px;
  font-weight: 700;
}
.section {
  margin: 35px 0;
  white-space: pre-wrap;
}
.section.hero {
  background: var(--brand);
  padding: 40px;
  border-radius: 15px;
}
.rate {
  font-size: 12px;
  color: var(--warning);
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  main {
    padding: 0 22px 20px;
  }
}
@media (min-width: 701px) {
  #app > aside {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  #app > aside > * {
    flex-shrink: 0;
  }
}
@media (max-width: 700px) {
  #app {
    display: block;
  }
  aside {
    padding: 18px;
  }
  aside nav {
    display: flex;
    overflow: auto;
  }
  nav button {
    white-space: nowrap;
  }
  aside small,
  aside > a {
    display: none;
  }
  aside #logout {
    align-self: flex-start;
  }
  header {
    min-height: 76px;
  }
  .title-row {
    align-items: flex-start;
  }
  h1 {
    font-size: 28px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 22px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .currency {
    font-size: 0;
  }
  .currency select {
    font-size: 13px;
  }
  .store h1 {
    font-size: 40px;
  }
}
.brand {
  overflow-wrap: anywhere;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
}
.brand [data-store-name] {
  min-width: 0;
}
.brand [data-store-logo] {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand [hidden] {
  display: none;
}
.logo-preview {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--canvas);
  padding: 8px;
  margin-bottom: 16px;
}

::selection {
  background: var(--brand);
  color: var(--text);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.movement-revisions {
  white-space: normal;
  min-width: 260px;
  max-width: 420px;
  overflow-wrap: anywhere;
}
.movement-revisions summary {
  cursor: pointer;
}
#reset-result {
  overflow-wrap: anywhere;
}

/* Product media: one pending batch and a gallery with an always-visible close control. */
.media-drop,
.video-links-editor {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0;
  min-width: 0;
}
.media-drop p,
.video-links-editor p,
#media-status {
  font-size: 12px;
  color: var(--muted);
}
.photo {
  width: 130px;
  gap: 6px;
}
.photo img,
.photo video {
  width: 130px;
  height: 110px;
  object-fit: contain;
  background: var(--bg);
  border-radius: 8px;
}
.photo small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pending-media {
  padding: 5px;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.sortable-photo {
  box-sizing: content-box;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  align-self: flex-start;
}
.sortable-photo[draggable='true'] img {
  cursor: grab;
}
.sortable-photo.pending-media {
  border-style: dashed;
}
.photo-position {
  font-weight: 700;
}
.photo-order-actions {
  display: flex;
  gap: 6px;
}
.photo-order-actions button {
  flex: 1;
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
}
.sortable-photo > button {
  min-height: 36px;
  font-size: 11px;
}
.photo-drop-target {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: var(--brand);
}
#photo-order-help,
#photo-order-status {
  font-size: 12px;
  color: var(--muted);
}
#photo-order-status:empty {
  display: none;
}
.video-link-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.video-link-row > a {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-top: 6px;
}
.product-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.product-card > :not(.product-card-pattern) {
  position: relative;
  z-index: 1;
}
.product-card .product-cover {
  margin: 0 0 16px;
}
.product-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
}
.product-card-meta small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.product-card-caption {
  margin-left: auto;
  flex-shrink: 0;
  max-width: 60%;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--card-caption);
}
.product-card--top-tier {
  --card-edge: #dfbd64;
  --card-glow: rgba(218, 173, 59, 0.28);
  --card-motif: #b48623;
  --card-caption: #866014;
  border-color: #ead9ab;
  background: linear-gradient(145deg, #fffefb, #fffaf0);
}
.product-card--decorated-pages {
  --card-edge: #c8e7f8;
  --card-glow: rgba(163, 214, 243, 0.38);
  --card-motif: #a1cde8;
  --card-caption: #3b6986;
  border-color: #dfedf6;
  background: linear-gradient(145deg, #fefeff, #f4faff);
}
.product-card--top-tier,
.product-card--decorated-pages {
  box-shadow: 0 0 18px 1px var(--card-glow);
}
.product-card--top-tier .product-cover,
.product-card--decorated-pages .product-cover {
  border: 2px solid var(--card-edge);
  box-shadow:
    0 0 0 3px var(--card-glow),
    0 0 18px 2px var(--card-glow);
  border-radius: 10px;
}
.product-card-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  color: var(--card-motif);
}
/* Keep four small balloons in the exposed side gutters and sixteen below the
   photograph. Every icon stays inside its lane, including at loop boundaries. */
.balloon-body {
  position: absolute;
  inset: var(--balloon-body-top, 286px) 14px 14px;
}
.stationery-balloon {
  --balloon-size: 24px;
  --balloon-sway: 4px;
  position: absolute;
  top: 6px;
  left: calc(var(--balloon-x) - var(--balloon-size) / 2);
  width: var(--balloon-size);
  height: calc(100% - var(--balloon-size) - 12px);
  transform: translateY(var(--rest-y));
  animation:
    stationery-rise var(--rise-time) linear var(--rise-delay) infinite,
    stationery-fade var(--rise-time) ease-in-out var(--rise-delay) infinite;
}
.stationery-balloon.balloon-edge {
  --balloon-size: 12px;
  --balloon-sway: 1px;
}
.stationery-balloon svg {
  display: block;
  width: var(--balloon-size);
  height: var(--balloon-size);
  opacity: 0.12;
  transform-origin: center;
  animation: stationery-sway var(--sway-time) ease-in-out var(--sway-delay) infinite alternate;
}
.product-card--decorated-pages .stationery-balloon svg {
  opacity: 0.2;
}
@keyframes stationery-rise {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes stationery-sway {
  from {
    transform: translateX(calc(-1 * var(--balloon-sway))) rotate(-22deg);
  }
  50% {
    transform: translateX(0) rotate(3deg);
  }
  to {
    transform: translateX(var(--balloon-sway)) rotate(22deg);
  }
}
@keyframes stationery-fade {
  0%,
  100% {
    opacity: 0;
  }
  12%,
  84% {
    opacity: 1;
  }
}
.pattern-paused .stationery-balloon,
.pattern-paused .stationery-balloon svg {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .stationery-balloon,
  .stationery-balloon svg {
    animation: none;
  }
}
#product-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
#product-order-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
#product-order-list li.dragging {
  opacity: 0.5;
}
#product-order-list li.drop-target {
  outline: 2px solid var(--accent);
}
.product-order-handle {
  padding: 8px 4px;
  font-size: 24px;
  cursor: grab;
  border: 0;
}
.product-order-number {
  min-width: 2ch;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.product-order-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.product-order-name small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.product-order-actions {
  display: flex;
  gap: 4px;
}
.product-order-actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
}
.product-order-actions button:disabled {
  cursor: default;
}
@media (max-width: 480px) {
  #product-order-list li {
    gap: 6px;
    padding: 8px;
  }
  #product-order-list .thumb {
    display: none;
  }
  .product-order-actions {
    flex-direction: column;
  }
}
.product-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  margin-bottom: 15px;
  overflow: hidden;
}
.product-cover:hover {
  filter: none;
}
.product-cover img {
  display: block;
}
.product-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  pointer-events: none;
}
.product-cover-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .product-cover-overlay {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 160ms ease;
  }
  .product-cover-label {
    border-color: transparent;
    background: transparent;
    font-size: 16px;
  }
  .product-cover:hover .product-cover-overlay,
  .product-cover:focus-visible .product-cover-overlay {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .product-cover-overlay {
    transition: none;
  }
}
.product-cover .empty {
  display: grid;
  height: 240px;
  place-items: center;
  font-size: 56px;
  background: var(--brand-soft);
  border-radius: 8px;
}
#gallery {
  width: 1040px;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 0;
  overflow: hidden;
}
#gallery[open] {
  display: flex;
  flex-direction: column;
}
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}
.gallery-header h2 {
  font-size: 22px;
  margin: 0;
  overflow-wrap: anywhere;
}
#close-gallery {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
}
#gallery-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 20px;
}
.video-frame {
  width: 100%;
  margin: 0 auto 24px;
}
.video-frame.portrait {
  max-width: 400px;
}
.video-frame.square {
  max-width: 580px;
}
.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65vh;
  max-height: 65dvh;
  object-fit: contain;
  background: #191318;
  border-radius: 10px;
}
.video-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background: var(--bg);
}
.video-frame.portrait iframe {
  aspect-ratio: 9 / 16;
}
.video-frame.square iframe {
  aspect-ratio: 1;
}
.video-frame.instagram iframe {
  min-height: 480px;
}
.video-frame > a {
  display: inline-block;
  margin-top: 10px;
}
.video-frame > small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

/* Customer carousel and media lightbox. */
.media-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
html.media-dialog-open {
  overflow: hidden;
}
.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr);
  gap: 28px;
  align-items: start;
}
.product-carousel {
  min-width: 0;
}
.carousel-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(240px, 43vh, 470px);
  height: clamp(240px, 43dvh, 470px);
  padding: 22px 16px 50px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--canvas);
  color: var(--text);
  touch-action: pan-y pinch-zoom;
}
.carousel-stage:hover {
  filter: none;
  border-color: var(--accent);
}
.carousel-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.media-open-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 30px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 12px #4c293810;
}
.media-open-hint svg {
  width: 16px;
  height: 16px;
}
.media-platform {
  font-size: clamp(18px, 3vw, 30px);
  font-weight: 700;
  padding-bottom: 90px;
}
.media-play {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 20px #4c293830;
}
.media-play svg {
  width: 30px;
  height: 30px;
}
.carousel-controls,
.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.carousel-controls {
  margin: 12px 0;
}
.carousel-controls p,
.lightbox-controls p {
  margin: 0;
  font-size: 13px;
  text-align: center;
}
.media-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  flex-shrink: 0;
}
.media-arrow svg {
  width: 24px;
  height: 24px;
}
.media-arrow:disabled {
  cursor: default;
  opacity: 0.35;
}
.carousel-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 5px 3px 9px;
  scrollbar-width: thin;
}
.carousel-thumbs[hidden] {
  display: none;
}
.carousel-thumb {
  position: relative;
  flex: 0 0 76px;
  width: 76px;
  height: 68px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--canvas);
  color: var(--text);
}
.carousel-thumb[aria-current='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--brand);
}
.carousel-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}
.carousel-thumb .media-play {
  width: 24px;
  height: 24px;
}
.carousel-thumb .media-play svg {
  width: 16px;
  height: 16px;
}
.carousel-thumb .media-platform {
  display: block;
  font-size: 10px;
  padding: 0 0 30px;
}
.thumb-number {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 18px;
  padding: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
}
.carousel-help {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}
.product-summary {
  padding: 8px 0;
  overflow-wrap: anywhere;
}
.product-summary > small {
  color: var(--muted);
}
.product-summary .price {
  font-size: 28px;
  font-weight: 700;
  margin: 12px 0;
}
.product-availability {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 0 16px;
  border-radius: 30px;
  background: var(--brand-soft);
  font-size: 12px;
}
.product-description {
  line-height: 1.7;
  white-space: pre-wrap;
  margin-top: 0;
}
/* Desktop product details: a vertical stack with one full page in view. */
#gallery.gallery-paged {
  height: 90vh;
  height: 90dvh;
}
.gallery-paged .gallery-header h2 {
  max-height: 15vh;
  max-height: 15dvh;
  overflow: auto;
}
.gallery-paged #gallery-content {
  flex: 1;
  padding: 0;
  overflow: hidden;
}
.desktop-product-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.desktop-product-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.desktop-product-meta > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.desktop-product-meta small {
  color: var(--muted);
}
.desktop-product-meta strong {
  font-size: 23px;
}
.desktop-product-meta .product-availability {
  margin: 0;
}
.desktop-product-description {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 18vh;
  max-height: 18dvh;
  overflow-y: auto;
}
.desktop-product-description:empty {
  display: none;
}
#desktop-pages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--brand-soft);
  background: var(--canvas);
}
#desktop-pages:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}
.desktop-media-page {
  position: relative;
  height: 100%;
  min-height: 100%;
  padding: 42px 32px 22px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.desktop-media-label {
  position: absolute;
  top: 14px;
  left: 32px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.desktop-media-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 16px 24px 54px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 28px #4c29380c;
}
.desktop-media-stage:hover {
  filter: none;
  border-color: var(--accent);
}
.desktop-media-stage > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  display: block;
}
.desktop-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.desktop-gallery-controls > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.desktop-gallery-controls p {
  margin: 0;
  font-size: 12px;
}
.desktop-gallery-controls .media-arrow svg {
  transform: rotate(90deg);
}
@media (max-height: 600px) {
  .gallery-paged .gallery-header {
    padding-block: 8px;
  }
  .desktop-product-meta,
  .desktop-gallery-controls {
    padding-block: 8px;
  }
  .desktop-media-page {
    padding: 8px 24px;
  }
  .desktop-media-label,
  .desktop-gallery-help {
    display: none;
  }
  .desktop-gallery-controls {
    justify-content: flex-end;
  }
}
#media-lightbox {
  width: 1200px;
  max-width: 96vw;
  height: 94vh;
  height: 94dvh;
  max-height: 94vh;
  max-height: 94dvh;
  padding: 0;
  overflow: hidden;
  background: #21191e;
  color: #fff9fb;
  border-color: #694854;
}
#media-lightbox[open] {
  display: flex;
  flex-direction: column;
}
#media-lightbox::backdrop {
  background: #160e16de;
}
.lightbox-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: #21191e;
  border-bottom: 1px solid #ffffff24;
}
.lightbox-header h2 {
  font-size: 16px;
  margin: 0;
  overflow-wrap: anywhere;
}
#close-lightbox {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
}
#media-lightbox .quiet {
  color: #fff9fb;
  border-color: #ffffff50;
}
#media-lightbox .quiet:hover {
  background: #ffffff18;
  filter: none;
}
#media-lightbox :focus-visible {
  outline-color: var(--brand);
}
#lightbox-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  touch-action: pan-y pinch-zoom;
}
#lightbox-content {
  display: grid;
  place-items: center;
  min-height: 100%;
}
.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 180px);
  max-height: calc(94dvh - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.product-page-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 9px;
  margin: 4px 0 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff9fbe6;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.product-page-count svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.desktop-product-meta .product-page-count {
  margin: 0;
}
.image-zoom-controls {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #ffffff24;
}
.image-zoom-controls[hidden] {
  display: none;
}
.image-zoom-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  touch-action: manipulation;
}
.image-zoom-controls input[type='range'] {
  flex: 1 1 70px;
  max-width: 200px;
  min-width: 60px;
  width: 100px;
  height: 44px;
  padding: 0;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.image-zoom-controls output {
  min-width: 36px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.zoom-help {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: #d9c3ce;
}
#lightbox-body.image-zoom-active {
  position: relative;
  overflow: hidden;
  padding: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.image-zoom-active #lightbox-content {
  min-height: 0;
}
.image-zoom-active .lightbox-image {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  transform-origin: center;
  will-change: transform;
  pointer-events: none;
}
#lightbox-body.image-zoomed {
  cursor: grab;
}
#lightbox-body.image-zoomed.image-dragging {
  cursor: grabbing;
}
.lightbox-controls {
  flex: 0 0 auto;
  padding: 10px 18px;
  border-top: 1px solid #ffffff24;
}
#lightbox-content .video-frame {
  margin: 0 auto;
}
#lightbox-content video {
  max-height: calc(94vh - 210px);
  max-height: calc(94dvh - 210px);
}
#lightbox-content a {
  color: var(--brand);
}
#lightbox-content small {
  color: #d9c3ce;
}
#lightbox-content p {
  color: #e9d8e1;
}
#lightbox-content .external-video {
  max-width: 850px;
}
#lightbox-content .external-video.portrait {
  width: 100%;
  max-width: 380px;
}
#lightbox-content .external-video.square {
  max-width: 580px;
}
@media (max-width: 700px) {
  .product-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  #gallery-content {
    padding: 16px;
  }
  .gallery-header {
    padding: 12px 16px;
  }
  .gallery-header h2 {
    font-size: 18px;
  }
  .carousel-stage {
    height: clamp(220px, 40vh, 360px);
    height: clamp(220px, 40dvh, 360px);
    padding: 12px 12px 48px;
  }
  .carousel-thumb {
    flex-basis: 64px;
    width: 64px;
    height: 60px;
  }
  #lightbox-body {
    padding: 10px;
  }
  .lightbox-header,
  .lightbox-controls {
    padding: 10px 12px;
  }
  .lightbox-image {
    max-height: calc(94vh - 175px);
    max-height: calc(94dvh - 175px);
  }
}
