/*
 * Skyfact Food — POS modelo 1 (categorías laterales + grid de platos)
 * Color primario: #080e80
 * Cards con ancho fijo (como chickenbrasa) para evitar distorsión.
 */

:root {
  --skyfact-primary: #080e80;
  --skyfact-primary-hover: #0a1299;
  --skyfact-cat: #080e80;
  --skyfact-card-w: 190px;
  --skyfact-card-gap: 12px;
}

/* ========== Grid contenedor ========== */

.product-list,
#list-productos.product-list,
#list-productos {
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: var(--skyfact-card-gap) !important;
  padding: 8px !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

/* ========== Card de producto — ancho fijo ========== */

.product,
article.product,
.product.sky-card,
article.product.sky-card,
.product.p-w-t,
article.product.p-w-t {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;

  /* Ancho fijo: evita columnas estrechas y texto roto */
  flex: 0 0 var(--skyfact-card-w) !important;
  width: var(--skyfact-card-w) !important;
  min-width: var(--skyfact-card-w) !important;
  max-width: var(--skyfact-card-w) !important;

  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px !important;

  background: #fff !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 10px !important;
  border-bottom-width: 1px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06) !important;
  overflow: hidden !important;
  cursor: pointer !important;
  float: none !important;
  line-height: 1.25 !important;
  font-size: 13px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.product:hover,
.product.sky-card:hover,
.product.p-w-t:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
  border-color: #ccc !important;
}

/*
 * Anular TODOS los anchos legacy de style_all.css (.p-w-t 15% / 30% / 46%)
 * que destrozan el grid en modelo 1.
 */
@media (min-width: 0px) {
  .product,
  .product.sky-card,
  article.product.sky-card,
  .product.p-w-t,
  article.product.p-w-t {
    flex: 0 0 190px !important;
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .product,
  .product.sky-card,
  .product.p-w-t {
    flex: 0 0 190px !important;
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }
}

@media (min-width: 1200px) {
  .product,
  .product.sky-card,
  .product.p-w-t {
    flex: 0 0 190px !important;
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }
}

@media (max-width: 991px) {
  .product,
  .product.sky-card,
  .product.p-w-t {
    flex: 0 0 190px !important;
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }
}

@media (max-width: 575.98px) {
  .product,
  article.product,
  .product.sky-card,
  .product.p-w-t,
  article.product.p-w-t {
    flex: 0 0 calc(50% - 8px) !important;
    width: calc(50% - 8px) !important;
    min-width: calc(50% - 8px) !important;
    max-width: calc(50% - 8px) !important;
  }
}

/* ========== Imagen ========== */

.product .product-img {
  position: relative !important;
  width: 100% !important;
  background: #fff !important;
  text-align: center !important;
  flex: 0 0 auto !important;
}

.product .product-img img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 120px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

.product .price-tag,
.product .pres-tag {
  display: none !important;
}

.product .product-img-placeholder {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 120px !important;
  background: #e9ecef !important;
  border-radius: 8px !important;
  color: #6c757d !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  gap: 6px !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
}

.product .product-img-placeholder i {
  font-size: 28px !important;
  opacity: 0.65 !important;
}

/* ========== Texto (sin romper sílabas) ========== */

.product .product-description {
  width: 100% !important;
  padding: 8px 2px 6px !important;
  text-align: center !important;
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
}

.product .product-description .sky-prod-cat,
.product .product-description span.sky-prod-cat {
  display: block !important;
  color: var(--skyfact-cat) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: normal !important;
  line-height: 1.3 !important;
  margin: 0 0 4px !important;
  /* Evita COS / TIL / LAR */
  word-break: normal !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  hyphens: none !important;
  white-space: normal !important;
}

.product .product-description .sky-prod-pres,
.product .product-description span.sky-prod-pres {
  display: block !important;
  color: #111 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: normal !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  hyphens: none !important;
  white-space: normal !important;
}

/* ========== Botón precio ========== */

.product .product-nam {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  display: block !important;
  width: 100% !important;
  margin-top: 6px !important;
  padding: 8px 6px !important;
  box-sizing: border-box !important;
  background: var(--skyfact-primary) !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center !important;
  border: none !important;
  border-radius: 8px !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 0 0 auto !important;
}

.product:hover .product-nam {
  background: var(--skyfact-primary-hover) !important;
}

.product .product-nam-2 {
  text-align: center !important;
  padding: 4px !important;
}

/* ========== Modelo 1: categorías laterales ========== */

.vtabs.customvtab {
  width: 100% !important;
}

.vtabs.customvtab > .tabs-vertical#list-catgrs {
  width: 160px !important;
}

.vtabs.customvtab > .tab-content {
  padding: 4px !important;
  vertical-align: top !important;
}

/* ========== Printer Agent ========== */

.skyfact-printer-agent {
  margin-top: 1.5rem;
}

.skyfact-printer-agent .btn-outline-skyfact {
  border-color: var(--skyfact-primary) !important;
  color: var(--skyfact-primary) !important;
  background: #fff !important;
}

.skyfact-printer-agent .btn-outline-skyfact:hover {
  background: var(--skyfact-primary) !important;
  color: #fff !important;
}

.skyfact-printer-agent .mode-legacy strong {
  color: #e67e22;
}

.skyfact-printer-agent .mode-agent strong {
  color: #28a745;
}
