/*
 Theme Name:   FOUSSIER
 Theme URI:    https://foussier.es
 Description:  Plantilla para la web foussier.es
 Author:       NETROPOL
 Author URI:   https://netropol.es
 Template:     generatepress
 Version:      0.1
*/

/*
Índice:
1. Variables Globales
2. Cabecera
   2.1 Contenedor Principal de la Cabecera
   2.2 Logo del Sitio
   2.3 Iconos de Cabecera
3. Buscador FiboSearch
   3.1 Contenedor del Buscador
   3.2 Estilos del Formulario y Botón
4. WooCommerce
   4.1 Contador del Carrito
5. Variation Swatches para WooCommerce
6. Wooswipe (Galería WooCommerce)
*/

/* ==========================================================================
1. Variables Globales
========================================================================== */
:root {
  --padding-vertical-header: 15px;
  --theme-radius: 4px;
}
@media (max-width: 768px) {
  :root {
    --padding-vertical-header: 8px;
  }
}


/* ==========================================================================
2. Cabecera
========================================================================== */


/* 2.3 Iconos de Cabecera */
.fs-header-icons {
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.fs-header-icon {
  position: relative;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  line-height: 1.2;
  box-sizing: border-box;
  text-align: center;
}
.fs-header-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}
.fs-header-icon__label {
  font-size: 13px;
  text-align: center;
  text-transform: uppercase;
  display: block;
}

.header-icon-bar.fs-header-icons {
    order: 2;
    margin-left: auto;
}

@media (max-width: 768px) {
  .fs-header-icon__label {
    display: none;
  }
  .inside-header {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.fs-header-icon:hover,
.fs-header-icon:focus {
  color: inherit;
  outline: none;
}

/* Icono de carrito */
.fs-header-icon--cart {
  background: var(--color-corp-1);
  color: #ffffff;
  padding: 0 30px;
}
.fs-header-icon--cart:is(:hover, :focus) {
  color: #ffffff;
}
.fs-cart-icon-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.fs-cart-contents-count {
  position: absolute;
  top: -15px;
  right: -15px;
  background-color: #ffffff;
  color: #111111;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
  font-weight: bold;
  user-select: none;
}

@media (max-width: 768px) {
  .fs-header-icon--cart {
    padding: 0 20px;
  }
}

/* --- Icono de Menú Móvil (Hamburguesa) --- */
/* El botón en sí */
button.menu-toggle {
  flex-grow: 0;
  font-weight: 700;
}


/* ==========================================================================
3. Buscador FiboSearch
========================================================================== */

/* 3.1 Contenedor del Buscador */
.foussier-header .fouss-primary .dgwt-wcas-search-wrapp {
  padding: var(--padding-vertical-header) 60px;
  width: auto;
  flex-grow: 1;
}
.foussier-header .fouss-secondary .dgwt-wcas-search-wrapp {
  padding: var(--padding-vertical-header) 20px;
  width: auto;
  display: none;
}

@media (max-width: 768px) {
  .foussier-header .fouss-primary .dgwt-wcas-search-wrapp {
    display: none;
  }
  .foussier-header .fouss-secondary .dgwt-wcas-search-wrapp {
  display: block;
}
}

/* 3.2 Estilos del Formulario y Botón */
.foussier-header .dgwt-wcas-sf-wrapp form {
  margin-bottom: 0;
}
.foussier-header .dgwt-wcas-search-form .dgwt-wcas-sf-wrapp .dgwt-wcas-search-input {
  height: 56px;
  border: 1px solid var(--color-corp-1);
  border-radius: 4px;
}
.foussier-header .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
  background-color: var(--color-corp-1);
}
.foussier-header .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:before {
  display: none !important;
}
@media (max-width: 768px) {
  .foussier-header .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
    background-color: transparent;
  }
  .foussier-header .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg path {
    fill: var(--color-corp-1);
  }
}


/* ==========================================================================
4. WooCommerce
========================================================================== */

/* 4.1 Contador del Carrito (minimiza duplicados) */
.woocommerce-cart .fs-cart-contents-count {
  display: none;
}

/* ==========================================================================
   2. PÁGINA DE TIENDA / ARCHIVOS DE PRODUCTOS (Categorías, Etiquetas)
   ========================================================================== */

/* Visualización de Categorias */
.term-description p {
    font-size: 14px;
    line-height: 1.7em;
}

.woocommerce ul.products li.product-category {
  padding-bottom: 25px;
}

