* {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6f6f6f;
  --line: #eeeeee;
  --soft: #f7f7f7;
  --accent: #c4d6ce;
  --accent-dark: #95aea2;
  --danger: #b45b5b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 0 38px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: 8px;
  font-size: 13px;
  font-weight: 600;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.nav a {
  color: #222;
}

.cart-btn,
.menu-btn {
  border: 0;
  background: transparent;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cart-btn span,
.floating-cart span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  color: white;
  font-size: 11px;
  margin-left: 6px;
}

.menu-btn {
  display: none;
  font-size: 22px;
  letter-spacing: 0;
}

.hero {
  min-height: 620px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f4f4f4;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 35% 45%, rgba(0, 0, 0, 0.10), transparent 24%),
    linear-gradient(135deg, #ffffff, #f2f2f2);
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 60px 20px;
}

.hero-logo {
  width: min(430px, 82vw);
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  margin-bottom: 24px;
}

.kicker,
.small-title {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 7px;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 74px);
  letter-spacing: 14px;
  font-weight: 400;
}

.hero-text {
  max-width: 620px;
  margin: 20px auto 32px;
  color: #444;
  line-height: 1.8;
}

.primary-link,
.primary-btn,
.secondary-btn,
.clear-btn,
.whatsapp-link,
.danger-btn {
  border: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 0;
  letter-spacing: 1.8px;
  font-size: 12px;
  text-transform: uppercase;
}

.primary-link,
.primary-btn,
.whatsapp-link {
  background: var(--accent);
  color: #111;
}

.primary-link:hover,
.primary-btn:hover,
.whatsapp-link:hover {
  background: var(--accent-dark);
}

.secondary-btn,
.clear-btn {
  background: #eeeeee;
  color: #111;
}

.danger-btn {
  background: var(--danger);
  color: white;
}

.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 720px;
}

.filters {
  border-right: 1px solid var(--line);
  padding: 36px 24px;
  background: white;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filters-head h3 {
  margin: 0;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-size: 13px;
}

.filters-head button {
  display: none;
  border: 0;
  background: transparent;
  font-size: 28px;
}

.search-label,
.product-form label,
.checkout-form label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #333;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #dddddd;
  background: white;
  color: #111;
  padding: 13px 14px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #111;
}

details {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

summary {
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
}

summary::-webkit-details-marker {
  display: none;
}

.check-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.check-list label,
details label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #333;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: none;
}

.check-list input,
details input {
  width: auto;
}

.admin-access {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.products-section {
  padding: 36px 44px 80px;
}

.section-head,
.admin-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 36px;
}

.section-head h2,
.info-section h2,
.contact-section h2,
.admin-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: 4px;
}

.section-head select {
  max-width: 230px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 32px 26px;
}

.product-card {
  background: white;
  min-width: 0;
  position: relative;
}

.product-image-wrap {
  background: #fafafa;
  aspect-ratio: 1 / 1.18;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 22px;
  transition: transform .3s ease;
}

.product-card:hover img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #111;
  color: white;
  padding: 7px 10px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.heart {
  position: absolute;
  top: 13px;
  right: 13px;
  background: white;
  border: 1px solid #eee;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.product-info {
  padding: 18px 0 0;
}

.product-brand {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.product-name {
  min-height: 48px;
  font-size: 14px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  line-height: 1.55;
}

.product-description {
  color: var(--muted);
  line-height: 1.6;
  min-height: 46px;
  font-size: 13px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0;
}

.price {
  font-size: 20px;
}

.old-price {
  color: #888;
  text-decoration: line-through;
}

.add-btn {
  width: 100%;
  border: 0;
  background: var(--accent);
  min-height: 56px;
  letter-spacing: 1.5px;
}

.add-btn:hover {
  background: var(--accent-dark);
}

.add-btn:disabled {
  background: #ddd;
  color: #777;
  cursor: not-allowed;
}

.info-section,
.contact-section,
.admin-section {
  padding: 90px 8vw;
  border-top: 1px solid var(--line);
}

.steps {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.steps article {
  background: var(--soft);
  padding: 32px;
}

.steps span {
  color: var(--muted);
  letter-spacing: 5px;
}

.steps h3 {
  letter-spacing: 2px;
  text-transform: uppercase;
}

.steps p,
.contact-section p,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(440px, 92vw);
  height: 100vh;
  background: white;
  box-shadow: var(--shadow);
  transform: translateX(110%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
  letter-spacing: 3px;
  font-weight: 300;
}

.drawer-head button {
  border: 0;
  background: transparent;
  font-size: 28px;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 20px 24px;
}

.cart-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.cart-item img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: #fafafa;
}

.cart-item h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.qty-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.qty-controls button,
.remove-cart {
  border: 1px solid #ddd;
  background: white;
  min-width: 30px;
  height: 30px;
}

.remove-cart {
  color: var(--danger);
}

.cart-summary {
  padding: 24px;
  border-top: 1px solid var(--line);
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 18px;
}

.cart-summary button {
  width: 100%;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.35);
  display: none;
}

