:root {
  --terracotta: #a9694c;
  --terracotta-dark: #8b5439;
  --forest: #2e4a3b;
  --forest-dark: #1f3329;
  --cream: #f3e8d3;
  --cream-bg: #faf3e7;
  --ink: #2b2420;
  --ink-soft: #5a4f45;
  --white: #ffffff;
  --card-radius: 4px;
  --shadow: 0 2px 10px rgba(43, 36, 32, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream-bg);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream-bg);
  border-bottom: 3px solid var(--forest);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.site-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wordmark-top {
  font-family: 'Bevan', serif;
  font-size: 28px;
  color: var(--forest);
}

.wordmark-vintage-img {
  height: 34px;
  width: auto;
  display: block;
}

.wordmark-bottom {
  font-family: 'Bevan', serif;
  font-size: 28px;
  color: var(--forest);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 260px;
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
}

#searchInput {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 2px solid var(--forest);
  border-radius: 999px;
  background: var(--white);
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  color: var(--ink);
}

#searchInput:focus {
  outline: none;
  border-color: var(--terracotta);
}

.item-count {
  display: none;
}

@media (max-width: 640px) {
  .header-tools { flex-wrap: wrap; }
  .search-wrap { flex: 1 1 100%; max-width: 100%; order: 2; }
  .about-btn { order: 1; }
  .buy-btn { order: 1; }
}

.about-btn {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.about-btn:hover {
  background: var(--forest);
  color: var(--white);
}

.buy-btn {
  color: var(--terracotta-dark);
  border-color: var(--terracotta);
}

.buy-btn:hover {
  background: var(--terracotta);
  color: var(--white);
}

/* ---------- Intro ---------- */

.intro {
  max-width: 720px;
  margin: 28px auto 8px;
  padding: 0 20px;
  text-align: center;
}

.intro p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Información (modal con íconos) ---------- */

.info-btn {
  color: var(--forest);
  border-color: var(--forest);
}

.info-modal {
  background: var(--white);
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  position: relative;
}

.info-modal-body {
  padding: 28px 24px 26px;
  text-align: center;
}

.info-modal-body h2 {
  font-family: 'Bevan', serif;
  color: var(--forest);
  font-size: 22px;
  margin: 0 0 6px;
}

.info-hint {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0 0 18px;
}

.info-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.info-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 16px;
  padding: 12px 4px 10px;
  cursor: pointer;
  font-family: 'Archivo', sans-serif;
  color: var(--forest);
  transition: background 0.15s, color 0.15s;
}

.info-icon span { font-size: 28px; line-height: 1; }
.info-icon small { font-size: 12px; font-weight: 600; }

.info-icon:hover,
.info-icon[aria-expanded="true"] {
  background: var(--forest);
  color: var(--white);
}

.info-panel {
  margin-top: 16px;
  padding: 14px 16px;
  border: 2px solid var(--forest);
  border-radius: 14px;
  background: var(--white);
  text-align: left;
  color: var(--ink);
}

.info-panel strong { color: var(--forest); font-size: 15px; }
.info-panel p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

.gift-btn {
  order: 3;
  color: var(--white);
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.gift-btn:hover {
  background: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
  color: var(--white);
}

.info-btn .lbl-short { display: none; }

@media (max-width: 640px) {
  .header-tools { gap: 8px; }
  .about-btn { font-size: 12px; padding: 8px 4px; flex: 1 1 0; min-width: 0; text-align: center; }
  .info-btn { flex: 0 0 auto; padding: 8px 10px; }
  .gift-btn { order: 1; flex: 1 1 100%; font-size: 13.5px; padding: 9px 10px; }
  .info-btn .lbl-full { display: none; }
  .info-btn .lbl-short { display: inline; }
}

/* ---------- Grid ---------- */

.grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  border: 1px solid rgba(43,36,32,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(43, 36, 32, 0.18);
}

.card-photo-wrap {
  aspect-ratio: 1 / 1;
  background: var(--cream);
  overflow: hidden;
}

.card-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  margin-top: auto;
  font-family: 'Bevan', serif;
  font-size: 15px;
  color: var(--terracotta-dark);
}

