/* ============================================================
   OVERRIDES.CSS — Ajustes finos y compatibilidad JS
   RÚSTICO PREMIUM
   ============================================================ */


/* ------------------------------------------------------------
   DESCRIPCIÓN DE PRODUCTOS - REMOVED FROM CARDS
------------------------------------------------------------ */

/* .product-desc removed from product cards for cleaner design */


/* ------------------------------------------------------------
   NAVBAR CART BUTTON
   Estilos para el botón de carrito integrado en el navbar
------------------------------------------------------------ */

.nav-cart {
  display: inline-block;
}

#nav-cart-btn {
  color: var(--wine);
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#nav-cart-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Badge shared id #cart-count */
#cart-count {
  transform: translate(-30%, -30%);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* keep old floating styles harmlessly removed by not using them */


/* ------------------------------------------------------------
   INPUT DE CANTIDAD (CARRITO)
------------------------------------------------------------ */

.qty-input {
  width: 75px;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--wood-dark);
  text-align: center;
}

.qty-input:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(122, 30, 30, 0.2);
  outline: none;
}


/* ------------------------------------------------------------
   TABLA DEL CARRITO
------------------------------------------------------------ */

#cart-table td,
#cart-table th {
  padding: 0.9rem;
  vertical-align: middle;
}

#cart-table th {
  font-weight: 600;
  font-size: 0.95rem;
  background-color: var(--surface) !important;
  border-bottom: 2px solid var(--wine-light);
}

#cart-table td:nth-child(3) {
  width: 100px; /* Columna cantidad más estrecha */
}

#cart-table td:nth-child(5) {
  width: 80px; /* Columna eliminar más estrecha */
}

.remove-item {
  border-radius: var(--radius-sm);
  background-color: var(--wine);
  border: none;
  color: white;
  padding: 0.4rem 0.7rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.remove-item:hover {
  background-color: var(--wine-dark);
  transform: scale(1.05);
}

/* ------------------------------------------------------------
   TARJETAS MÓVILES DEL CARRITO
------------------------------------------------------------ */

.cart-item-card .card {
  border: 1px solid var(--wood-light);
  border-radius: var(--radius);
  transition: var(--transition);
}

.cart-item-card .card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.cart-item-card .card-title {
  color: var(--wine);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: calc(100% - 50px); /* Espacio para botón eliminar */
}

.cart-item-card .text-wine {
  color: var(--wine) !important;
  font-size: 1.1rem;
}

.cart-item-card .remove-item {
  padding: 0.3rem 0.5rem;
  min-width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.cart-item-card .form-control-sm {
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
}

/* Mejoras responsive para la tabla */
@media (max-width: 991.98px) and (min-width: 768px) {
  #cart-table td,
  #cart-table th {
    padding: 0.7rem 0.5rem;
    font-size: 0.9rem;
  }
  
  #cart-table td:first-child {
    max-width: 180px;
    word-wrap: break-word;
  }
}

/* ------------------------------------------------------------
   RESUMEN DEL CARRITO
------------------------------------------------------------ */

.cart-summary {
  background-color: var(--surface) !important;
  border: 1px solid var(--wood-light) !important;
  border-radius: var(--radius) !important;
}

.cart-summary h3 {
  font-size: 1.3rem;
}

.cart-summary #cart-total {
  color: var(--wine);
  font-size: 1.5rem;
}

@media (max-width: 767.98px) {
  .cart-item-card {
    margin-bottom: 1rem !important;
  }
  
  .cart-item-card .row {
    margin: 0;
  }
  
  .cart-item-card .col-4 {
    padding: 0.2rem 0.5rem;
    text-align: center;
  }
  
  .cart-item-card .col-4:last-child {
    text-align: end !important;
  }
  
  .cart-summary h3 {
    font-size: 1.1rem;
  }
  
  .cart-summary #cart-total {
    font-size: 1.3rem;
  }
}


/* ------------------------------------------------------------
   GRID (AJUSTE FINO)
------------------------------------------------------------ */

.row.g-4 {
  row-gap: 2rem;
}


/* ------------------------------------------------------------
   MEJORAS RESPONSIVE EXTRA
------------------------------------------------------------ */

@media (max-width: 480px) {

  .product-card {
    border-radius: var(--radius-sm);
  }

  /* antiguas reglas de .landing-hero se ignoran cuando el hero es fondo global */
  .landing-hero { display: none !important; }

}

