body.theme-store {
  overflow-x: hidden;
}

/* =========================
   FILTRO SUPERIOR
========================= */
.shop-filterbar {
  background: #f3f3f3;
  border: 1px solid #e4e4e4;
  border-radius: 0;
  padding: 14px 16px;
}

.shop-filterbar-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.4fr auto;
  gap: 14px;
  align-items: center;
}

.filter-box .form-select {
  height: 48px;
  border-radius: 8px;
  border-color: #d7d7d7;
  font-size: 0.98rem;
  color: #4a4a4a;
  background-color: #fff;
}

.filter-view-box {
  display: flex;
  justify-content: flex-end;
}

.shop-search-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.shop-search-input {
  flex: 1 1 auto;
}

.shop-search-input .form-control {
  height: 48px;
  border-radius: 8px;
}

.shop-search-actions {
  display: flex;
  gap: 8px;
}

.shop-search-actions .btn {
  min-width: 110px;
  height: 48px;
  border-radius: 10px;
}

/* =========================
   SELECTOR DE VISTA
========================= */
.view-switcher {
  display: inline-flex;
  gap: 8px;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 6px 8px;
}

.view-btn {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #777;
  transition: all 0.2s ease;
}

.view-btn i {
  font-size: 1rem;
  line-height: 1;
}

.view-btn span {
  font-size: 0.78rem;
  line-height: 1;
}

.view-btn:hover {
  background: #f5f7fb;
  color: #0d6efd;
}

.view-btn.active {
  background: #eef4ff;
  color: #0d6efd;
  box-shadow: inset 0 0 0 1px #b9d2ff;
}

/* =========================
   CONTENEDOR GENERAL
========================= */
.productos-view {
  display: grid;
  gap: 16px;
}

.producto-card {
  position: relative;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  overflow: hidden;
}

/* =========================
   PREVIEW HOVER
========================= */
.producto-hover-preview {
  position: fixed;
  width: 200px;
  height: 200px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  padding: 10px;
  display: none;
  z-index: 2000;
  pointer-events: none;
}

.producto-hover-preview.is-visible {
  display: block;
}

.producto-hover-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.producto-hover-preview-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.9rem;
  background: #f8f9fa;
  border-radius: 10px;
}

/* =========================
   ELEMENTOS COMPARTIDOS
========================= */
.producto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.producto-noimg {
  width: 100%;
  height: 100%;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a7a7a;
  font-size: 0.88rem;
}

.producto-sku-top {
  font-size: 0.9rem;
  line-height: 1.2;
  color: #1c2a3a;
  margin-bottom: 2px;
}

.producto-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.18;
  font-weight: 700;
  color: #0f1720;
}

.producto-title a {
  text-decoration: none;
  color: inherit;
}

.producto-subdata {
  margin-top: 6px;
}

.producto-categoria-ref {
  font-size: 0.84rem;
  color: #6a7380;
}

.producto-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.producto-icon-btn {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #ff4d4f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.1rem;
}

.producto-icon-btn--warning {
  color: #d38b00;
}

.producto-price-main {
  font-size: 1.02rem;
  line-height: 1.05;
  font-weight: 500;
  color: #111827;
  letter-spacing: -0.02em;
}

.producto-price-legend {
  font-size: 0.62rem;
  line-height: 1.2;
  color: #444;
  margin-top: 2px;
}

.producto-stock-wrap {
  margin-bottom: 10px;
}

.producto-stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 0 12px;
  border-radius: 6px;
  background: #21c45d;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.producto-stock-badge--out {
  background: #adb5bd;
}

.producto-buy-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.producto-qty-input {
  width: 78px;
  height: 40px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  background: #fff;
}

.producto-cart-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #f7f7f7;
  color: #444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.producto-cart-btn:hover:not(:disabled) {
  background: #ececec;
}

.producto-cart-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =========================
   ESTRUCTURA LISTA / GALLERY
========================= */
.producto-list-row {
  display: none;
}

.producto-gallery-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.producto-gallery-media {
  height: 220px;
  background: #f8f9fa;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.producto-gallery-media a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.producto-gallery-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  min-height: 220px;
}

.producto-gallery-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* =========================
   GALERÍA
========================= */
.productos-view--gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.productos-view--gallery .producto-gallery-card {
  display: flex;
}

.productos-view--gallery .producto-list-row {
  display: none;
}

