:root {
  --deunzo-primary: #0b6e00;
  --deunzo-secondary: #0054cd;
  --deunzo-text: #111c2d;
  --deunzo-muted: #5c6570;
  --deunzo-border: #dfe3e8;
  --deunzo-soft: #f5f6f8;
  --deunzo-hover: #f3f4f6;
  --deunzo-page-bg: #e8ebf0;
  --deunzo-page-bg-soft: #eef1f5;
  --deunzo-surface: #ffffff;
}

html,
body {
  background-color: var(--deunzo-page-bg);
  background-image:
    radial-gradient(ellipse 110% 70% at 50% -15%, rgba(255, 255, 255, 0.72) 0%, transparent 55%),
    linear-gradient(180deg, var(--deunzo-page-bg-soft) 0%, var(--deunzo-page-bg) 100%);
  color: var(--deunzo-text);
  font-family: Inter, system-ui, sans-serif;
  min-height: 100%;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
}

.page-main {
  padding-top: 84px;
  min-height: calc(100vh - 84px);
}

.page-main.page-main-store {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

#site-header {
  top: var(--demo-banner-height, 0px);
  background: var(--deunzo-surface);
  border-bottom: 1px solid var(--deunzo-border);
  box-shadow: 0 1px 0 rgba(17, 28, 45, 0.04);
}

.brand-name {
  color: var(--deunzo-primary);
  letter-spacing: 0.04em;
}

.nav-link {
  color: var(--deunzo-muted);
  font-size: 13px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--deunzo-text);
}

.search-pill {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 4px 4px 4px 18px;
  border-radius: 9999px;
  background: var(--deunzo-soft);
}

.search-pill input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--deunzo-text);
  font-size: 14px;
}

.search-pill input:focus {
  outline: none;
  box-shadow: none;
}

.search-pill input::placeholder {
  color: #9aa3ad;
}

.search-pill .search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: var(--deunzo-primary);
  color: #ffffff;
}

.location-btn {
  color: var(--deunzo-text);
}

.hide-scrollbar {
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.store-row-card:hover {
  background: var(--deunzo-hover);
}

.store-cover-gradient {
  background: linear-gradient(180deg, rgba(17, 28, 45, 0.08) 0%, rgba(17, 28, 45, 0.72) 100%);
}

.store-carousel-track {
  scroll-padding-left: 0.25rem;
  scroll-padding-right: 0.25rem;
}

.store-cover-card-inner {
  transform: translateZ(0);
}

.store-cover-media {
  height: 14rem;
}

.store-detail-hero-media {
  height: 18rem;
}

.page-main.page-main-home {
  padding-top: 76px;
}

.home-layout {
  display: block;
}

.home-sidebar {
  display: block;
  margin-bottom: 1.5rem;
  border: 1px solid var(--deunzo-border);
  border-radius: 1.35rem;
  background: var(--deunzo-surface);
  padding: 1.1rem 0.75rem;
  box-shadow: 0 8px 28px rgba(17, 28, 45, 0.06);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.home-content {
  min-width: 0;
}

.home-sidebar-title {
  margin: 0 0 0.75rem;
  padding: 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deunzo-muted);
}

.home-sidebar-nav {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
}

.home-sidebar > .home-sidebar-title {
  display: none;
}

.home-filters {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
  overflow: hidden;
}

.home-filters-title {
  margin-top: 0;
}

.home-filter-group {
  margin: 0;
  padding: 0 0.35rem;
  border: 0;
  min-width: 0;
  max-width: 100%;
}

.home-filter-legend {
  margin-bottom: 0.55rem;
  padding: 0;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--deunzo-text);
}

.home-filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 14rem;
  overflow-y: auto;
  min-width: 0;
}

.home-filter-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 0.75rem;
  padding: 0.45rem 0.55rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--deunzo-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.home-filter-option:hover {
  background: var(--deunzo-hover);
  color: var(--deunzo-text);
}

.home-filter-option:has(input:checked) {
  background: rgba(11, 110, 0, 0.08);
  color: var(--deunzo-primary);
}

.home-filter-option input {
  accent-color: var(--deunzo-primary);
  margin: 0;
  flex-shrink: 0;
}

.home-price-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.home-price-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--deunzo-muted);
}

.home-price-field input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.5rem;
  box-sizing: border-box;
  border: 1px solid var(--deunzo-border);
  border-radius: 0.75rem;
  padding: 0.55rem 0.7rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--deunzo-text);
  background: #fff;
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Evita que el plugin forms de Tailwind fuerce anchos/alturas desproporcionados */
.home-filters input[type='number'] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 2.5rem !important;
  height: 2.5rem !important;
  padding: 0.55rem 0.7rem !important;
  font-size: 0.88rem !important;
  line-height: 1.3 !important;
}