/* Hero height adjustments for mobile and tablet */
@media (max-width: 768px) {
  .landing-hero {
    height: 40vh;
  }
}


/* ------------------------------------------------------------
   AJUSTES MENORES DE FORMA GLOBAL
------------------------------------------------------------ */

button, input {
  font-family: inherit;
}

img {
  display: block;
}

/* Mucho más elegante cuando se selecciona texto */
::selection {
  background-color: var(--wine);
  color: #fff;
}

/* ============================================================
   AJUSTE DE ALTURA UNIFORME DE TARJETAS
   ============================================================ */

/* La tarjeta debe comportarse como contenedor vertical */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* El cuerpo crece para rellenar importancia */
.product-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.navbar.container-fluid {
  padding-left: 3% !important;
  padding-right: 3% !important;
}

/* Fixed navbar adjustments */
:root {
  --navbar-height: 76px; /* tweak if needed */
}

body {
  padding-top: var(--navbar-height);
}

.site-header .navbar.fixed-top {
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  background: var(--wood-light);
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

/* Ensure nav-cart is always visible and aligned */
.nav-cart {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1102; /* above toggler */
}

@media (max-width: 991px) {
  /* On mobile keep navbar height slightly larger to fit toggler */
  :root { --navbar-height: 72px; }
  .site-header .navbar.fixed-top { height: var(--navbar-height); }
}

/* Make sure navbar has relative stacking so absolute center works */
.site-header .navbar.fixed-top {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 100;
}

/* Toggler should be above collapse but below cart */
.site-header .navbar .navbar-toggler {
  z-index: 1101;
}

/* Collapse background and positioning on mobile: match navbar surface */
@media (max-width: 991px) {
  .site-header .navbar .navbar-collapse {
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--wood-light);
    padding: 0.8rem 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  }

  /* When the collapse is shown, ensure background and no gradient */
  .site-header .navbar .navbar-collapse.show {
    background: var(--wood-light) !important;
  }

  /* Avoid the collapse covering the cart visually (cart is above) */
  .site-header .navbar .navbar-collapse {
    z-index: 1099;
  }
}


/* ------------------------------------------------------------
   FOOTER: dirección y redes
------------------------------------------------------------ */
.footer-address {
  font-style: normal;
  color: var(--text-muted);
  line-height: 1.35;
  font-size: 0.95rem;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer .social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--wine);
  background: transparent;
  transition: background var(--transition), transform var(--transition), color var(--transition);
}

.footer .social-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.footer .social-btn:hover {
  background: linear-gradient(180deg, rgba(197,164,109,0.12), rgba(197,164,109,0.06));
  color: var(--gold-dark);
  transform: translateY(-2px);
}


/* ------------------------------------------------------------
   FORM STYLING — inputs, textarea, buttons
------------------------------------------------------------ */
.form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--wood-dark);
  background: var(--card);
  padding: 0.6rem 0.9rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.form-control:focus {
  border-color: var(--wine);
  box-shadow: 0 6px 18px rgba(122,30,30,0.12);
  outline: none;
}

form .btn-buy {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-strong);
}


/* ------------------------------------------------------------
   ACCORDION AESTHETIC TWEAKS
------------------------------------------------------------ */
.accordion-button {
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.accordion-button:not(.collapsed) {
  color: var(--wine);
}

.accordion-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
}

/* ============================================================
   BOTONES — INVERSIÓN COMPLETA AL ACTIVARSE
   Aplica inversión de colores (fondo/texto/borde) para clases
   comunes: .filter-btn, .chip, .btn-buy.
   Estados: .active, :active, :focus-visible, [aria-pressed="true"]
   ============================================================ */

.filter-btn,
.chip,
.btn-buy {
  box-sizing: border-box;               /* evita saltos de tamaño cuando cambia el borde */
  background-color: var(--wine);        /* fondo vino por defecto */
  color: #fff;                          /* texto blanco por defecto */
  border: 1px solid transparent;        /* silueta neutra por defecto */
  transition: all .2s ease;             /* transición suave para color/borde/fondo */
  -webkit-transition: all .2s ease;
  -moz-transition: all .2s ease;
}