.overlay.show {
  display: block;
}

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
}

.modal-card {
  width: min(720px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: white;
  box-shadow: var(--shadow);
}

.checkout-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.admin-login,
.admin-panel {
  max-width: 1160px;
  margin: 0 auto;
}

.login-row {
  display: flex;
  gap: 12px;
  max-width: 540px;
}

.login-row button {
  min-width: 130px;
  border: 0;
  background: #111;
  color: white;
}

.product-form {
  background: var(--soft);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.product-form small {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-products {
  margin-top: 36px;
}

.admin-product-item,
.admin-order-item {
  background: white;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  align-items: center;
}

.admin-product-item img {
  width: 90px;
  height: 90px;
  background: #fafafa;
  object-fit: contain;
}

.admin-product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-product-actions button {
  border: 1px solid #ddd;
  background: white;
  min-height: 38px;
  padding: 0 14px;
}

.floating-cart {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  border: 0;
  background: #111;
  color: white;
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 40px;
  background: var(--soft);
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 0 18px;
  }

  .menu-btn {
    display: block;
  }

  .brand {
    letter-spacing: 3px;
    font-size: 11px;
  }

  .nav {
    display: none;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: min(330px, 90vw);
    height: 100vh;
    overflow: auto;
    transform: translateX(-110%);
    transition: transform .25s ease;
    box-shadow: var(--shadow);
  }

  .filters.open {
    transform: translateX(0);
  }

  .filters-head button {
    display: block;
  }

  .products-section {
    padding: 30px 18px 80px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(145px, 1fr));
    gap: 28px 18px;
  }

  .section-head,
  .admin-top {
    align-items: stretch;
    flex-direction: column;
  }

  .steps,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .login-row {
    flex-direction: column;
  }

  .floating-cart {
    display: inline-flex;
  }

  h1 {
    letter-spacing: 7px;
  }

  .admin-product-item,
  .admin-order-item {
    grid-template-columns: 72px 1fr;
  }

  .admin-product-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 520px;
  }

  .topbar {
    height: 68px;
    gap: 10px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand span {
    display: none;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 64px 1fr auto;
  }
}


/* Ajustes pedidos: hero más compacto y contacto destacado */
.hero {
  min-height: 52vh;
  padding: 26px 0 42px;
}

.hero-content {
  padding: 36px 20px;
}

.hero-logo {
  width: min(300px, 55vw);
  margin-bottom: 18px;
}

.hero .kicker {
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 58px);
}

.hero-text {
  margin: 14px auto 24px;
}

.nav .nav-contact {
  background: var(--accent);
  padding: 13px 20px;
  border-radius: 999px;
  color: #111;
}

.nav .nav-contact:hover {
  background: var(--accent-dark);
}

.form-grid-inner {
  display: contents;
}

.decant-price-fields {
  display: contents;
}

.variant-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 8px;
}

.variant-options button {
  border: 1px solid #dddddd;
  background: white;
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.variant-options button.active {
  background: #111;
  color: white;
  border-color: #111;
}

.product-type-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 54vh;
  }

  .hero-logo {
    width: min(245px, 72vw);
  }

  .hero h1 {
    letter-spacing: 6px;
  }
}


