.wcft-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* ========================= SEARCH BOX ========================= */
.wcft-search-box {
  position: relative;
  margin-bottom: 20px;
}

.wcft-search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  box-sizing: border-box;
}

.wcft-search-input:focus {
  border-color: #d71920;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.15);
}

.wcft-spinner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 3px solid #eee;
  border-top-color: #d71920;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.wcft-spinner.active {
  opacity: 1;
  animation: wcft-spin 0.6s linear infinite;
}

@keyframes wcft-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ========================= DESKTOP TABLE ========================= */
.products-table {
  display: block;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
}

.products-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.products-table thead {
  background: #d71920;
  color: #fff;
}

.products-table th,
.products-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  vertical-align: middle;
}

.products-table tbody td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.products-table img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.stock {
  color: #2d9b3a;
  font-weight: bold;
}

/* ========================= COLUMN WIDTHS (sin marca) ========================= */
.products-table th,
.products-table td {
  box-sizing: border-box;
}

.products-table th.col-producto,
.products-table td.col-producto {
  width: 14%;
}

.products-table th.col-sku,
.products-table td.col-sku {
  width: 11%;
}

.products-table th.col-desc,
.products-table td.col-desc {
  width: 42%;
}

.products-table th.col-stock,
.products-table td.col-stock {
  width: 8%;
}

.products-table th.col-precio,
.products-table td.col-precio {
  width: 10%;
}

.products-table th.col-comprar,
.products-table td.col-comprar {
  width: 13%;
}

.products-table th.col-imagen,
.products-table td.col-imagen {
  width: 12%;
}

.products-table th.col-sku,
.products-table td.col-sku,
.products-table th.col-stock,
.products-table td.col-stock {
  white-space: nowrap;
}

/* ========================= HIGHLIGHT (mark) — amarillo en cualquier columna ========================= */
.products-table mark,
.product-card mark,
.wcft-desc-text mark,
.col-producto mark,
.col-sku mark {
  background: #FFE066;
  color: #111;
  padding: 0 2px;
  border-radius: 3px;
}

/* ========================= DESCRIPCION: clamp 3-4 lineas + Leer mas ========================= */
.wcft-desc-wrap {
  display: block;
}

.wcft-desc-text {
  display: block;
  line-height: 1.45;
  font-size: 13.5px;
  color: #333;
  word-break: break-word;
}

.wcft-desc-text.wcft-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wcft-desc-text.wcft-expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.wcft-read-more {
  display: inline-block;
  margin-top: 6px;
  background: none;
  border: none;
  color: #d71920;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wcft-read-more:hover {
  color: #b31418;
}

.wcft-desc-wrap--mobile .wcft-desc-text {
  display: inline;
}

.wcft-desc-wrap--mobile .wcft-desc-text.wcft-clamped {
  display: -webkit-box;
}

/* ========================= CONSULTAR MÁS BUTTON ========================= */
.sku-detail-btn {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: normal;
  color: #444;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 3px 8px;
  text-decoration: none;
  background: #f7f7f7;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sku-detail-btn:hover {
  border-color: #d71920;
  color: #d71920;
  background: #fff;
}

.product-card .sku-detail-btn {
  margin-top: 0;
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 7px;
}

/* ========================= VER BUTTON ========================= */
.cart-btn,
.mobile-btn {
  display: inline-block;
  background: #d71920;
  color: #fff;
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.2s;
}

.cart-btn:hover,
.mobile-btn:hover {
  background: #b31418;
  color: #fff;
}

/* ========================= STOCK + WHATSAPP (debajo de comprar) ========================= */
.wcft-units {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

.wcft-urgency {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #d71920;
}

.wcft-wa-link {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: #1a7f37;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wcft-wa-link:hover {
  color: #146c2e;
}

.wcft-wa-btn {
  background: #1faa55 !important;
  border-color: #1faa55 !important;
  text-wrap-mode: wrap;
  white-space: normal;
  line-height: 1.3;
  text-align: center;
}

.wcft-wa-btn:hover {
  background: #178542 !important;
  color: #fff;
}

/* ========================= MOBILE CARDS ========================= */
.products-mobile {
  display: none;
}

@media (max-width: 768px) {
  .products-table {
    display: none;
  }

  .products-mobile {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .product-card {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
    align-items: flex-start;
  }

  .product-image {
    width: 105px;
    flex-shrink: 0;
  }

  .product-image img {
    width: 100%;
    height: 105px;
    object-fit: cover;
    border-radius: 10px;
  }

  .product-info {
    flex: 1;
    min-width: 0;
  }

  .product-title {
    font-size: 17px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.2;
    word-break: break-word;
  }

  .product-meta {
    font-size: 14px;
    color: #444;
    margin-bottom: 4px;
    line-height: 1.35;
  }

  .product-meta strong {
    color: #111;
  }

  .product-bottom {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
  }

  .price {
    font-size: 21px;
    font-weight: bold;
    color: #d71920;
    display: block;
  }

  .stock-mobile {
    font-size: 13px;
    color: #2d9b3a;
    font-weight: bold;
    margin-top: 3px;
    display: block;
  }

  .mobile-btn {
    white-space: nowrap;
  }
}

/* ========================= PAGINATION ========================= */
.wcft-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px;
  background: #fff;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  gap: 10px;
}

.wcft-pagination-info {
  font-size: 14px;
  color: #555;
}

.wcft-pagination-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wcft-page-btn {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}

.wcft-page-btn:hover {
  background: #e8e8e8;
  border-color: #ccc;
}

.wcft-page-btn.active {
  background: #d71920;
  color: #fff;
  border-color: #d71920;
}

.wcft-page-dots {
  padding: 0 4px;
  color: #999;
  font-size: 14px;
}

/* ========================= LIGHTBOX ========================= */
.zoomable {
  cursor: zoom-in;
  transition: .25s;
}

.zoomable:hover {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: .25s;
  z-index: 999999;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 700px;
  width: 90%;
  animation: wcft-fade-in .25s ease;
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  width: auto;
  border-radius: 8px;
}

.lightbox-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.lightbox-cart-btn {
  display: inline-block;
  background: #d71920;
  color: #fff;
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}

.lightbox-cart-btn:hover {
  background: #b01218;
  color: #fff;
}

.lightbox-close-btn {
  background: transparent;
  color: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .3);
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

@keyframes wcft-fade-in {
  from {
    transform: scale(.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