/* Estado invertido: clase .active, :active, focus-visible, aria-pressed="true" */
.filter-btn:not(:disabled).active,
.filter-btn:not(:disabled):active,
.filter-btn:not(:disabled)[aria-pressed="true"],
.filter-btn:not(:disabled):focus-visible,

.chip:not(:disabled).active,
.chip:not(:disabled):active,
.chip:not(:disabled)[aria-pressed="true"],
.chip:not(:disabled):focus-visible,

.btn-buy:not(:disabled).active,
.btn-buy:not(:disabled):active,
.btn-buy:not(:disabled)[aria-pressed="true"],
.btn-buy:not(:disabled):focus-visible {
  background-color: var(--surface, #fff); /* fondo blanco (o var(--surface) si definido) */
  color: var(--wine);                     /* texto color vino */
  border: 2px solid var(--wine);          /* borde vino más destacado */
}

/* Foco de teclado coherente con la inversión */
.filter-btn:not(:disabled):focus-visible,
.chip:not(:disabled):focus-visible,
.btn-buy:not(:disabled):focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(122,30,30,0.08); /* anillo sutil vino translúcido */
}

/* Soporte explícito para atributo aria-pressed en el elemento */
[aria-pressed="true"].filter-btn,
[aria-pressed="true"].chip,
[aria-pressed="true"].btn-buy {
  background-color: var(--surface, #fff);
  color: var(--wine);
  border: 2px solid var(--wine);
}

/* No sobrescribimos padding ni border-radius: se respetan los valores del tema */

/* Si prefieres evitar que el borde de 1px a 2px cambie el tamaño visual,
   podemos usar outline o box-shadow en lugar de aumentar el borde. */

/* ------------------------------------------------------------
   HOVER: ampliar ligeramente el botón en lugar de cambiar el color
   Evita que el texto pase a color oscuro sobre fondo granate.
   Solo aplica la escala cuando el botón NO está en estado activo/checked.
------------------------------------------------------------ */
.filter-btn:not(:disabled):not(.active):not([aria-pressed="true"]):hover,
.chip:not(:disabled):not(.active):not([aria-pressed="true"]):hover,
.btn-buy:not(:disabled):not(.active):not([aria-pressed="true"]):hover {
  transform: translateY(-2px) scale(1.03); /* ligero crecimiento y elevación */
  -webkit-transform: translateY(-2px) scale(1.03);
  -moz-transform: translateY(-2px) scale(1.03);
  color: #fff; /* mantener texto blanco mientras no esté invertido */
  box-shadow: var(--shadow-strong); /* acentúa efecto */
}

/* ============================================================
   COMPACT PRODUCT CARD PACK — Reduce vertical space by ~35%
   Targets: product-card, card-img-top, product-title, product-desc,
   product-price and add-to-cart button. Keeps visual theme.
   ============================================================ */

/* 1) Images smaller and cropped */
.product-card .card-img-top {
  height: 160px; /* fixed height for compact layout (tweak 150-180px) */
  object-fit: cover;
  width: 100%;
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

/* 2) Title: complete and readable */
.product-card .product-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
  /* Título completo sin truncar */
}

/* 3) Description removed from cards */

/* 4) Compact card body spacing (approx 35% less height) */
.product-card .card-body {
  padding: 0.6rem 0.75rem; /* reduced padding */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card .product-price {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

/* Lighter 'Añadir' button */
.product-card .btn-buy.add-to-cart,
.product-card button.add-to-cart {
  padding: 0.38rem 0.6rem;
  font-size: 0.92rem;
  border-radius: calc(var(--radius-sm));
}

/* 5) Mobile adjustments: tighter layout and smaller images */
@media (max-width: 576px) {
  .product-card .card-img-top { height: 110px; }
  .product-card .product-title { font-size: 0.95rem; }
  /* .product-desc removed from cards */
  .product-card .card-body { padding: 0.45rem 0.6rem; }
}

/* 6) Denser grid spacing: tweak gutters */
.category-grid {
  gap: 0.6rem; /* rely on bootstrap but make it denser */
}

/* 7) Visual polish: ensure cards keep premium look */
.product-card {
  border: 1px solid rgba(0,0,0,0.04);
  background: var(--card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* Fine tune the product grid columns via utility override if classes not changed */
@media (min-width: 992px) {
  /* For large screens, allow more columns visually */
  .row.row-cols-lg-4 > * { flex: 0 0 20%; max-width: 20%; }
}

/* Keep CTA & price alignment compact */
.product-card .card-body .mt-3 { margin-top: 0.35rem; }

/* ===================================================================
   Force responsive column widths in case some global rule collapses cols
   This ensures 2/2/3/4/5 columns at xs/sm/md/lg/xl respectively.
   =================================================================== */
.row.row-cols-2 > * { flex: 0 0 50%; max-width: 50%; }

@media (min-width: 576px) {
  .row.row-cols-sm-2 > * { flex: 0 0 50%; max-width: 50%; }
}

@media (min-width: 768px) {


  .row.row-cols-md-3 > * { flex: 0 0 30%; max-width: 30%; }
#quick-links-carousel.category-carousel {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 1.2rem;
  padding-bottom: 0.25rem;
  overflow-x: hidden !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

#quick-links-carousel .category-item {
  flex: 1 1 0;
  max-width: 340px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  box-sizing: border-box;
  transition: transform .12s ease;
}

#quick-links-carousel .category-card {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,245,240,0.98));
  padding: 0.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform .12s ease, box-shadow .12s ease;
}
#quick-links-carousel .category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

#quick-links-carousel .category-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center center;
  border-radius: 8px;
  display: block;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  background: linear-gradient(180deg, rgba(245,240,235,1), rgba(235,230,225,1));
}

@media (max-width: 576px) {
  #quick-links-carousel.category-carousel {
    gap: 0.6rem;
    padding-bottom: 0.15rem;
  }
  #quick-links-carousel .category-item {
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
    padding: 0;
  }
  #quick-links-carousel .category-card {
    padding: 0.35rem;
    font-size: 0.92rem;
  }
  #quick-links-carousel .category-thumb {
    aspect-ratio: 1.3 / 1;
    height: auto;
    min-width: 0;
    max-width: 100%;
  }
}

