/* Custom CSS */

/* PRODUCT GRID/SLIDER ---------------------------------------------- */
@media screen and (min-width: 640px) {

    .products-grid .product-item .product-image-wrapper {
        padding-bottom:100% !important;
    }

    .products-grid .product-item-info {
        height: 450px;
    }

    .products-grid.grid .product-item-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        margin-bottom: 30px;
        min-height: 39px;
    }

    .products-grid.grid .product-item .price-box {
        margin: 10px 0 22px;
        text-align: center;
    }

    .products-grid .product-item-info {
        border: 1px solid #bbb;
        margin: -10px -10px 8px -10px;
        padding: 9px;
    }

    .products-grid .product-item-info:not(:hover):not(.active) .product-item-inner {
        border: 0;
        clip: unset;
        height: auto;
        margin: -1px;
        overflow: unset;
        padding: 0 9px 9px;
        position: relative;
        width: auto;
    }

    .block.widget .products-grid .product-item .product-item-inner,
    .page-layout-1column .block.widget .products-grid .product-item .product-item-inner {
        box-shadow: unset;
    }

    .products-grid .product-item-inner {
        box-shadow: unset;
        border: 0;
        margin: inherit;
        position: inherit;
        padding: 0 9px 9px;
    }

    .products-grid .product-item-info:hover {
        border: 1px solid #cb3040;
        position: inherit;
    }

    .products-grid .product-item-actions .actions-primary,
    .products-grid .product-item-actions .actions-primary .action {
        width: 100%;
    }

    .products-grid .product-item-actions {
        margin: 0;
    }

    .products-grid .product-item-actions .actions-primary + .actions-secondary > .action {
        line-height: 24px;
        text-align: center;
        width: 24px;
    }

    .products-grid .opencallforpopup {
        text-align: center;
    }

    .products-grid .opencallforpopup .action {
        width: 100%;
    }

    .products-grid .product-item-actions .actions-primary {
        text-align: center;
    }

    .products-grid .product-item-actions .actions-primary .stock img {
        height: 25px;
    }

    .products-grid .product-item-actions .actions-primary .stock span {
        display: none;
    }
}

/* Stock - NO stock Icons */
.ec-product-in-stock, .ec-product-out-of-stock  {
    padding: 4px;
}

.ec-product-in-stock span, .ec-product-out-of-stock span {
    display: inline-block !important;
}

.ec-product-in-stock {
    color: green;
}

.ec-product-out-of-stock {
    color: orange;
}

/* CFP Empty Price */
.cfp-empty-price {
    height: 39px;
}

/* Product Slider */
.owl-item .product-image-photo {
    max-width: max-content;
    max-height: max-content;
}
/* ------------------------------------------------------------------ */


/* PRODUCT PAGE ----------------------------------------------------- */

@media screen and (min-width: 768px) {
    /* Layout - Media column (left) */
    .page-layout-1column .product.media {
        width: 47%;
    }

    /* Layout - Product info column (right) */
    .page-layout-1column .product-info-main {
        width: 50%;
    }

    /* Product name */
    .product-info-main h1 {
        font-size: 30px;
    }

    /* Product price */
    .product-info-price .price-box .price-container .price {
        font-size: 25px;
    }

    /* Product custom message on option */
    .product_options_radio .hidden-text {
        width: 400px;
    }

    /* Product - Price message */
    .product-price-message {
        padding-top: 8px !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 800px)
{
    .product_options_radio .hidden-text {
        width: 200px;
    }
}

@media screen and (min-width: 801px) and (max-width: 900px)
{
    .product_options_radio .hidden-text {
        width: 250px;
    }
}

@media screen and (min-width: 901px) and (max-width: 1000px)
{
    .product_options_radio .hidden-text {
        width: 300px;
    }
}

@media screen and (min-width: 1001px) and (max-width: 1100px)
{
    .product_options_radio .hidden-text {
        width: 350px;
    }
}

/* Product Main Info - Wrapper */
.product-main-info {
    margin-bottom: 15px;
}

/* Product Main Info - Attribute name */
.product-main-info .attribute-name {
    text-transform: uppercase;
}

/* Product Main Info - Attribute value */
.product-main-info .attribute-value {
    text-transform: uppercase;
    font-weight: bold;
}

/* Product - Price message */
.product-price-message {
    display: table-cell;
    padding-bottom: 10px;
    padding-left: 3%;
    text-align: left;
    font-style: italic;
    color: #cb3040;

    min-width: 90px;
    vertical-align: top;
    padding-top: 2px;
}

/* Product Page - Configurable options */
.product_options_radio {
    margin-left: 25px;
}

.product_options_radio input {
    margin-bottom: 16px;
}

.product_options_radio .state-question {
    margin-left: 10px;
}

.product_options_radio .hidden-text {
    display: none;
    position:absolute;
    margin-left: 10px;
    padding: 10px;
    border: 1px solid orange;
    background: wheat;
    font-style: italic;
}

.product_options_radio .state-question:hover + .hidden-text {
    display: unset;
}
/* ------------------------------------------------------------------ */

/* Fix for Breadcrumb */
.columns .column.main .breadcrumbs {
    padding-left: 0px;
}

/* Slider fix */
/* @TODO chop in resolutions : 1 = 1, 600 = 3, 1000 = 5 */
.owl-carousel {
    padding-left: 40px !important;
    padding-right: 40px !important;
    width: inherit !important;
}

.owl-carousel .owl-stage-outer {
    margin-left: 20px;
    margin-right: 20px;
}

.mp-product-slider-content .owl-nav button span {
    margin-left: 0px !important;
}
/* ------------------------------------------------------------------ */

/* Sidebar products */
.block-products-list.simple-link .block-title {
    color: #e73845;
}

.block-products-list.simple-link .block-title strong {
    font-weight: inherit;
}

.products-simple-link.simple-link .product-item-details {
    margin-left: 0;
}
/* -------------------------------------------------------------------- */


/* DATATABLES */
.datatables_filter_row label {
    float: left;
    margin-right: 10px;
    margin-top: 4px;
}

.datatables_filter_row select {
    width: 200px;
    float: left;
    margin-right: 10px;
}

#datatable_wrapper {
    clear: both;
    padding-top: 40px;
}