/* V5: estrellas, admin discreto y celulares compactos */
.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 16px;
}

.stars {
  display: inline-flex;
  gap: 2px;
  line-height: 1;
}

.star {
  position: relative;
  display: inline-block;
  font-size: 18px;
  color: #d7d7d7;
}

.star::before {
  content: "★";
}

.star-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: #f4c430;
  width: var(--fill, 0%);
}

.star-fill::before {
  content: "★";
}

.rating-count {
  color: #9a9a9a;
  font-size: 12px;
}

.admin-login-minimal {
  max-width: 260px;
  margin: 0 auto;
  padding: 8px 0;
}

.admin-secret-row {
  display: flex;
  gap: 6px;
  opacity: 0.55;
}

.admin-secret-row input {
  height: 34px;
  padding: 6px 10px;
  border-color: #e6e6e6;
  font-size: 12px;
}

.admin-secret-row button {
  width: 42px;
  border: 1px solid #e6e6e6;
  background: #f5f5f5;
  color: #555;
}

.admin-access.hidden {
  display: none !important;
}

/* Solo celular: más productos en pantalla. No cambia PC. */
@media (max-width: 560px) {
  .products-section {
    padding: 22px 10px 72px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
  }

  .product-image-wrap {
    aspect-ratio: 1 / 1.05;
  }

  .product-image-wrap img {
    padding: 12px;
  }

  .product-badge {
    top: 8px;
    left: 8px;
    padding: 5px 7px;
    font-size: 8px;
    letter-spacing: 1.2px;
  }

  .heart {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .product-info {
    padding-top: 12px;
  }

  .product-brand {
    font-size: 10px;
    margin-bottom: 7px;
  }

  .product-name {
    min-height: 38px;
    font-size: 12px;
    letter-spacing: 1.8px;
    line-height: 1.45;
  }

  .product-type-label {
    font-size: 9px;
    letter-spacing: 1.6px;
  }

  .variant-options {
    gap: 6px;
    margin: 9px 0 5px;
  }

  .variant-options button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 10px;
    letter-spacing: 1px;
  }

  .product-description {
    min-height: 0;
    font-size: 11px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .price-row {
    margin: 12px 0 8px;
  }

  .price {
    font-size: 16px;
  }

  .old-price {
    font-size: 12px;
  }

  .rating-row {
    margin: 6px 0 10px;
    gap: 5px;
  }

  .star {
    font-size: 13px;
  }

  .rating-count {
    font-size: 10px;
  }

  .add-btn {
    min-height: 40px;
    font-size: 11px;
    letter-spacing: 0.6px;
  }

  .floating-cart {
    transform: scale(0.88);
    transform-origin: right bottom;
  }

  .section-head h2 {
    font-size: 26px;
  }
}

@media (max-width: 380px) {
  .products-grid {
    gap: 20px 10px;
  }

  .add-btn {
    font-size: 10px;
  }

  .variant-options button {
    padding: 0 7px;
  }
}


/* V7: asegurar 4 productos por fila en PC y filas continuas */
@media (min-width: 901px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(210px, 1fr)) !important;
  }
}


/* V8: presentación principal más pequeña */
.hero {
  min-height: 34vh !important;
  padding: 14px 0 24px !important;
}

.hero-content {
  padding: 18px 20px !important;
}

.hero-logo {
  width: min(155px, 38vw) !important;
  margin-bottom: 12px !important;
}

.hero .kicker {
  margin-bottom: 12px !important;
  font-size: 10px !important;
  letter-spacing: 5px !important;
}

.hero h1 {
  font-size: clamp(24px, 3.1vw, 42px) !important;
  letter-spacing: 10px !important;
}

.hero-text {
  margin: 10px auto 18px !important;
  font-size: 13px !important;
}

.primary-link {
  min-height: 40px !important;
  padding: 0 22px !important;
  font-size: 11px !important;
}

@media (max-width: 900px) {
  .hero {
    min-height: 36vh !important;
  }

  .hero-logo {
    width: min(135px, 42vw) !important;
  }

  .hero h1 {
    font-size: clamp(24px, 7vw, 36px) !important;
    letter-spacing: 6px !important;
  }
}