#quick-links-carousel {
  overflow-x: hidden !important;
  scrollbar-width: none !important;
}
#quick-links-carousel::-webkit-scrollbar {
  display: none !important;
}

/* ============================================================
   PÁGINA DE DETALLE DEL PRODUCTO
   ============================================================ */

/* Imagen del producto */
.product-image-container {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

.product-image-container img {
  width: 100%;
  height: auto;
  min-height: 300px;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

/* Información del producto */
.product-info {
  padding: 1rem 0;
}

.product-price-section {
  border-left: 4px solid var(--wine);
  padding-left: 1rem;
  background: linear-gradient(90deg, rgba(122, 30, 30, 0.05), transparent);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.product-description,
.product-details {
  background: var(--card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.08);
}

.product-actions {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* Breadcrumb personalizado */
.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--wine);
  content: "›";
}

.breadcrumb-item a {
  color: var(--wine);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--text-main);
}

/* Estados de carga */
.spinner-border.text-primary {
  color: var(--wine) !important;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .product-image-container img {
    min-height: 250px;
    max-height: 350px;
  }
  
  .product-info {
    padding: 0.5rem 0;
  }
  
  .product-actions {
    padding: 1rem;
  }
}

/* Tarjetas clickeables - cursor pointer */
.product-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  border-color: var(--wine);
}

.clickeable-area {
  cursor: pointer;
}

/* Override accordion colors to match site theme */
.accordion-button {
  color: var(--wine) !important; /* Wine red text when collapsed */
}

.accordion-button:not(.collapsed) {
  background-color: var(--wine) !important;
  color: white !important;
  border-color: var(--wine) !important;
}

.accordion-button:focus {
  border-color: var(--wine) !important;
  box-shadow: 0 0 0 0.25rem rgba(122, 30, 30, 0.25) !important;
}

.accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1); /* Make arrow white when expanded */
}

.accordion-button.collapsed::after {
  filter: hue-rotate(300deg) saturate(1.5); /* Make arrow wine red when collapsed */
}
}

@media (min-width: 992px) {
  .row.row-cols-lg-4 > * { flex: 0 0 25%; max-width: 25%; }
}

@media (min-width: 1200px) {
  .row.row-cols-xl-5 > * { flex: 0 0 20%; max-width: 20%; }
}

/* Stronger fallback: ensure .category-grid behaves as a flex row and
   force .col children widths if some other stylesheet overrides bootstrap */
