/*
Theme Name: Vinum
Theme URI: https://example.com/
Author: Vinum
Author URI: https://example.com/
Description: Tema classico WordPress + WooCommerce basato sul layout HTML VINUM. Include support multilingua (text-domain) e template WooCommerce personalizzati.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: vinum
Tags: e-commerce, woocommerce, custom-logo, translation-ready
*/

/*
 * Il design principale usa Tailwind via CDN (enqueue) + blocco <style type="text/tailwindcss">.
 * Qui lasciamo solo piccoli fix e compatibilità.
 */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  border-radius: 0.125rem;
}

.woocommerce .woocommerce-notices-wrapper,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  margin-bottom: 1.5rem;
}

img { max-width: 100%; height: auto; }

.img-cover {
  max-width: 100%; height: 500px !important;
}

:root { --primary-gold: #C5A04D; --wine-red: #B22234; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #FDFBF7;
  color: #1A1A1A;
}

h1, h2, h3, h4, .nav-link, .serif-title, blockquote {
  font-family: "Playfair Display", serif;
}

.nav-link { transition: color .3s ease; }
.nav-link:hover { color: var(--wine-red); }
.active-link { color: var(--wine-red); font-weight: 700; }

/* From your HTML */
.green-index-bar { background: linear-gradient(90deg, #C5A04D 0%, #E2C081 100%); }
.technical-table tr:nth-child(even) { background-color: rgba(197, 160, 77, 0.05); }

/* Article content (reemplazo de @apply) */
.article-content p {
  margin-bottom: 1.5rem;
  color: #374151;              /* text-gray-700 */
  line-height: 1.75;
  font-size: 1.125rem;
  font-weight: 300;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #C5A04D;              /* text-primary */
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* Shop sidebar widget wrapper (selector-safe class to avoid jQuery "unrecognized expression" in Customizer) */
.vinum-sidebar-widget {
  background: #fff;
  border: 1px solid rgba(197, 160, 77, 0.1);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* Woo: botones/inputs (reemplazo de @apply) */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: #C5A04D;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 1rem 2rem;
  border: 0 !important;
  border-radius: 0.125rem !important;
  transition: all .2s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  filter: brightness(0.95);
}

.woocommerce .quantity .qty {
  width: 4rem;
  text-align: center;
  border: 1px solid rgba(197,160,77,.3);
  background: transparent;
  font-weight: 700;
  padding: .5rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  border: 1px solid rgba(197,160,77,.2);
  padding: .75rem 1rem;
  font-size: .875rem;
  width: 100%;
}

.woocommerce table.shop_table {
  background: #fff;
  border: 1px solid rgba(197,160,77,.1);
}

.woocommerce table.shop_table th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #6B7280; /* text-gray-500 */
}

.woocommerce table.shop_table td { font-size: .875rem; }

:root { --primary-gold: #C5A04D; --wine-red: #B22234; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 24;
}

body { font-family: "Inter", sans-serif; background:#FDFBF7; color:#1A1A1A; }
h1,h2,h3,.nav-link { font-family: "Playfair Display", serif; }

.nav-link { transition: color .3s ease; }
.nav-link:hover { color: var(--wine-red); }
.active-link { color: var(--wine-red); font-weight: 700; }

/* line-clamp fallback (porque tu HTML usa line-clamp-3) */
.line-clamp-3{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { height: 40px; width: auto; }

.vinum-cover > img{
  height: 100% !important;
  width: 100%;
  object-fit: contain;
}


.vinum-repeat-row { 
  margin-bottom: 10px;
}

.line-clamp-2{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
/* .cart-qty-text{
  width: 2rem;
}
.icon-add-cart{
  height: 2.5rem;
} */

/* Icono add cart más pequeño y consistente */
.icon-add-cart{
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 !important;
}
.icon-add-cart .material-symbols-outlined{
  font-size: 20px;
  line-height: 1;
}

/* Número centrado y sin “bailar” */
.cart-qty-text{
  width: 2rem;
  display: inline-block;
  text-align: center;
  line-height: 1;
}

/* Hace que el <li class="product"> y tu card estiren igual en el grid */
.woocommerce ul.products li.product {
  height: 100%;
}

/* Tus “slots” para alinear cards aunque falte subtitle o el título sea corto */
.vinum-card-title {
  min-height: 3rem; /* ~2 líneas aprox */
}
.vinum-card-subtitle {
  min-height: 2.25rem; /* ~2 líneas aprox */
}

/* =========================================================
   VINUM — SHOP TOP BAR (Result count + Orderby)
   - contador a la izquierda
   - "Ordina per" + select SIEMPRE a la derecha
   - sin fondo, sin borde
   - evita doble icono (mata background-image)
   ========================================================= */

.vinum-shop-bar{
  display:flex;
  align-items:center;
  gap:16px;
  width:100%;
  flex-wrap:nowrap;
  padding-bottom: 1rem;
}

/* Woo result count */
.vinum-shop-bar .woocommerce-result-count{
  margin:0 !important;
  white-space:nowrap;
  flex:0 0 auto;
}

/* wrapper derecho (label + select) */
.vinum-shop-bar .vinum-shop-order{
  margin-left:auto;               /* <-- empuja a la derecha */
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  flex:0 0 auto;
}

/* label */
.vinum-shop-bar .vinum-order-label{
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:#9CA3AF; /* gray-400 */
  margin:0;
  white-space:nowrap;
}

/* select limpio (sin bg, sin borde) */
.vinum-shop-bar .vinum-orderby{
  width:190px;
  max-width:42vw;
  height:34px;
  padding:0 10px;
  margin:0;
  font-size:12px;
  line-height:1;
  font-weight:600;

  border:0 !important;
  outline:none !important;
  box-shadow:none !important;
  background:transparent !important;

  /* evita doble icono (por tailwind/forms u otros) */
  background-image:none !important;

  /* deja flecha nativa estable */
  -webkit-appearance:auto;
  appearance:auto;
}

/* focus sin borde/halo */
.vinum-shop-bar .vinum-orderby:focus{
  outline:none !important;
  box-shadow:none !important;
}

/* tablet */
@media (max-width: 900px){
  .vinum-shop-bar{ gap:12px; }
  .vinum-shop-bar .vinum-orderby{
    width:170px;
    max-width:55vw;
  }
}

/* móvil: no rompas en 2 líneas, pero permite que el select se encoja */
@media (max-width: 480px){
  .vinum-shop-bar{ gap:10px; }
  .vinum-shop-bar .vinum-shop-order{ gap:8px; }
  .vinum-shop-bar .vinum-orderby{
    width:auto;
    max-width:62vw;
  }
}


/* =========================================================
   VINUM — MOBILE FILTERS DRAWER (solo mobile)
   - oculta sidebar arriba
   - barra fija abajo con "Filtri" + Orderby
   - drawer encima (overlay)
   ========================================================= */

/* En mobile ocultamos el aside del layout normal */
@media (max-width: 767.98px){
  .vinum-shop-layout > aside{
    display:none !important;
  }

  /* espacio para la barra fija inferior */
  .vinum-shop-layout{
    padding-bottom: 74px;
  }

  /* en mobile solo mostramos ordenar en la barra inferior, no en la superior */
  .vinum-shop-order-desktop{
    display: none !important;
  }

  .vinum-shop-bar{
    padding-bottom: .75rem;
  }
}

/* Barra inferior fija */
.vinum-mobile-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;

  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 -10px 26px rgba(0,0,0,.10);

  padding: 10px 12px;
  display:none; /* solo mobile */
}

@media (max-width: 767.98px){
  .vinum-mobile-bar{ display:flex; }
}

.vinum-mobile-bar__inner{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  display:flex;
  align-items:center;
  gap: 12px;
}

/* Botón Filtri */
.vinum-mobile-filter-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;

  height: 44px;
  padding: 0 14px;

  border: 1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius: 10px;

  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;

  color:#111827;
  white-space:nowrap;
}

.vinum-mobile-filter-btn .material-symbols-outlined{
  font-size: 20px;
  line-height: 1;
}

/* Select en la barra mobile (ACÁ sí puede tener “caja” para usabilidad) */
.vinum-mobile-bar .vinum-orderby{
  margin-left:auto;

  height:44px;
  max-width:58vw;

  padding: 0 34px 0 12px;
  font-size: 12px;
  font-weight: 600;

  border: 1px solid rgba(0,0,0,.12) !important;
  border-radius: 10px;
  background:#fff !important;

  /* evita doble icono */
  background-image:none !important;

  -webkit-appearance:auto;
  appearance:auto;

  outline:none !important;
  box-shadow:none !important;
}

/* Overlay y drawer: solo visibles en mobile; transición al abrir/cerrar */
@media (min-width: 768px){
  .vinum-mobile-overlay,
  .vinum-mobile-drawer{
    display: none !important;
  }
}

@media (max-width: 767.98px){
  .vinum-mobile-overlay{
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(17,24,39,.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .vinum-mobile-drawer{
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -14px 40px rgba(0,0,0,.25);
    max-height: 88vh;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
  }

  html.vinum-mobile-filters-open .vinum-mobile-overlay{
    opacity: 1;
    pointer-events: auto;
  }

  html.vinum-mobile-filters-open .vinum-mobile-drawer{
    transform: translateY(0);
  }
}

/* Fallback para navegadores sin @media (overlay/drawer base) */
.vinum-mobile-overlay{
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(17,24,39,.55);
}

.vinum-mobile-drawer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 40px rgba(0,0,0,.25);
  max-height: 88vh;
  overflow: hidden;
}

/* header */
.vinum-mobile-drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;

  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.vinum-mobile-drawer__title{
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .18em;
  color:#111827;
}

.vinum-mobile-drawer__close{
  width: 42px;
  height: 42px;

  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background:#fff;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.vinum-mobile-drawer__close .material-symbols-outlined{
  font-size: 22px;
}

/* body scroll */
.vinum-mobile-drawer__body{
  padding: 14px;
  overflow:auto;
  max-height: calc(88vh - 64px);
}

/* bloquear scroll del body */
body.vinum-lock-scroll{
  overflow:hidden;
}

/* ===== Menú móvil: drawer cerrado por defecto, solo visible en <1024px ===== */

/* Desktop ≥1024px: menú horizontal visible, logo y menú alineados a la izquierda */
@media (min-width: 1024px) {
  .vinum-nav-desktop {
    display: flex !important;
  }
  .vinum-nav-toggle,
  .vinum-nav-overlay,
  .vinum-nav-drawer,
  .vinum-header__search-mobile {
    display: none !important;
  }
  .vinum-header__row {
    justify-content: space-between;
  }
  .vinum-header__left {
    justify-content: flex-start !important;
    flex: 0 1 auto !important;
  }
}

@media (max-width: 1023px) {
  .vinum-nav-desktop {
    display: none !important;
  }
  .vinum-nav-toggle {
    display: flex !important;
  }
  .vinum-header__logo-divider {
    display: none;
  }
  .vinum-header__left .custom-logo-link img,
  .vinum-header__logo-img {
    height: 36px !important;
    max-height: 36px;
  }
  .vinum-header__logo-text {
    flex-direction: row;
    align-items: baseline;
    white-space: nowrap;
    gap: 0.2rem;
  }
  .vinum-header__logo-text span:first-of-type {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
  }
  .vinum-header__logo-text span:last-of-type {
    font-size: 8px;
    letter-spacing: 0.02em;
  }
}
.vinum-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.vinum-nav-drawer-open .vinum-nav-overlay {
  opacity: 1;
  visibility: visible;
}

.vinum-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: min(320px, 85vw);
  height: 100%;
  background: #FDFBF7;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
body.vinum-nav-drawer-open .vinum-nav-drawer {
  transform: translateX(0);
}

.vinum-nav-drawer__inner {
  padding: 3.5rem 1.5rem 0 1.75rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.vinum-nav-drawer__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #B22234;
  border: none;
  background: none;
  border-radius: 0.25rem;
}
.vinum-nav-drawer__close:hover {
  color: #8B1A29;
}
.vinum-nav-drawer__close .material-symbols-outlined {
  font-size: 1.5rem;
}
.vinum-nav-drawer__nav {
  margin-top: 1.25rem;
}
.vinum-nav-drawer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.vinum-nav-drawer__menu .nav-link {
  font-size: 1.125rem;
  font-weight: 600;
  display: block;
  padding: 0.5rem 0;
}

/* ===== Header móvil: hamburger | logo centrado | iconos + búsqueda debajo ===== */
@media (max-width: 1023px) {
  .vinum-header__logo-divider {
    display: none;
  }
  .vinum-header__left .custom-logo-link img,
  .vinum-header__logo-img {
    height: 36px !important;
    max-height: 36px;
  }
  .vinum-header__left .flex.flex-col.leading-none span:first-of-type {
    font-size: 1rem;
    letter-spacing: 0.2em;
  }
  .vinum-header__left .flex.flex-col.leading-none span:last-of-type {
    font-size: 7px;
  }
}

.vinum-header__search-mobile {
  display: block;
}
.vinum-header__search-mobile-form {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  background: #fff;
  border: 1px solid rgba(178, 34, 52, 0.2);
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.vinum-header__search-mobile-icon {
  font-size: 1.25rem;
  color: #B22234;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.vinum-header__search-mobile-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 0.875rem;
  background: transparent;
  color: #1A1A1A;
}
.vinum-header__search-mobile-input::placeholder {
  color: #9CA3AF;
}

.vinum-nav-drawer__brand {
  display: flex;
  align-items: center;
  padding-bottom: 1rem;
  padding-left: 0.15rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  overflow: visible;
  min-width: 0;
}
.vinum-nav-drawer__brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  overflow: visible;
}
.vinum-nav-drawer__brand-logo img,
.vinum-nav-drawer__brand-img {
  height: 36px;
  width: auto;
  min-width: 28px;
  display: block;
  flex-shrink: 0;
}
.vinum-nav-drawer__brand-divider {
  width: 1px;
  height: 28px;
  background: #C5A04D;
  margin: 0 0.35rem 0 0;
  flex-shrink: 0;
}
.vinum-nav-drawer__brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.vinum-nav-drawer__brand-vinum {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  letter-spacing: 0.2em;
  font-size: 1.1rem;
  color: #C5A04D;
}
.vinum-nav-drawer__brand-srl {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(26, 26, 26, 0.7);
  align-self: flex-end;
  margin-top: 0.1rem;
}

.vinum-nav-drawer__search {
  margin-top: 1.25rem;
}
.vinum-nav-drawer__search-form {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(197,160,77,0.25);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.vinum-nav-drawer__search-icon {
  font-size: 18px;
  color: #C5A04D;
  margin-right: 0.5rem;
}
.vinum-nav-drawer__search-input {
  border: none;
  outline: none;
  font-size: 0.875rem;
  width: 100%;
  background: transparent;
  color: #1A1A1A;
}
.vinum-nav-drawer__search-input::placeholder {
  color: rgba(156, 163, 175, 0.95);
}

.vinum-nav-drawer__menu .menu-item > .nav-link {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #1A1A1A;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  text-decoration: none;
}
.vinum-nav-drawer__menu .menu-item > .nav-link::after {
  content: "›";
  font-size: 1rem;
  color: rgba(26, 26, 26, 0.4);
  font-weight: 400;
}
.vinum-nav-drawer__menu .menu-item.current-menu-item > .nav-link {
  color: #B22234;
  font-weight: 700;
}
.vinum-nav-drawer__menu .menu-item.current-menu-item > .nav-link::after {
  color: #B22234;
}

.vinum-nav-drawer__bottom {
  margin-top: auto;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.02);
  margin-left: -1.75rem;
  margin-right: -1.5rem;
  margin-bottom: -1.5rem;
  padding: 1rem 1.5rem 1.5rem;
}
.vinum-nav-drawer__bottom-link {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.25rem 0;
  text-decoration: none;
  color: #374151;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.vinum-nav-drawer__bottom-link:hover {
  color: #B22234;
}
.vinum-nav-drawer__bottom-icon {
  font-size: 1.35rem;
  color: #B22234;
}
.vinum-nav-drawer__bottom-label {
  display: block;
}