﻿:root {
  --bg: #f8f4f2;
  --card: #ffffff;
  --ink: #1c1716;
  --muted: #706666;
  --line: #eadfdb;
  --brand: #b94863;
  --brand-deep: #7a2b3f;
  --ok: #1f5a4a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at -10% -20%, #ffe7ef 0, transparent 50%),
    radial-gradient(1000px 600px at 110% -10%, #ffe8dc 0, transparent 52%),
    var(--bg);
  min-height: 100vh;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(transparent 96%, rgba(0, 0, 0, 0.03) 100%);
  background-size: 100% 12px;
  opacity: 0.16;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(248, 244, 242, 0.9);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: #fff;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.lang-btn.active {
  background: var(--brand);
  color: #fff;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-size: 1.03rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  border: 1px solid #ffffff99;
  box-shadow: 0 2px 10px #00000017;
}

.cart-toggle,
.checkout-btn,
.add-btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cart-toggle:hover,
.checkout-btn:hover,
.add-btn:hover { transform: translateY(-1px); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-end: 4px;
}

main {
  padding: 24px 24px 80px;
  max-width: 1220px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.hero-content,
.hero-media {
  background: #fffdfb;
  border: 1px solid var(--line);
  min-height: 340px;
}

.hero-content {
  padding: 30px;
  display: grid;
  align-content: center;
}

.hero-media {
  position: relative;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  display: block;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.12) 100%);
  pointer-events: none;
}

.hero h1 {
  font-family: "Sora", sans-serif;
  margin: 6px 0;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.08;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand-deep);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero p { color: var(--muted); }

.hero-whatsapp {
  margin-top: 10px;
  display: inline-block;
  width: fit-content;
  text-decoration: none;
  color: #fff;
  background: #1f7a45;
  border: 1px solid #1f7a45;
  padding: 10px 14px;
  font-weight: 700;
}

.featured { margin-top: 20px; margin-bottom: 8px; }
.section-head h2 { margin: 0 0 10px; font-family: "Sora", sans-serif; }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.catalog { margin-top: 22px; }

.catalog-tools {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.tool-input,
.tool-select,
.price-range input {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  background: #fff;
}

.price-range {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 10px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px #0000000f;
}

.card.compact img { height: 230px; }

.card-media-wrap { position: relative; overflow: hidden; }

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

.category-pill {
  position: absolute;
  left: 10px;
  top: 10px;
  background: #ffffffde;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid #ffffff;
}

.card h3 { margin: 0; font-family: "Sora", sans-serif; font-size: 1.02rem; }
.product-link { color: inherit; text-decoration: none; }
.product-link:hover { text-decoration: underline; }

.card p {
  margin: 0;
  color: var(--muted);
  min-height: 42px;
  font-size: 0.93rem;
}

.card-foot { display: flex; justify-content: space-between; align-items: center; }

.add-btn {
  min-width: 96px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.add-btn.added { background: var(--ok); border-color: var(--ok); }

.add-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff26;
  font-size: 0.78rem;
  padding: 0 6px;
}

.empty-note { color: var(--muted); font-weight: 600; }

.cart {
  position: fixed;
  right: 14px;
  top: 74px;
  width: min(390px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid var(--ink);
  padding: 16px;
  box-shadow: 10px 10px 0 #00000020;
}

.cart input {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
}

.cart ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 280px;
  overflow: auto;
}

.cart li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.cart-footer { margin-top: 14px; display: grid; gap: 10px; }

.status { margin: 0; color: var(--brand-deep); min-height: 1em; font-weight: 600; }

.whatsapp-btn {
  text-decoration: none;
  color: #fff;
  background: #1f7a45;
  border: 1px solid #1f7a45;
  padding: 10px 12px;
  text-align: center;
  font-weight: 700;
}

.floating-whatsapp {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 15;
  text-decoration: none;
  color: #fff;
  background: #1f7a45;
  border: 1px solid #1f7a45;
  padding: 12px 14px;
  font-weight: 700;
}

.mobile-cart-toggle {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 12px;
  font-weight: 700;
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.product-detail { margin-top: 12px; }

.detail-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}

.detail-media img {
  width: 100%;
  height: min(72vh, 700px);
  object-fit: cover;
  display: block;
}

.detail-thumbs {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 6px;
}

.thumb-btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0;
  cursor: pointer;
}

.thumb-btn.active { border-color: var(--brand); }

.thumb-btn img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  display: block;
}

.detail-content h1 { margin: 6px 0 8px; font-family: "Sora", sans-serif; }
.detail-content p { color: var(--muted); }

.hidden { display: none; }

.admin-shell { max-width: 1180px; }
.admin-card { background: #fffaf5; border: 1px solid var(--line); padding: 16px; margin-bottom: 16px; }
.admin-head-row { display: flex; justify-content: space-between; align-items: center; }
.admin-form { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; }
.admin-form textarea { grid-column: 1 / -1; min-height: 80px; }
.admin-form input,
.admin-form textarea,
#login-box input,
.admin-table input,
.admin-table textarea { width: 100%; padding: 8px; border: 1px solid var(--line); }
.table-wrap { overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th,
.admin-table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }

html[dir="rtl"] .category-pill { left: auto; right: 10px; }
html[dir="rtl"] .floating-whatsapp { left: auto; right: 14px; }
html[dir="rtl"] .cart { right: auto; left: 14px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-content,
  .hero-media,
  .hero-media img { min-height: 240px; }
  .detail-card { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .topbar { padding: 12px; }
  main { padding: 16px 12px 60px; }
  .card img { height: 240px; }
  .catalog-tools { grid-template-columns: 1fr; }
  .top-actions { gap: 6px; }
  .lang-btn { padding: 8px 8px; font-size: 0.84rem; }
  .floating-whatsapp { bottom: 72px; }
  .mobile-cart-toggle { display: inline-flex; }
  .admin-form { grid-template-columns: 1fr; }
}
