@font-face {
  font-family: Fraunces;
  src: url("/fonts/fraunces-medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-semibold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}
:root {
  --yellow: #FDE397;
  --gold: #F7CC71;
  --honey: #EAB232;
  --ink: #482A0D;
  --paper: #FDEBC6;
  --soft: #FDE397;
  --muted: #6D4914;
  --line: #6d491433;
  --error: #a52b25;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 14px;
  font-family: Manrope, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  scrollbar-color: var(--muted) var(--soft);
  scroll-padding-top: 24px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button {
  border: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
input,
textarea {
  caret-color: var(--ink);
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
::selection {
  background: var(--yellow);
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h1,
h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
}
img {
  display: block;
  max-width: 100%;
}
svg {
  flex-shrink: 0;
}
button {
  transition: transform 140ms var(--ease);
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
}
.skip-link:focus {
  top: 10px;
}
.site-header {
  background: var(--yellow);
}
.header-inner {
  max-width: 1536px;
  margin: auto;
  min-height: 112px;
  padding: 20px 48px;
  display: flex;
  align-items: center;
  gap: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.brand span {
  font-size: 13px;
  line-height: 1.3;
}
.brand strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.header-inner nav {
  margin-left: auto;
}
.header-inner nav a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 0;
}
.nav-active {
  border-bottom: 1px solid var(--ink);
}
.header-note {
  font-size: 12px;
  max-width: 130px;
  line-height: 1.6;
  border-left: 1px solid #c7aa4c;
  padding-left: 24px;
}
.catalog-main {
  max-width: 1536px;
  margin: 0 auto;
  padding: 44px 48px 64px;
  min-height: calc(100vh - 230px);
}
.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.catalog-heading h1 {
  font-size: clamp(30px, 3.2vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.catalog-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.7;
}
.search {
  width: 350px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 50px;
  background: var(--paper);
}
.search:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none !important;
  background: transparent;
  font-size: 12px;
  padding: 16px 0;
}
.search input::placeholder {
  color: var(--muted);
}
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: 30px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 100px;
  padding: 9px 16px;
  min-height: 40px;
  font-size: 12px;
  white-space: nowrap;
}
.filter-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.sort-label {
  flex-shrink: 0;
}
.sort-label select {
  background: transparent;
  border: 0;
  padding: 11px 24px 11px 4px;
  font-size: 12px;
  cursor: pointer;
  max-width: 100%;
}
.results-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}
.results-line p {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.text-button {
  background: transparent;
  padding: 10px 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 24px;
}
.cake-card {
  min-width: 0;
}
.cake-open {
  display: block;
  width: 100%;
  background: transparent;
  padding: 0;
  text-align: left;
}
.card-photo {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
  position: relative;
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sample-label {
  display: inline-flex;
  align-items: center;
  font-family: Manrope, sans-serif;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  border-radius: 4px;
  background: var(--paper);
  padding: 6px 9px;
  color: var(--ink);
}
.card-photo .sample-label {
  position: absolute;
  top: 12px;
  left: 12px;
}
.card-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 17px;
}
.card-caption h2 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.card-caption svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  padding-top: 5px;
}
.tag-link {
  padding: 7px 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  min-height: 32px;
}
.demo-note {
  margin-top: 36px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.photo-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  padding: 20px;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 0;
  font-size: 12px;
  color: var(--muted);
}
.site-footer > span:first-child {
  color: var(--ink);
  font-weight: 600;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.empty-state {
  text-align: center;
  padding: 60px 20px 80px;
  max-width: 640px;
  margin: auto;
}
.empty-state svg {
  margin: 0 auto 20px;
  color: var(--muted);
}
.empty-state h2 {
  font-size: 30px;
}
.empty-state p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 14px;
}
.empty-state .button {
  margin-top: 24px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  min-height: 46px;
  text-decoration: none;
}
.button-secondary {
  background: var(--soft);
  color: var(--ink);
}
.button-yellow {
  background: var(--yellow);
  color: var(--ink);
}
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cake-dialog {
  padding: 0;
  width: min(1040px, calc(100vw - 48px));
  max-height: 90dvh;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px #1d100840;
}
.cake-dialog::backdrop,
.editor-dialog::backdrop {
  background: #201809a6;
}
.dialog-close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.detail-photo {
  background: var(--soft);
  min-height: 420px;
}
.detail-photo img {
  width: 100%;
  height: 78dvh;
  max-height: 800px;
  object-fit: contain;
}
.detail-copy {
  padding: 80px 38px 40px;
  align-self: center;
}
.detail-copy h2 {
  font-size: 38px;
  line-height: 1.15;
  margin: 14px 0 20px;
}
.detail-copy > p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
}
.detail-copy .detail-hint {
  font-size: 12px;
  line-height: 1.7;
}
/* Administración: comparte identidad y estilos con el catálogo. */
.admin-main {
  max-width: 1240px;
  margin: auto;
  padding: 48px;
  min-height: calc(100vh - 112px);
}
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.admin-heading h1 {
  font-size: 38px;
  letter-spacing: -0.03em;
}
.admin-heading p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 44px 0;
  align-items: start;
}
.auth-intro h1 {
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  max-width: 440px;
}
.auth-intro p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 400px;
  margin-top: 24px;
}
.auth-intro a {
  display: inline-block;
  margin-top: 30px;
  font-size: 13px;
}
.auth-form {
  max-width: 430px;
  width: 100%;
  padding-top: 8px;
}
.auth-form h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.form-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 14px;
  min-height: 48px;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}