@media (min-width: 768px) {
  .productos-view--gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .productos-view--gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* =========================
   COMPACTA
========================= */
.productos-view--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.productos-view--compact .producto-gallery-card {
  display: flex;
}

.productos-view--compact .producto-list-row {
  display: none;
}

.productos-view--compact .producto-gallery-media {
  height: 190px;
}

.productos-view--compact .producto-price-main {
  font-size: 0.96rem;
}

@media (min-width: 992px) {
  .productos-view--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* =========================
   LISTA
========================= */
.productos-view--list {
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid #dddddd;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.productos-view--list .producto-card {
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.productos-view--list .producto-card + .producto-card {
  border-top: 1px solid #d9d9d9;
}

.productos-view--list .producto-gallery-card {
  display: none;
}

.productos-view--list .producto-list-row {
  display: grid;
  grid-template-columns: 92px minmax(280px, 1fr) 220px 150px;
  align-items: center;
  gap: 16px;
  min-height: 120px;
  padding: 14px 18px;
}

.productos-view--list .producto-col--media {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.productos-view--list .producto-media-link {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #f8f9fa;
}

.productos-view--list .producto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.productos-view--list .producto-noimg {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  font-size: 0.75rem;
}

.productos-view--list .producto-col--info {
  min-width: 0;
}

.productos-view--list .producto-sku-top {
  font-size: 0.92rem;
  color: #1d2734;
  margin-bottom: 2px;
}

.productos-view--list .producto-title {
  font-size: 0.99rem;
  line-height: 1.12;
  font-weight: 700;
  max-width: 520px;
}

.productos-view--list .producto-subdata {
  display: none;
}

.productos-view--list .producto-inline-actions {
  margin-top: 12px;
}

.productos-view--list .producto-icon-btn {
  font-size: 1.15rem;
}

.productos-view--list .producto-col--price {
  text-align: right;
}

.productos-view--list .producto-price-main {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 500;
}

.productos-view--list .producto-price-legend {
  font-size: 0.53rem;
  margin-top: 3px;
}

.productos-view--list .producto-col--buy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.productos-view--list .producto-stock-wrap {
  margin-bottom: 8px;
}

.productos-view--list .producto-buy-form {
  margin: 0;
}

.productos-view--list .producto-buy-controls {
  justify-content: flex-end;
}

.productos-view--list .producto-qty-input {
  width: 78px;
  height: 40px;
  font-size: 0.96rem;
}

.productos-view--list .producto-cart-btn {
  width: 40px;
  height: 40px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1199.98px) {
  .productos-view--list .producto-list-row {
    grid-template-columns: 82px minmax(220px, 1fr) 180px 145px;
    gap: 14px;
    padding: 14px 14px;
  }
}

@media (max-width: 991.98px) {
  .shop-filterbar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-view-box {
    justify-content: flex-start;
  }

  .producto-hover-preview {
    display: none !important;
  }

  .productos-view--list .producto-list-row {
    grid-template-columns: 72px 1fr;
    align-items: start;
  }

  .productos-view--list .producto-col--price {
    grid-column: 2 / 3;
    text-align: left;
    margin-top: 6px;
  }

  .productos-view--list .producto-col--buy {
    grid-column: 2 / 3;
    align-items: flex-start;
    margin-top: 10px;
  }
}

@media (max-width: 767.98px) {
  .shop-filterbar-grid {
    grid-template-columns: 1fr;
  }

  .shop-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-search-actions {
    width: 100%;
  }

  .shop-search-actions .btn {
    flex: 1 1 0;
  }

  .filter-view-box {
    justify-content: stretch;
  }

  .view-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .view-btn {
    flex: 1 1 0;
    min-width: unset;
  }

  .productos-view--gallery,
  .productos-view--compact {
    grid-template-columns: 1fr 1fr;
  }

  .productos-view--list .producto-list-row {
    grid-template-columns: 64px 1fr;
    gap: 12px;
    min-height: unset;
    padding: 12px;
  }

  .productos-view--list .producto-media-link,
  .productos-view--list .producto-noimg {
    width: 56px;
    height: 56px;
  }

  .productos-view--list .producto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .productos-view--list .producto-title {
    font-size: 0.95rem;
  }

  .productos-view--list .producto-price-main {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .productos-view--gallery,
  .productos-view--compact {
    grid-template-columns: 1fr;
  }

  .producto-gallery-media {
    height: 220px !important;
  }
}

/* =========================
   DETALLE PRODUCTO
========================= */
.producto-detail-carousel-inner {
  border-radius: 14px;
  overflow: hidden;
  background: #f8f9fa;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.producto-detail-carousel {
  position: relative;
}

.producto-detail-media {
  width: 100%;
  height: 420px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.producto-detail-media--single,
.producto-detail-media--empty {
  border-radius: 14px;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.producto-detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 20px;
}

.producto-detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.producto-detail-thumb {
  width: 72px;
  height: 56px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.producto-detail-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 4px;
}

@media (max-width: 991.98px) {
  .producto-detail-media {
    height: 360px;
  }
}

@media (max-width: 575.98px) {
  .producto-detail-media {
    height: 300px;
  }

  .producto-detail-img {
    padding: 12px;
  }

  .producto-detail-thumb {
    width: 64px;
    height: 52px;
  }
}