:root {
  --magenta: #f400b1;
  --magenta-dark: #c4008e;
  --cyan: #02b9fd;
  --yellow: #fce103;
  --black: #0c070a;
  --ink: #251d22;
  --muted: #766b72;
  --paper: #ffffff;
  --soft: #fff5fc;
  --soft-cyan: #eefaff;
  --line: #eadfe6;
  --green: #20c466;
  --radius: 14px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 8px 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 138px;
  height: 70px;
  object-fit: contain;
}

.brand-section {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--black);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .16em;
  white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.preview-badge {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.order-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 9px 0 18px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--magenta);
  box-shadow: 0 8px 24px rgba(244, 0, 177, .2);
  cursor: pointer;
  font-weight: 900;
}

.order-button strong {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--black);
  background: var(--yellow);
  font-size: .78rem;
}

main { width: min(1500px, 100%); margin: 0 auto; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 650px;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  align-items: center;
  gap: clamp(26px, 4vw, 76px);
  padding: clamp(54px, 7vw, 104px) 5vw clamp(44px, 6vw, 76px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fff 67%, #fff7fc 100%);
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -210px;
  width: 520px;
  height: 520px;
  border: 48px solid rgba(244, 0, 177, .06);
  border-radius: 50%;
  content: "";
}

.hero-accent { position: absolute; z-index: -1; border-radius: 999px; transform: rotate(-18deg); }
.hero-accent-cyan { top: 86px; right: 11%; width: 92px; height: 14px; background: var(--cyan); }
.hero-accent-yellow { top: 120px; right: 7%; width: 62px; height: 14px; background: var(--yellow); }

.hero-content { position: relative; z-index: 2; }

.hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 520px;
  place-items: center;
  margin: -34px 0 -72px;
  overflow: hidden;
  border: 1px solid rgba(12, 7, 10, .08);
  border-radius: 42px 42px 0 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(244, 0, 177, .2), transparent 34%),
    radial-gradient(circle at 18% 72%, rgba(2, 185, 253, .14), transparent 31%),
    var(--black);
  box-shadow: 0 28px 64px rgba(12, 7, 10, .18);
}

.hero-art::before,
.hero-art::after,
.hero-art-glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  content: "";
}

.hero-art::before {
  width: min(36vw, 480px);
  aspect-ratio: 1;
  border: clamp(18px, 2.6vw, 40px) solid rgba(244, 0, 177, .1);
}

.hero-art::after {
  right: 2%;
  bottom: 11%;
  width: 110px;
  height: 110px;
  background: var(--yellow);
  opacity: .82;
}

.hero-art-glow {
  width: min(31vw, 410px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(2, 185, 253, .18), rgba(2, 185, 253, 0) 68%);
  filter: blur(2px);
}

.hero-art img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 510px);
  max-height: 650px;
  object-fit: contain;
  filter: drop-shadow(0 28px 34px rgba(12, 7, 10, .2));
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--magenta);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .2em;
}