.home-price-field input::-webkit-outer-spin-button,
.home-price-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.home-price-field input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.72rem;
}

.home-price-field input:focus {
  outline: 2px solid rgba(11, 110, 0, 0.28);
  outline-offset: 1px;
  border-color: var(--deunzo-primary);
}

.home-filters-clear {
  margin-top: 0.65rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--deunzo-border);
  border-radius: 999px;
  background: #fff;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--deunzo-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.home-filters-clear:hover {
  background: var(--deunzo-hover);
  color: var(--deunzo-text);
}

.home-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.home-products-skeleton {
  min-height: 260px;
  border-radius: 1.1rem;
  background: linear-gradient(90deg, #e8edf3 25%, #f4f7fb 50%, #e8edf3 75%);
  background-size: 200% 100%;
  animation: home-skeleton-shine 1.2s ease-in-out infinite;
}

@keyframes home-skeleton-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.home-product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--deunzo-border);
  border-radius: 1.1rem;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(17, 28, 45, 0.08);
}

.home-product-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f5f9;
}

.home-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-product-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  padding: 0.25rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--deunzo-text);
}

.home-product-discount {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border-radius: 0.45rem;
  background: #fbbf24;
  padding: 0.2rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: #1f2937;
}

.home-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem 1rem;
}

.home-product-vendor {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--deunzo-muted);
}

.home-product-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--deunzo-text);
}

.home-product-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.home-product-price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--deunzo-primary);
}

.home-product-price-old {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--deunzo-muted);
  text-decoration: line-through;
}

.home-product-actions {
  margin-top: 0.55rem;
}

.home-product-add {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--deunzo-primary);
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.home-product-add:hover {
  filter: brightness(1.05);
}

.home-product-add:disabled {
  cursor: not-allowed;
  background: #94a3b8;
  filter: none;
}

.home-products-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--deunzo-border);
  border-radius: 1.1rem;
  background: #f8fafc;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--deunzo-muted);
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .home-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1100px) {
  .home-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.home-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-radius: 0.9rem;
  padding: 0.72rem 0.85rem;
  color: var(--deunzo-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-sidebar-link .material-symbols-outlined {
  font-size: 1.25rem;
  color: inherit;
}

.home-sidebar-link:hover {
  background: var(--deunzo-hover);
  color: var(--deunzo-text);
  transform: translateX(2px);
}

.home-sidebar-link:focus-visible {
  outline: 2px solid var(--deunzo-primary);
  outline-offset: 2px;
}

.home-sidebar-link.is-active {
  background: rgba(11, 110, 0, 0.08);
  color: var(--deunzo-primary);
  box-shadow: inset 3px 0 0 var(--deunzo-primary);
}

@media (min-width: 1024px) {
  .page-main.page-main-home {
    max-width: 1400px;
  }

  .home-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }

  .home-sidebar {
    display: block;
    position: sticky;
    top: calc(76px + var(--demo-banner-height, 0px) + 0.75rem);
    margin-bottom: 0;
  }

  .home-sidebar-nav {
    display: flex;
  }

  .home-sidebar > .home-sidebar-title {
    display: block;
  }

  .home-filters {
    margin-top: 1.15rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--deunzo-border);
  }

  .home-filters-title {
    margin-top: 0;
  }
}

.home-hero-section {
  margin-top: -0.25rem;
}

.home-category-carousel-shell {
  isolation: isolate;
  min-height: 16.5rem;
  background: #e8edf3;
}

.home-category-carousel {
  scroll-behavior: smooth;
  min-height: 16.5rem;
}

.home-category-slide {
  min-width: 100%;
  scroll-snap-align: center;
}

.home-category-slide-media {
  height: 16.5rem;
  min-height: 16.5rem;
}

.home-category-nav-btn {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.home-category-nav-btn:hover {
  transform: translateY(-50%) scale(1.04);
}

.home-category-dot {
  height: 0.45rem;
  width: 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.25s ease, background-color 0.25s ease;
}

.home-category-dot.is-active {
  width: 1.35rem;
  background: #ffffff;
}

.home-category-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  padding: 0.2rem;
  cursor: pointer;
  text-align: center;
}

.home-category-nav-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.85rem;
  box-shadow: 0 1px 3px rgba(17, 28, 45, 0.08);
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition: outline-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-category-nav:hover .home-category-nav-thumb {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(17, 28, 45, 0.12);
}