.category-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -0.5rem; /* small gutter compensation if needed */
  margin-right: -0.5rem;
  flex-direction: row;
}

.category-grid > .col {
  box-sizing: border-box !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

/* XS: 2 columns */
.category-grid.row-cols-2 > .col,
.category-grid.row-cols-sm-2 > .col {
  flex: 0 0 50% !important;
  max-width: 45% !important;
}

@media (min-width: 768px) {
  /* MD: 3 columns */
  .category-grid.row-cols-md-3 > .col {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }
}

@media (min-width: 992px) {
  /* LG: 4 columns */
  .category-grid.row-cols-lg-4 > .col {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}

@media (min-width: 1200px) {
  /* XL: 5 columns */
  .category-grid.row-cols-xl-5 > .col {
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }
}

/* ------------------------------------------------------------------
   FIXES SOLICITADAS: asegurar que las cards ocupen siempre su celda
   - width / max-width 100%
   - eliminar márgenes en .card para que el espaciado quede solo en grid
   - imágenes no estiren contenedores
   - regla para pantallas muy pequeñas (<390px)
   ------------------------------------------------------------------ */

/* Ensure each product card fills its column exactly */
.product-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Remove margins on cards — spacing is handled by the grid gutters (g-3) */
.card {
  margin: 0 !important;
}

/* Images must not overflow or stretch the card */
.card-img-top {
  height: 150px !important;
  object-fit: cover !important;
  width: 100% !important;
  display: block !important;
}

/* Extra safety: on very small screens reduce font-size and tighten paddings */
@media (max-width: 390px) {
  .product-card {
    font-size: 0.9rem !important;
  }

  .product-card .card-body {
    padding: 0.35rem 0.45rem !important;
  }

  .card-img-top {
    height: 160px !important;
  }
}

/* Avoid negative margins that can misalign the grid — rely on Bootstrap gutters */
.category-grid {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Keep the column padding small but consistent so gutters (g-3) control spacing */
.category-grid > .col {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}



/* Si el botón está en estado invertido (.active o aria-pressed),
   mantenemos su comportamiento (inversión ya definida) y permitimos
   una escala ligera al hacer hover también. */
.filter-btn:not(:disabled).active:hover,
.filter-btn:not(:disabled)[aria-pressed="true"]:hover,
.chip:not(:disabled).active:hover,
.chip:not(:disabled)[aria-pressed="true"]:hover,
.btn-buy:not(:disabled).active:hover,
.btn-buy:not(:disabled)[aria-pressed="true"]:hover {
  transform: translateY(-2px) scale(1.02);
  color: var(--wine);
}


/* ============================================================
   CARRUSEL DE CATEGORÍAS (HOME)
   Carrusel horizontal ligero, táctil y responsivo
   ============================================================ */
.category-carousel {
  display: flex;
  gap: 0.75rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.category-item {
  flex: 0 0 30%;
  max-width: 30%;
  box-sizing: border-box;
  color: inherit;
  text-align: center;
  scroll-snap-align: start;
  padding: 0 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,245,240,0.98));
  padding: 0.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform .12s ease, box-shadow .12s ease;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

.category-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center center;
  border-radius: 8px;
  display: block;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  background: linear-gradient(180deg, rgba(245,240,235,1), rgba(235,230,225,1));
}
.category-item:focus,
.category-item:hover { transform: translateY(-3px); transition: transform .12s ease; }

/* Ensure offers and product grids fill columns */
#offers-grid .col, #product-grid .col { padding-left: 0.5rem; padding-right: 0.5rem; }
#offers-grid .product-card, #product-grid .product-card { width:100%; max-width:100%; margin:0; }

@media (max-width: 390px) {
  .category-item { flex: 0 0 50%; max-width: 50%; }
  .category-thumb { aspect-ratio: 1.6 / 1; height: auto; }
}

@media (max-width: 576px) {
    .category-grid {
      justify-content: space-evenly;
    }
  }

/* Ensure product-detail description heading and body match site typography/colors */
.product-description h3,
.product-description #product-description {
  font-family: inherit;
  color: var(--text-main) !important; /* override .text-muted */
}


.btn-link-buy {
  display: inline-block;
  background-color: var(--wine);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-link-buy:hover {
  background-color: var(--wine-dark);
  transform: translateY(-2px);
}

.btn-link-buy:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(122, 30, 30, 0.08);
}