.anw-subcategory-image-wrapper {
  padding: 15px;
  border: 1px solid var(--border-border-primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anw-subcategory-image-wrapper img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  max-height: 200px;
}

.anw-category-content-wrapper {
  text-align: left;
}

.anw-category-content-wrapper a {
  color: var(--contrast);
}

.anw-category-content-wrapper a:hover {
  color: var(--color-corp-1);
}

.anw-category-content-wrapper h2 {
  font-size: 19px;
  font-weight: 600;
  text-transform: uppercase;
}

.anw-category-content-wrapper ul.anw-child-category-list {
  margin-left: 20px;
  margin-bottom: 10px;
}

.product-category .anw-category-content-wrapper ul.anw-child-category-list li h3 {
  font-size: 15px;
  margin-bottom: 0.4em;
  padding: 0;
}

.product-category .anw-category-content-wrapper ul.anw-child-category-list li:last-child  h3 {
  margin-bottom: 0;
}

.anw-view-all-category-link {
  font-size: 13px;
}

.anw-view-all-category-link:before {
  content: "❯";
  color: var(--color-corp-1);
}

/* Visualización de productos */
.woocommerce ul.products li.product:not(.product-category) {
  padding: 15px;
  border: 1px solid var(--border-border-primary);
}

/* Main Product Card Wrapper */
.anw_product_card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: left !important;
}

/* Image Section */
.anw_product_image_wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    text-align: initial;
  display: flex;
  align-items: center;
}

.anw_product_image_link {
display: block;
    height: 100%;
    width: 100%;
}

.anw_product_brand_image_wrapper {
  position: absolute;
  bottom: 0;
  width: 64px;
  height: 64px;
}

.anw_product_image_link img,
.anw_product_brand_image {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}


/* Title Section */
.anw_product_title_wrapper {
  margin-top: 15px;
}

.anw_product_title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2em;

}

.anw_product_title a {
  display: block;
  color: var(--contrast);
  text-decoration: none;
}

.anw_product_title a:hover {

}


/* Footer Section (contains meta and price) */
.anw_product_footer {
  margin-top: auto;
}

.anw_product_meta_wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-border-primary);
  margin-bottom: 15px;
}

.anw_product_sku,
.anw_product_stock {
  font-size: 13px;
  font-weight: 600;
}

.anw_product_stock.instock {
  color: #78b159;
}

.anw_product_stock.outofstock {
  color: #dd2e44;
}

.anw_product_stock p {
  margin: 0 !important;
}

.anw_product_stock.in-stock { /* If using your custom simpler stock message */

}
.anw_product_stock.out-of-stock { /* If using your custom simpler stock message */

}

.anw_product_price_wrapper {

}

.woocommerce ul.products li.product .anw_product_card .star-rating {
  margin: 0.3em auto;
}

/* Add to Cart Button Section */
.anw_product_add_to_cart_wrapper {
  display: flex;
}

.woocommerce ul.products li .anw_product_add_to_cart_wrapper a.button {
background: var(--color-corp-1);
width: 100%;
text-align: center;
line-height: 1.2em;
padding: 10px;
font-size: 14px;
border-radius: var(--theme-radius);
}

.woocommerce ul.products li .anw_product_add_to_cart_wrapper a.button:hover {
background: var(--color-corp-1h);
}

/* Cart Icon */
.anw_product_card .anw-svg-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: text-bottom;
    margin-right: 5px;
    fill: currentColor;
}

/* Facet WP */
.facetwp-facet-wrapper {
  display: none;
  border-top: 1px solid var(--border-border-primary);
  padding-top: 15px;
  padding-bottom: 15px;
}
.facetwp-facet-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.facetwp-facet-wrapper .facetwp-checkbox {
  font-size: 14px;
  margin-bottom: 10px;
}

.facetwp-facet-wrapper .facetwp-toggle {
  margin-top: 16px;
  font-size: 13px;
  color: var(--contrast);
  text-decoration: underline;
}

/* ==========================================================================
5. Producto Single
========================================================================== */

/* Marca */
.product-brand-wrapper {
  float: right;
  width: 90px;
  height: 70px;
  overflow: hidden;
}

.product-brand-wrapper a {
  display: block;
  width: 100%;
  height: 100%;
}

.product-brand-wrapper a img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Boton Añadir Carrito */
.woocommerce div.product form.cart div.quantity .minus {
  border-right: 0;
 border-top-left-radius: var(--theme-radius);
 border-bottom-left-radius: var(--theme-radius);
}

.woocommerce div.product form.cart div.quantity .input-text {
  border-left: 0;
  border-right: 0;
}

.woocommerce div.product form.cart div.quantity .plus {
  border-left: 0;
 border-top-right-radius: var(--theme-radius);
 border-bottom-right-radius: var(--theme-radius);
}

.woocommerce div.product form.cart div.quantity a:hover {
  color: var(--color-corp-1);
}

.woocommerce div.product form.cart .single_add_to_cart_button {
  border-radius: var(--theme-radius);

}

/* Icono carrito SVG en boton */
.single_add_to_cart_button::before {
  content: "";
  display: inline-block;
  width: 23px;
  height: 23px;
  margin-right: 0.5em;
  vertical-align: text-top;

  background-image: url('/wp-content/themes/foussier/assets/icons/cart.svg');
  background-repeat: no-repeat;
  background-size: contain;

  filter: invert(1);
}