.home-category-nav.is-active .home-category-nav-thumb {
  outline-color: var(--deunzo-primary);
  box-shadow: 0 8px 22px rgba(11, 110, 0, 0.18);
}

.home-category-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--deunzo-muted);
  transition: color 0.2s ease;
}

.home-category-nav.is-active .home-category-nav-label {
  color: var(--deunzo-text);
}

@media (min-width: 768px) {
  .store-cover-media {
    height: 16.5rem;
  }

  .store-detail-hero-media {
    height: 24rem;
  }

  .home-category-slide-media {
    height: 22rem;
  }

  .home-category-nav-label {
    font-size: 0.78rem;
  }
}

@media (min-width: 1024px) {
  .home-category-slide-media {
    height: 26rem;
  }

  .store-detail-hero-media {
    height: 26.25rem;
  }
}

.carousel-nav-btn {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.carousel-nav-btn:hover {
  transform: translateY(-1px);
}

.store-detail-hero .store-cover-gradient {
  background: linear-gradient(180deg, rgba(17, 28, 45, 0.05) 0%, rgba(17, 28, 45, 0.82) 100%);
}

.store-detail-body {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 768px) {
  .store-detail-body {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.pill-active {
  background: #111c2d;
  color: #ffffff;
}

.promo-badge {
  background: #f5c518;
  color: #111c2d;
}

#cart-drawer {
  box-shadow: -12px 0 40px rgba(17, 28, 45, 0.12);
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(92vw, 420px);
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(11, 110, 0, 0.18);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--deunzo-text);
  box-shadow: 0 14px 40px rgba(17, 28, 45, 0.14);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cart-toast.is-leaving {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.cart-toast-icon {
  color: var(--deunzo-primary);
  font-size: 1.35rem;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.cart-toast-text {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-panel {
  box-shadow: 0 16px 48px rgba(17, 28, 45, 0.12);
}

.form-control {
  width: 100%;
  border: 1px solid var(--deunzo-border);
  border-radius: 0.75rem;
  background: #ffffff;
  color: var(--deunzo-text);
  padding: 0.75rem 0.9rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--deunzo-primary);
  box-shadow: 0 0 0 3px rgba(11, 110, 0, 0.12);
}

.product-photo-trigger {
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: #f3f4f6;
}

.product-photo-trigger:hover img,
.product-photo-trigger:focus-visible img {
  transform: scale(1.04);
}

.product-photo-trigger img {
  transition: transform 0.2s ease;
}

.product-photo-gallery {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-photo-gallery.hidden {
  display: none;
}

.product-photo-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
}

.product-photo-gallery-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(960px, 100%);
  max-height: min(94vh, 920px);
  flex-direction: column;
  gap: 0.65rem;
  border-radius: 1rem;
  background: transparent;
  padding: 0.35rem;
  box-shadow: none;
}

.product-photo-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-photo-gallery-title {
  margin: 0;
  color: var(--deunzo-text);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.product-photo-gallery-close,
.product-photo-gallery-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--deunzo-border);
  border-radius: 9999px;
  background: #ffffff;
  color: var(--deunzo-text);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(17, 28, 45, 0.08);
}

.product-photo-gallery-close {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}

.product-photo-gallery-close:hover,
.product-photo-gallery-nav:hover {
  background: var(--deunzo-soft);
}

.product-photo-gallery-stage {
  position: relative;
  display: flex;
  min-height: 240px;
  flex: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.85rem;
  background: transparent;
}

.product-photo-gallery-image {
  max-width: 100%;
  max-height: min(72vh, 680px);
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 8px 28px rgba(17, 28, 45, 0.12);
}

.product-photo-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  transform: translateY(-50%);
}

.product-photo-gallery-nav.hidden {
  display: none;
}

#product-gallery-prev {
  left: 0.35rem;
}

#product-gallery-next {
  right: 0.35rem;
}

.product-photo-gallery-counter {
  margin: 0;
  color: var(--deunzo-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.product-photo-gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.product-photo-gallery-thumb {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  padding: 0;
  cursor: pointer;
  background: #ffffff;
  opacity: 0.85;
  box-shadow: 0 1px 4px rgba(17, 28, 45, 0.08);
}

.product-photo-gallery-thumb.is-active {
  border-color: var(--deunzo-primary);
  opacity: 1;
}

.product-photo-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .product-photo-gallery-panel {
    padding: 0.5rem;
  }

  .product-photo-gallery-nav {
    width: 2.75rem;
    height: 2.75rem;
  }
}
