/* Lomas Tienda + Product cards – estilo web anterior, fuente Sora */
.lomas-tienda {
  --lomas-red: #d00000;
  --lomas-red-dark: #a00000;
  --lomas-black: #0f0e0e;
  --lomas-gray: #4b4a4b;
  --lomas-text: #0f0e0e;
  --lomas-muted: #4b4a4b;
  --lomas-border: rgba(15, 14, 14, 0.12);
  --lomas-radius: 8px;
  --lomas-rossa: #d00000;
  --lomas-vermilion: #d00000;
  --lomas-xiketic: #0f0e0e;
  font-family: "Sora", system-ui, sans-serif;
  color: var(--lomas-text);
  padding: 1.25rem 0 4rem;
  background: #fff;
}

.lomas-tienda *,
.lomas-tienda *::before,
.lomas-tienda *::after { box-sizing: border-box; }

.lomas-tienda-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.lomas-tienda-panel { display: none; }
.lomas-tienda-panel.is-active { display: block; }

.lomas-tienda-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

@media (max-width: 992px) {
  .lomas-tienda-layout { grid-template-columns: 1fr; }
}

.lomas-tienda-sidebar {
  background: #fafafa;
  border-radius: var(--lomas-radius);
  padding: 1.25rem;
  border: 1px solid var(--lomas-border);
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky;
  top: 100px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.lomas-tienda-sidebar::-webkit-scrollbar {
  width: 8px;
}
.lomas-tienda-sidebar::-webkit-scrollbar-thumb {
  background: rgba(15, 14, 14, 0.25);
  border-radius: 8px;
}
.lomas-tienda-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 992px) {
  .lomas-tienda-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.lomas-tienda-search { margin-bottom: 1.25rem; }

.lomas-tienda .lomas-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border: 1px solid var(--lomas-border);
  border-radius: var(--lomas-radius);
}

.lomas-tienda .lomas-search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 1rem;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  font-family: inherit;
}

.lomas-tienda .lomas-search-input:focus { outline: none; }

.lomas-tienda .lomas-search-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--lomas-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lomas-tienda .lomas-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--lomas-border);
  border-radius: var(--lomas-radius);
  box-shadow: 0 2px 16px rgba(15, 14, 14, 0.08);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.lomas-tienda .lomas-search-dropdown.is-open { display: block; }

.lomas-tienda-filter-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
}
.lomas-tienda-filter-title:first-child { margin-top: 0; }

.lomas-tienda-filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lomas-tienda-filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.lomas-tienda-filter-item input { margin: 0; }
.lomas-tienda-filter-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--lomas-muted);
}

.lomas-tienda-filter-marcas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
}

.lomas-tienda-marca-card { cursor: pointer; display: block; }
.lomas-tienda-marca-card input { display: none; }

.lomas-tienda-marca-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: #fff;
  border: 2px solid var(--lomas-border);
  border-radius: var(--lomas-radius);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 70px;
}

.lomas-tienda-marca-card input:checked + .lomas-tienda-marca-inner {
  border-color: var(--lomas-rossa);
  box-shadow: 0 0 0 1px var(--lomas-rossa);
}

.lomas-tienda-marca-inner img {
  max-height: 36px !important;
  max-width: 60px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.lomas-tienda-marca-inner span {
  font-size: 0.7rem;
  text-align: center;
}

.lomas-tienda-filter-tipos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lomas-tienda-tipo-card { cursor: pointer; }
.lomas-tienda-tipo-card input { display: none; }

.lomas-tienda-tipo-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 2px solid var(--lomas-border);
  border-radius: var(--lomas-radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.lomas-tienda-tipo-card input:checked + .lomas-tienda-tipo-inner {
  border-color: var(--lomas-rossa);
  background: rgba(208, 0, 0, 0.06);
}

.lomas-tienda-tipo-img {
  width: 28px !important;
  height: 28px !important;
  object-fit: cover;
  border-radius: 4px;
}

.lomas-tienda-modelos-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--lomas-border);
}

.lomas-tienda-modelo-grupo { margin-bottom: 1rem; }
.lomas-tienda-modelo-grupo-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.lomas-tienda-empty,
.lomas-tienda-loading {
  text-align: center;
  padding: 2rem;
  color: var(--lomas-muted);
}

.lomas-tienda-main { position: relative; z-index: 0; min-height: 200px; }

/* ========== Cards ========== */
.lomas-productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  min-height: 200px;
}

@media (max-width: 576px) {
  .lomas-productos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.lomas-producto-card {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: var(--lomas-text);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--lomas-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
  font-family: "Sora", system-ui, sans-serif;
}

.lomas-producto-card:hover {
  border-color: rgba(208, 0, 0, 0.3);
  box-shadow: 0 8px 24px rgba(208, 0, 0, 0.12);
  color: var(--lomas-text);
}

.lomas-producto-img-wrap {
  position: relative;
  aspect-ratio: 1.1;
  overflow: hidden;
  background: #f8f8f8;
}

.lomas-producto-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 1;
  gap: 0.35rem;
}

.lomas-producto-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lomas-producto-badge-tipo {
  background: var(--lomas-xiketic);
  color: #fff;
}

.lomas-producto-badge-cat {
  background: var(--lomas-vermilion);
  color: #fff;
}

.lomas-producto-img-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  max-width: none !important;
}

.lomas-producto-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1.1;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}

.lomas-producto-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lomas-producto-sku {
  font-size: 0.75rem;
  color: var(--lomas-muted);
  margin-bottom: 0.25rem;
}

.lomas-producto-name {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.3;
}

.lomas-producto-desc {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--lomas-muted);
  line-height: 1.4;
}

.lomas-producto-marca-wrap { margin: 0.5rem 0; }
.lomas-producto-marca-wrap img {
  max-height: 28px !important;
  max-width: 80px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.lomas-producto-compat {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--lomas-muted);
}

.lomas-producto-cta {
  display: inline-block;
  width: 100%;
  margin-top: auto;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, #d00000 0%, #dc2f02 100%);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  border-radius: 10px;
  transition: opacity 0.2s;
}

.lomas-producto-card:hover .lomas-producto-cta { opacity: 0.92; }

@media (max-width: 576px) {
  .lomas-producto-info { padding: 0.65rem 0.5rem; }
  .lomas-producto-name { font-size: 0.9rem; }
  .lomas-producto-desc { display: none; }
  .lomas-producto-cta { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
}

/* Ocultar UI Woo default en tienda Lomas */
body.lomas-tienda-page .woocommerce-products-header,
body.lomas-tienda-page ul.products,
body.lomas-tienda-page .woocommerce-result-count,
body.lomas-tienda-page .woocommerce-ordering,
body.lomas-tienda-page .woocommerce-notices-wrapper {
  display: none !important;
}