h1 {
  max-width: 820px;
  margin: 0;
  color: var(--black);
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(3.4rem, 6.2vw, 6.8rem);
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 720px;
  margin: 28px 0 0;
  color: #5e525a;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin-top: 35px;
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.hero-stats strong { color: var(--black); }

.catalog-shell { padding: 44px 5vw 86px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; }

.search-box {
  display: flex;
  width: min(630px, 100%);
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 34px rgba(36, 17, 29, .05);
}
.search-box:focus-within { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(244, 0, 177, .1); }
.search-box > span { color: var(--magenta); font-size: 1.5rem; }
.search-box input { width: 100%; height: 54px; border: 0; outline: 0; color: var(--black); background: transparent; }
.search-box input::placeholder { color: #9c9198; }
.result-count { flex: none; margin: 0; color: var(--muted); font-size: .85rem; }

.saga-filter {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 35px;
}

.saga-filter-label {
  flex: none;
  color: var(--black);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.saga-dropdown {
  position: relative;
  width: min(430px, 100%);
}

.saga-dropdown-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--black);
  background: white;
  box-shadow: 0 10px 34px rgba(36, 17, 29, .05);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 800;
  text-align: left;
}

.saga-dropdown-button:hover,
.saga-dropdown-button[aria-expanded="true"] {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(244, 0, 177, .1);
}

.saga-dropdown-chevron {
  color: var(--magenta);
  font-size: 1.25rem;
  transition: transform .18s ease;
}

.saga-dropdown-button[aria-expanded="true"] .saga-dropdown-chevron { transform: rotate(180deg); }

.saga-dropdown-panel {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 22px 60px rgba(46, 22, 37, .18);
}

.saga-search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.saga-search-box:focus-within { border-color: var(--magenta); }
.saga-search-box > span { color: var(--magenta); font-size: 1.2rem; }
.saga-search-box input { width: 100%; height: 43px; border: 0; outline: 0; color: var(--black); background: transparent; }

.saga-options {
  display: grid;
  gap: 3px;
  max-height: 310px;
  margin-top: 8px;
  overflow-y: auto;
  scrollbar-color: var(--magenta) #f3eaf0;
  scrollbar-width: thin;
}

.saga-option {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #62565e;
  background: white;
  cursor: pointer;
  font-size: .8rem;
  text-align: left;
}

.saga-option:hover { color: var(--magenta-dark); background: var(--soft); }
.saga-option.active { color: white; background: var(--magenta); font-weight: 900; }
.saga-no-results { margin: 12px 4px 4px; color: var(--muted); font-size: .8rem; text-align: center; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.design-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 9px 28px rgba(46, 22, 37, .07);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.design-card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(46, 22, 37, .12); }
.design-card.is-selected { border-color: var(--magenta); box-shadow: 0 0 0 2px rgba(244, 0, 177, .13), 0 16px 38px rgba(46, 22, 37, .1); }

.card-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f7f4f6;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.card-image-button img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.design-card:hover img { transform: scale(1.025); }

.card-body { padding: 15px 15px 17px; }
.card-saga { color: var(--magenta-dark); font-size: .66rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.card-title { margin: 7px 0 13px; overflow: hidden; color: var(--black); font-size: .96rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-code { color: var(--muted); font: 800 .74rem/1 monospace; letter-spacing: .05em; }

.add-button {
  min-width: 138px;
  padding: 9px 12px;
  border: 1px solid var(--magenta);
  border-radius: 999px;
  color: var(--magenta-dark);
  background: white;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 900;
}
.add-button:hover { color: white; background: var(--magenta); }
.add-button.is-added { border-color: var(--black); color: white; background: var(--black); }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}
.button:hover { filter: brightness(.97); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { color: white; background: var(--magenta); }
.button-primary.is-added { background: var(--black); }
.button-secondary { border-color: var(--line); color: var(--black); background: white; }
.button-whatsapp { color: #072012; background: var(--green); }
.button-email { color: #04222d; background: var(--cyan); }
.button-quiet { border-color: var(--line); color: var(--muted); background: #fff; }
.button.is-disabled { opacity: .45; pointer-events: none; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 38px; }
.empty-state { padding: 80px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--soft); text-align: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { margin-bottom: 8px; color: var(--black); font-size: 1.2rem; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 28px 5vw;
  border-top: 1px solid var(--line);
  background: #fff8fc;
}
footer img { width: 120px; height: 76px; object-fit: contain; }
footer div { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; color: var(--muted); font-size: .78rem; }
footer strong { color: var(--black); }
footer a { color: var(--magenta-dark); font-weight: 800; }

.preview-dialog, .order-dialog {
  width: min(1060px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: white;
  box-shadow: 0 30px 90px rgba(38, 13, 29, .22);
  overflow: hidden;
}
.preview-dialog::backdrop, .order-dialog::backdrop { background: rgba(27, 8, 21, .55); backdrop-filter: blur(7px); }
.dialog-close { position: absolute; z-index: 3; top: 13px; right: 13px; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--black); background: rgba(255,255,255,.94); cursor: pointer; font-size: 1.55rem; }

.dialog-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); min-height: 600px; }
.dialog-image-wrap { display: grid; min-height: 0; place-items: center; padding: 24px; background: #f7f3f6; }
.dialog-image-wrap img { display: block; max-width: 100%; max-height: calc(100vh - 78px); object-fit: contain; border-radius: 8px; }
.dialog-info { display: flex; flex-direction: column; justify-content: center; padding: 46px 34px; border-left: 1px solid var(--line); }
.dialog-saga { color: var(--magenta-dark); font-size: .72rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.dialog-info h2 { margin: 10px 0 25px; color: var(--black); font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.05; }
.design-code { padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.design-code span, .design-code strong { display: block; }
.design-code span { margin-bottom: 7px; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.design-code strong { color: var(--black); font: 900 1.35rem/1 monospace; letter-spacing: .08em; }
.dialog-info p { margin: 24px 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.dialog-info .button + .button { margin-top: 10px; }

.order-dialog { width: min(820px, calc(100vw - 30px)); overflow-y: auto; }
.order-layout { padding: 42px; }
.order-header { padding-right: 50px; }
.order-header .eyebrow { margin-bottom: 8px; }
.order-header h2 { margin: 0; color: var(--black); font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; }
.order-header > p:last-child { margin: 12px 0 24px; color: var(--muted); }
.order-empty { display: grid; min-height: 150px; place-items: center; align-content: center; padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--soft); text-align: center; }
.order-empty strong { margin-bottom: 8px; color: var(--black); font-size: 1.05rem; }
.order-list { display: grid; gap: 10px; max-height: 340px; overflow-y: auto; }
.order-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; }
.order-item img { display: block; width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: #f5f1f4; }
.order-item-info { min-width: 0; }
.order-item-info strong, .order-item-info span { display: block; }
.order-item-info strong { overflow: hidden; color: var(--black); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.order-item-info span { margin-top: 4px; color: var(--muted); font-size: .73rem; }
.remove-order-item { padding: 8px 10px; border: 0; color: var(--magenta-dark); background: transparent; cursor: pointer; font-size: .72rem; font-weight: 900; }

.order-form { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; margin-top: 22px; }
.order-form label > span { display: block; margin-bottom: 7px; color: var(--black); font-size: .76rem; font-weight: 900; }
.order-form input, .order-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--black); background: white; }
.order-form input { height: 48px; padding: 0 13px; }
.order-form textarea { min-height: 92px; padding: 12px 13px; resize: vertical; }
.order-form input:focus, .order-form textarea:focus { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(244,0,177,.1); }
.order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.order-actions .button-quiet { grid-column: 1 / -1; }
.order-note { margin: 14px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; text-align: center; }

.toast {
  position: fixed;
  z-index: 60;
  right: 18px;
  bottom: 18px;
  padding: 13px 16px;
  border-radius: 10px;
  color: white;
  background: var(--black);
  box-shadow: 0 14px 45px rgba(0,0,0,.25);
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  font-size: .85rem;
  font-weight: 900;
}
.toast.visible { transform: translateY(0); opacity: 1; }

@media (max-width: 1080px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-badge { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); min-height: 590px; }
  .hero-art { min-height: 450px; margin-bottom: -56px; }
  .hero-art img { max-height: 560px; }
}

@media (max-width: 780px) {
  .site-header { min-height: 76px; padding-top: 3px; padding-bottom: 3px; }
  .brand img { width: 105px; height: 64px; }
  .brand-section { display: none; }
  .order-button { min-height: 42px; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 12px; padding-top: 62px; }
  .hero-art { min-height: 390px; margin: -8px 0 -52px; }
  .hero-art::before { width: min(76vw, 420px); }
  .hero-art img { width: min(88vw, 410px); max-height: 500px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .result-count { padding-left: 2px; }
  .saga-filter { align-items: stretch; flex-direction: column; gap: 8px; }
  .saga-dropdown { width: 100%; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 12px; }
  .card-footer { align-items: stretch; flex-direction: column; }
  .add-button { width: 100%; }
  footer { align-items: flex-start; }
  footer div { align-items: flex-start; }
  .dialog-layout { display: block; overflow-y: auto; max-height: calc(100vh - 30px); }
  .dialog-image-wrap { min-height: 55vh; }
  .dialog-image-wrap img { max-height: 53vh; }
  .dialog-info { border-top: 1px solid var(--line); border-left: 0; }
  .order-layout { padding: 34px 20px 24px; }
  .order-form { grid-template-columns: 1fr; }
}

@media (max-width: 470px) {
  .site-header { padding-left: 14px; padding-right: 14px; }
  .brand img { width: 92px; height: 58px; }
  .order-button { padding-left: 14px; font-size: .78rem; }
  .hero { padding-left: 18px; padding-right: 18px; }
  .hero-accent { display: none; }
  .hero-art { min-height: 340px; margin-top: 0; margin-bottom: -44px; }
  .hero-art::after { right: 3%; bottom: 12%; width: 72px; height: 72px; }
  .hero-art img { width: min(94vw, 360px); max-height: 440px; }
  h1 { font-size: 2.72rem; line-height: .92; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats span:last-child { grid-column: 1 / -1; }
  .catalog-shell { padding-left: 12px; padding-right: 12px; }
  .card-title { font-size: .84rem; }
  .order-actions { grid-template-columns: 1fr; }
  .order-actions .button-quiet { grid-column: auto; }
  .order-item { grid-template-columns: 58px minmax(0, 1fr); }
  .order-item img { width: 58px; height: 58px; }
  .remove-order-item { grid-column: 2; justify-self: start; padding-left: 0; }
  footer { flex-direction: column; }
}

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