#datatable_wrapper #datatable_length select {
    width: inherit !important;
}

#datatable_wrapper #datatable_filter {
    margin-top: 20px;
}

#datatable_wrapper #datatable_filter input {
    width: 600px !important;
    margin-left: 10px;
}

#datatable_wrapper #datatable {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid #cb3040;
}

#datatable_wrapper #datatable thead {
    background-color: #cb3040;
    color: #ffffff;
}

#datatable_wrapper #datatable tbody tr:nth-child(even) {
    background-color: #ccc;
}

#datatable_wrapper #datatable_info {
    text-align: center;
}

#datatable_wrapper #datatable_paginate {
    margin-top: 20px;
    text-align: center;
}

#datatable_wrapper #datatable_paginate #datatable_previous{
    float: left;
}

#datatable_wrapper #datatable_paginate .paginate_button {
    margin-left: 10px;
    margin-right: 10px;
}

#datatable_wrapper #datatable_paginate .paginate_button.current{
    font-weight: bold;
}

#datatable_wrapper #datatable_paginate #datatable_next{
    float: right;
}

/* ================================================================== */
/* HOME ECUCORE (solo afecta si existe el wrapper .ec-home)
   - Fondo hero con imagen
   - Buscador pegado
   - Títulos con línea ----- TÍTULO -----
   - Hovers unificados con color corporativo #b2232c
   ================================================================ */