/* En celular: lista compacta (foto chica, título y precio) */
@media (max-width: 640px) {
  .grid { display: block; padding: 4px 20px 20px; }
  .card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid rgba(43,36,32,0.1);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .card:hover { transform: none; box-shadow: none; }
  .card-photo-wrap {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    aspect-ratio: auto;
    border-radius: var(--card-radius);
  }
  .card-body { padding: 0; gap: 3px; min-width: 0; justify-content: center; }
  .card-title { font-size: 14px; -webkit-line-clamp: 2; }
  .card-price { margin-top: 0; font-size: 14px; }
}

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 20px;
}

/* ---------- Sort bar ---------- */

.sort-bar {
  max-width: 900px;
  margin: 14px auto 0;
  padding: 4px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sort-bar label {
  font-family: 'Archivo', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.sort-bar select {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 999px;
  padding: 8px 34px 8px 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232e4a3b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.sort-bar select:focus {
  outline: none;
  border-color: var(--terracotta);
}

@media (max-width: 640px) {
  .sort-bar { justify-content: space-between; padding: 4px 20px 12px; }
  .sort-bar select { flex: 1 1 auto; }
}

/* ---------- Category sections (home overview) ---------- */

.category-sections {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 20px 20px;
}

.category-section {
  margin-bottom: 28px;
}

.category-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--forest);
}

.category-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Bevan', serif;
  font-size: 17px;
  color: var(--forest);
}

.category-section-title img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.ver-todo-btn {
  flex-shrink: 0;
  border: 1.5px solid var(--forest);
  background: transparent;
  color: var(--forest);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Archivo', sans-serif;
}

.ver-todo-btn:hover {
  background: var(--forest);
  color: var(--white);
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  cursor: pointer;
  border-bottom: 1px solid rgba(43,36,32,0.08);
}

.preview-row:last-child {
  border-bottom: none;
}

.preview-row:hover {
  background: rgba(169,105,76,0.06);
}

.preview-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--card-radius);
  object-fit: cover;
  background: var(--cream);
  flex-shrink: 0;
}

.preview-info {
  min-width: 0;
  flex: 1;
}

.preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-price {
  font-family: 'Bevan', serif;
  font-size: 13.5px;
  color: var(--terracotta-dark);
  margin-top: 2px;
}

/* ---------- About us (modal) ---------- */

.about-modal {
  background: var(--white);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  position: relative;
}

.about-inner {
  display: flex;
  align-items: stretch;
  background: var(--white);
  overflow: hidden;
}

.about-photo {
  width: 300px;
  height: auto;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.about-text {
  padding: 30px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-text h2 {
  font-family: 'Bevan', serif;
  color: var(--forest);
  font-size: 22px;
  margin: 0 0 14px;
}

.about-text p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 12px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .about-inner { flex-direction: column; }
  .about-photo { width: 100%; height: 260px; }
  .about-text { padding: 22px 20px; }
}

/* ---------- Compramos cámaras (modal) ---------- */

.buy-modal {
  background: var(--white);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  position: relative;
}

.buy-text {
  padding: 34px 36px;
}

.buy-text h2 {
  font-family: 'Bevan', serif;
  color: var(--forest);
  font-size: 22px;
  margin: 0 0 14px;
}

.buy-lead {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 16px;
}

.buy-subhead {
  color: var(--forest);
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 8px;
}

.buy-list {
  margin: 0 0 18px;
  padding-left: 20px;
}

.buy-list li {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 12px;
}

.buy-list li:last-child {
  margin-bottom: 0;
}

.buy-cta {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--cream-dark, #e6dcc6);
}

@media (max-width: 720px) {
  .buy-text { padding: 24px 20px; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 3px solid var(--forest);
  margin-top: 40px;
  padding: 22px 20px;
  text-align: center;
}

.site-footer p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer p + p {
  margin-top: 8px;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 25, 20, 0.78);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--white);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 720px) {
  .modal { grid-template-columns: 1fr; max-height: 92vh; }
  .modal-gallery { min-height: unset; }
  .modal-image { height: auto; max-height: 48vh; }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

.modal-gallery {
  position: relative;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.modal-image {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink);
  z-index: 4;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(43,36,32,0.3);
}

.gallery-dots span.active {
  background: var(--terracotta-dark);
}

.modal-info {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-info h2 {
  font-family: 'Bevan', serif;
  font-size: 20px;
  color: var(--forest);
  margin: 0 0 2px;
  line-height: 1.3;
}

.modal-price {
  font-family: 'Bevan', serif;
  font-size: 19px;
  color: var(--terracotta-dark);
  margin: 0;
}

.modal-desc {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 4px 0 8px;
}

.modal-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--forest);
  background: var(--cream);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  align-self: flex-start;
}