.field small {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}
.auth-form .button {
  width: 100%;
}
.form-message {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 18px;
  color: var(--error);
  overflow-wrap: anywhere;
}
.notice {
  background: var(--soft);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 12px;
  line-height: 1.8;
  margin: 16px 0 26px;
}
.admin-list {
  display: grid;
  gap: 0;
}
.admin-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.admin-item img {
  width: 78px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.admin-item-info {
  min-width: 0;
  flex: 1;
}
.admin-item h2 {
  font-size: 23px;
  overflow-wrap: anywhere;
}
.admin-item p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 6px;
}
.admin-item-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-item-actions button {
  font-size: 12px;
  min-height: 40px;
  background: var(--soft);
  padding: 9px 13px;
  border-radius: 6px;
}
.admin-item-actions .delete-button {
  background: transparent;
  color: var(--error);
}
.status-label {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.editor-dialog {
  padding: 32px;
  width: min(660px, calc(100vw - 32px));
  max-height: 92dvh;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px #1d100840;
}
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.editor-header h2 {
  font-size: 28px;
}
.upload-area {
  border: 1px dashed #9c8b6f;
  border-radius: 10px;
  background: var(--soft);
  padding: 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.upload-area img {
  width: 100px;
  height: 110px;
  border-radius: 6px;
  object-fit: contain;
}
.upload-area .field {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.upload-area input {
  padding: 4px 0;
  border: 0;
  background: none;
  font-size: 12px;
  width: 100%;
  min-height: auto;
}
.upload-area input::file-selector-button {
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  margin-right: 10px;
  cursor: pointer;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 24px #3d270b26;
  z-index: 5;
}
.admin-loading {
  font-size: 14px;
  color: var(--muted);
  padding: 40px 0;
}
@media (hover: hover) and (pointer: fine) {
  .filter-chip:hover:not([aria-pressed="true"]) {
    background: var(--soft);
  }
  .cake-open:hover h2,
  .tag-link:hover,
  .site-footer a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .button:hover {
    filter: brightness(1.12);
  }
  .icon-button:hover {
    background: var(--yellow);
  }
  .admin-item-actions button:hover {
    background: var(--yellow);
  }
}
@media (min-width: 1600px) {
  .gallery {
    gap: 30px;
  }
  .catalog-main {
    padding-top: 52px;
  }
}
@media (max-width: 1535px) {
  .site-footer {
    margin: 0 48px;
  }
}
@media (max-width: 1100px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .header-note {
    display: none;
  }
  .catalog-heading h1 {
    font-size: 36px;
  }
  .search {
    width: 300px;
  }
  .catalog-toolbar {
    gap: 16px;
  }
  .auth-layout {
    gap: 44px;
  }
  .auth-intro h1 {
    font-size: 40px;
  }
}
@media (max-width: 760px) {
  .header-inner {
    min-height: 88px;
    padding: 14px 20px;
    gap: 20px;
  }
  .brand {
    gap: 9px;
  }
  .brand img {
    width: 48px;
    height: 48px;
  }
  .brand span {
    font-size: 12px;
  }
  .brand strong {
    font-size: 25px;
  }
  .header-inner nav a {
    font-size: 12px;
  }
  .catalog-main {
    padding: 30px 20px 40px;
  }
  .catalog-heading {
    display: block;
  }
  .catalog-heading h1 {
    font-size: 34px;
  }
  .catalog-heading p {
    font-size: 12px;
    margin-top: 10px;
  }
  .search {
    width: 100%;
    margin-top: 22px;
    min-height: 48px;
  }
  .search input {
    font-size: 16px;
    padding: 12px 0;
  }
  .catalog-toolbar {
    display: block;
    margin-top: 20px;
    padding-bottom: 12px;
  }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
  }
  .filter-chip {
    font-size: 12px;
    padding: 9px 14px;
  }
  .sort-label {
    display: block;
    text-align: right;
    margin-top: 4px;
  }
  .sort-label select {
    padding: 8px 5px;
    font-size: 12px;
  }
  .results-line {
    min-height: 45px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }
  .card-photo {
    border-radius: 10px;
  }
  .card-caption {
    padding-top: 12px;
    gap: 6px;
  }
  .card-caption h2 {
    font-size: 18px;
  }
  .card-caption svg {
    width: 17px;
    height: 17px;
    margin-top: 2px;
  }
  .card-tags {
    gap: 0 9px;
  }
  .tag-link {
    font-size: 12px;
  }
  .card-photo .sample-label {
    top: 8px;
    left: 8px;
    font-size: 12px;
    padding: 5px 7px;
  }
  .site-footer {
    margin: 0 20px;
    padding: 24px 0;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 18px;
  }
  .site-footer > span:nth-child(2) {
    display: none;
  }
  .demo-note {
    font-size: 12px;
  }
  .cake-dialog {
    width: calc(100vw - 24px);
    max-height: 94dvh;
    border-radius: 12px;
  }
  .detail-layout {
    display: block;
  }
  .detail-photo {
    min-height: 0;
  }
  .detail-photo img {
    height: 52dvh;
  }
  .detail-copy {
    padding: 26px;
  }
  .detail-copy h2 {
    font-size: 30px;
    margin-top: 12px;
  }
  .detail-copy > p {
    font-size: 13px;
  }
  .detail-tags {
    margin: 20px 0;
  }
  .admin-main {
    padding: 30px 20px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 10px 0;
  }
  .auth-intro h1 {
    font-size: 36px;
  }
  .auth-intro p {
    margin-top: 16px;
    font-size: 13px;
  }
  .auth-intro a {
    margin-top: 16px;
  }
  .auth-form {
    max-width: none;
  }
  .admin-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .admin-heading h1 {
    font-size: 32px;
  }
  .admin-heading p {
    font-size: 12px;
  }
  .admin-item {
    flex-wrap: wrap;
    gap: 14px;
  }
  .admin-item-actions {
    width: 100%;
    padding-left: 92px;
    gap: 6px;
  }
  .admin-item-actions button {
    font-size: 12px;
  }
  .admin-item h2 {
    font-size: 20px;
  }
  .editor-dialog {
    padding: 22px;
  }
  .upload-area {
    padding: 14px;
    gap: 12px;
    align-items: flex-start;
  }
  .upload-area img {
    width: 65px;
    height: 80px;
  }
  .field input,
  .field textarea {
    font-size: 16px;
  }
  .editor-header h2 {
    font-size: 25px;
  }
  .form-actions .button {
    flex: 1;
  }
}
@media (max-width: 359px) {
  .gallery {
    grid-template-columns: 1fr;
  }
  .header-inner nav a {
    font-size: 12px;
  }
  .brand strong {
    font-size: 22px;
  }
  .brand img {
    width: 40px;
    height: 40px;
  }
  .catalog-heading h1 {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  button:active {
    transform: none;
  }
}

.results-line .sort-label {
  margin-left: auto;
}
.results-line {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .header-inner:has(#logout:not([hidden])) {
    flex-wrap: wrap;
    gap: 14px;
  }
  .header-inner:has(#logout:not([hidden])) .brand {
    margin-right: auto;
  }
  .header-inner:has(#logout:not([hidden])) nav {
    margin-left: 0;
  }
  .results-line {
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 6px 0;
  }
  .results-line .text-button {
    order: 3;
  }
}

.admin-sections { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.slide-form { display: grid; gap: 20px; max-width: 720px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 32px; }
.slide-form > p { color: var(--muted); font-size: 14px; line-height: 1.7; }
#slide-preview { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: var(--yellow); border-radius: 8px; }
.slide-item > img { aspect-ratio: 2 / 1; height: auto; object-fit: contain; }
@media(max-width:600px) { .slide-form { padding: 16px; } .admin-sections .button { flex: 1; } }