.ec-home{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* HERO (fondo opción 2) */
.ec-home .ec-hero{
  position: relative;
  text-align: center;
  border-radius: 18px;
  overflow: hidden;
  padding: 44px 18px 26px;
  box-shadow: 0 14px 40px rgba(0,0,0,.08);

  background-image:
    radial-gradient(circle at 50% 18%,
      rgba(255,255,255,.70) 0%,
      rgba(255,255,255,.38) 46%,
      rgba(255,255,255,.62) 100%),
    url("/media/wysiwyg/ecucore/hero/ecucore-hero-red-poly.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ec-home .ec-hero h1{
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.2;
  color: #0b2a4a;
}
.ec-home .ec-hero .ec-sub{
  margin: 0 0 16px;
  font-size: 16px;
  opacity: .85;
  color: #0b2a4a;
}
.ec-home .ec-micro{
  font-size: 13px;
  opacity: .8;
  color: #0b2a4a;
}

/* Buscador pegado */
.ec-home .ec-search{
  display:flex;
  gap: 0 !important;
  justify-content:center;
  align-items:stretch;
  max-width: 980px;
  margin: 0 auto 12px;

  border: 1px solid #dcdcdc;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.ec-home .ec-search input[type="text"]{
  flex:1;
  min-width: 260px;
  border: 0 !important;
  outline: none;
  background: transparent;
  padding: 15px 16px;
  font-size: 16px;
}

.ec-home .ec-search button{
  border: 0 !important;
  border-left: 0 !important; /* pegado total */
  border-radius: 0 !important;
  padding: 0 22px;
  min-width: 120px;
  background: #0b2a4a;
  color: #fff;
  cursor: pointer;
}

.ec-home .ec-search:focus-within{
  border-color: #b2232c;
  box-shadow: 0 0 0 4px rgba(178,35,44,.15), 0 10px 24px rgba(0,0,0,.10);
}

/* Chips */
.ec-home .ec-chips{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  margin: 0 0 14px;
}
.ec-home .ec-chips a{
  display:inline-flex;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f4f6f8;
  border: 1px solid #e6e6e6;
  text-decoration:none !important;
  color:#111 !important;
}

/* CTA */
.ec-home .ec-cta{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin: 0 0 10px;
}
.ec-home .ec-cta a{
  text-decoration:none !important;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  color:#fff !important;
  display:inline-flex;
}
.ec-home .ec-cta a.ec-btn-primary{ background:#b2232c; }   /* ecucore */
.ec-home .ec-cta a.ec-btn-dark{ background:#0b2a4a; }
.ec-home .ec-cta a.ec-btn-wa{ background:#1fa855; }

/* Títulos con línea ----- TÍTULO ----- */
.ec-home .ec-title.ec-title-line{
  display: flex !important;
  align-items: center !important;
  gap: 16px;
  margin: 26px 0 14px;
  text-align: center;
}
.ec-home .ec-title.ec-title-line span{
  display: inline-block;
  white-space: nowrap;
}

.ec-home .ec-title.ec-title-line::before,
.ec-home .ec-title.ec-title-line::after{
  content: "" !important;
  display: block !important;
  flex: 1 1 auto !important;
  height: 4px !important;
}

.ec-home .ec-title.ec-title-line::before{
  background: linear-gradient(to left, rgba(178,35,44,.90), rgba(178,35,44,.45), rgba(178,35,44,0)) !important;
}
.ec-home .ec-title.ec-title-line::after{
  background: linear-gradient(to right, rgba(178,35,44,.90), rgba(178,35,44,.45), rgba(178,35,44,0)) !important;
}

/* Grids */
.ec-home .ec-grid{
  display:grid;
  gap:12px;
}
.ec-home .ec-grid.ec-grid-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.ec-home .ec-grid.ec-grid-6{ grid-template-columns: repeat(6, minmax(0,1fr)); }
.ec-home .ec-grid.ec-grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }

/* Tarjetas */
.ec-home a.ec-card{
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 16px;
  background:#fff;
  text-decoration:none !important;
  color:#111 !important;
  display:flex;
  gap:12px;
  align-items:center;
}
.ec-home .ec-card-title{
  display:block;
  font-weight:700;
  line-height:1.2;
  color:#111 !important;
}
.ec-home .ec-card-sub{
  display:block;
  margin-top:2px;
  opacity:.75;
  color:#111 !important;
}
.ec-home .ec-hint{
  margin: 10px 0 0;
  font-size: 13px;
  opacity: .8;
}

/* Iconos (56px) */
.ec-home .ec-icon{
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform .18s ease, filter .18s ease;
}

/* Pills marcas */
.ec-home a.ec-pill{
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px;
  background:#fff;
  text-decoration:none !important;
  color:#111 !important;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ec-home a.ec-pill.ec-pill-strong{ font-weight:700; }

/* Pasos */
.ec-home .ec-step{
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 14px;
  background:#fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ec-home .ec-step-title{ font-weight:700; }
.ec-home .ec-step-sub{ opacity:.75; margin-top:2px; }

/* =======================
   HOVERS unificados (#b2232c)
   ======================= */
.ec-home a.ec-card,
.ec-home a.ec-pill,
.ec-home .ec-step,
.ec-home .ec-chips a,
.ec-home .ec-cta a{
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease, background-color .18s ease;
}

.ec-home a.ec-card:hover,
.ec-home a.ec-pill:hover,
.ec-home .ec-step:hover,
.ec-home .ec-chips a:hover{
  border-color: #b2232c !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.ec-home a.ec-card:hover .ec-card-title{
  color: #b2232c !important;
}

.ec-home a.ec-card:hover .ec-icon{
  transform: scale(1.04);
  filter: saturate(1.1);
}

.ec-home .ec-cta a:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px){
  .ec-home .ec-grid.ec-grid-4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ec-home .ec-grid.ec-grid-6{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ec-home .ec-grid.ec-grid-3{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .ec-home .ec-search{ flex-wrap: wrap; }
  .ec-home .ec-search input[type="text"]{ width: 100%; }
  .ec-home .ec-search button{
    width: 100%;
    min-width: 0;
    padding: 12px 18px;
  }
}

@media (max-width: 600px){
  .ec-home .ec-grid.ec-grid-4,
  .ec-home .ec-grid.ec-grid-6{ grid-template-columns: 1fr; }
}