.modal-code {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

/* ---------- Category filter bar ---------- */

.category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 12px;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar { display: none; }

/* Dos hileras: estilo de cámara arriba, marcas abajo */
.category-bar:not(.brand-bar) { padding-bottom: 8px; }
.category-bar.brand-bar { padding-bottom: 12px; }
.brand-bar .category-pill { border-color: var(--terracotta, #a0634a); color: var(--terracotta, #a0634a); }
.brand-bar .category-pill.active { background: var(--terracotta, #a0634a); color: var(--white); }

.category-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--forest);
  background: transparent;
  color: var(--forest);
  padding: 6px 16px;
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.category-pill.active {
  background: var(--forest);
  color: var(--white);
}

.category-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--forest);
  color: var(--white);
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  margin-top: auto;
}

.whatsapp-btn:hover { background: var(--forest-dark); }


/* ---------- Íconos WhatsApp / Instagram (header) ---------- */
.social-icons { display: flex; align-items: center; gap: 10px; flex: none; order: 5; }
.social-ico {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 4px rgba(43,36,32,.25);
}
.social-ico:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(43,36,32,.3); }
.wa-ico { background: #25D366; border-radius: 50%; }
.ig-ico { background: linear-gradient(45deg, #f9a03c 0%, #e1306c 45%, #c13584 70%, #833ab4 100%); border-radius: 11px; }

/* ---------- Burbuja Lista de espera ---------- */
.wait-bubble {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--terracotta); color: var(--white); text-decoration: none;
  font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(43,36,32,.35); border: 2px solid var(--cream-bg);
}
.wait-bubble:hover { background: var(--terracotta-dark); }
.wb-short { display: none; }
@media (max-width: 640px) {
  .wb-full { display: none; }
  .wb-short { display: inline; }
  .wait-bubble { right: 12px; bottom: 12px; font-size: 13.5px; padding: 10px 15px; }
}

/* Botón Lista de espera en el header (solo compu); en celular queda la burbuja */
.wait-btn {
  order: 4; text-decoration: none; display: inline-block;
  color: var(--white); background: var(--forest); border-color: var(--forest);
}
.wait-btn:hover { background: var(--forest-dark); border-color: var(--forest-dark); color: var(--white); }
@media (min-width: 641px) {
  .wait-bubble { display: none; }
}
@media (max-width: 640px) {
  .wait-btn { display: none; }
  /* Gift Card + íconos en la misma hilera; el buscador vuelve a ocupar todo el ancho */
  .gift-btn { flex: 1 1 calc(100% - 100px); font-size: 12.5px; padding: 8px 6px; min-width: 0; white-space: nowrap; }
  .social-icons { order: 1; gap: 8px; }
  .social-ico { width: 36px; height: 36px; }
  .social-ico svg { width: 20px; height: 20px; }
  .ig-ico { border-radius: 10px; }
}

/* Compartir publicación */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.share-label { width: 100%; font-size: 13px; color: var(--ink-soft, #5a4f45); text-transform: uppercase; letter-spacing: .06em; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--forest, #2e4a3b); border: 2px solid var(--forest, #2e4a3b); border-radius: 4px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.share-btn:hover { background: var(--forest, #2e4a3b); color: #fff; }