/* Pestañas Producto */
.custom-product-description {
  clear: both;
}


/* ==========================================================================
5. Variation Swatches para WooCommerce
========================================================================== */
.woocommerce div.product form.cart table.variations th.label {
  padding: 0;
}
.woocommerce div.product form.cart table.variations th.label .woo-selected-variation-item-name {
  display: none;
}
.woocommerce div.product form.cart .variations td,
.woocommerce div.product form.cart .variations th {
  padding: 0;
}
.woocommerce div.product form.cart .variations td.woo-variation-items-wrapper {
  margin-bottom: 20px;
}
.woo-variation-swatches .wvs-style-squared.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item {
  box-sizing: border-box;
  height: auto;
  padding: 10px;
}
.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item.selected:not(.no-stock) {
  background: var(--global-color-1-200);
  color: var(--color-corp-1);
  -webkit-box-shadow: var(--wvs-selected-item-box-shadow, 0 0 0 2px var(--color-corp-1));
  box-shadow: 0 0 0 2px var(--color-corp-1);
}
.woo-variation-swatches .wvs-style-squared.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item .variable-item-span {
  font-size: 15px;
  line-height: 1.2em;
}


/* ==========================================================================
6. Wooswipe (Galería WooCommerce)
========================================================================== */
#wooswipe.images {
  margin-right: 4%;
}

@media (min-width: 769px) {
  .woocommerce #content div.product #wooswipe.images {
  width: 35%;
 }
}

.slick-slider .slick-track {
  display: flex;
  align-items: center;
}
body.woocommerce.single-product 
  .woocommerce-product-gallery__image.single-product-main-image {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border: 1px solid var(--border-border-primary) !important;
  padding: 10px !important;
}
body.woocommerce.single-product 
  .woocommerce-product-gallery__image.single-product-main-image 
  .single-product-main-image,
body.woocommerce.single-product 
  .woocommerce-product-gallery__image.single-product-main-image 
  .woocommerce-main-image {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.woocommerce.single-product 
  .woocommerce-product-gallery__image.single-product-main-image img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
}
.thumbnails li.slick-slide {
  margin: 0 5px;
  outline: none !important;
  cursor: pointer;
}
#wooswipe .thumbnails {
  list-style: none;
  height: auto;
  padding: 0;
  margin-bottom: 20px;
}
.thumbnails li.slick-slide div.thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid var(--border-border-primary);
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}
.thumbnails li.slick-slide div.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.thumbnails li.slick-slide:hover div.thumb {
  border-color: #aaaaaa;
}


/* ==========================================================================
5. WooCommerce Shortcode
========================================================================== */
.fouss-woocommerce-shortcode-container .woocommerce.products-shortcode {
  width: 100%;
}

.fouss-woocommerce-shortcode-container .woocommerce.products-shortcode ul.products {
  display: flex;
  margin-bottom: 0;
  height: 100%;
}

.fouss-woocommerce-shortcode-container .woocommerce.products-shortcode ul.products li {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  flex-grow: 1;
  width: 100%;
}

.fouss-woocommerce-shortcode-container .woocommerce.products-shortcode ul.products li.last{
  margin-right: 0;
}


/* ==========================================================================
5. WooCommerce Checkout
========================================================================== */
.woocommerce-checkout #billing_nif_field {
  clear: both;
}

/*=============================================
=     Formulario Contacto - Contact Form 7    =
=============================================*/
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 input[type="password"],
.wpcf7 input[type="search"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="submit"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100% !important;
}

.formulario-contacto-cf7 p,
.formulario-contacto-cf7-pagina p {
  margin-bottom: 10px;
}


.formulario-contacto-cf7 label,
.formulario-contacto-cf7-pagina label {
  margin-bottom: 7px;
  display: inline-block;
}

.wpcf7-acceptance .wpcf7-list-item {
  margin-left: 0 !important;
}

.wpcf7-acceptance .wpcf7-list-item {
  font-size: 0.85em;
}

.wpcf7-acceptance .wpcf7-list-item-label {
  padding-left: 5px;
}

p.contacto-texto-privacidad {
  font-size: 0.75em;
}

.wpcf7 input[type="file"] {
  margin-top: 10px;
}

.formulario-contacto-cf7-pagina input[type="submit"] {
	background: var(--sage);
	color: #FFF
}

.formulario-contacto-cf7-pagina input[type="submit"]:hover {
	background: #FFF;
	color: var(--tiber);
}

.wpcf7-response-output {
	background: #FFF;
}


/* Responsive Formulario Contacto */
#responsive-form {
  margin-left: -20px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}

.column-third,
.column-half,
.column-full {
  padding-left: 20px;
  padding-bottom: 20px;
}

.column-full {
  width: 100%;
}

.column-half {
  width: 50%;
}

.column-third {
  width: 33.333%;
}

@media (max-width: 767px) {
  .column-half,
	.column-third {
    width: 100%;
  }
}
