/*
Theme Name: Migal Theme
Theme URI: https://migal.com
Author: Migal Team
Author URI: https://migal.com
Description: Tema personalizado para Migal
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: migal-theme
*/

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  /* Colores principales */
  --color-primary: #00316b;
  --color-secondary: #007ec1;
  --color-background: #f2f2f2;
  --color-footer: #353534;

  /* Colores de texto */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #ffffff;

  /* Espaciados */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
}

/* Estilos básicos */
body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Clases de utilidad para colores */
.bgmigal-primary {
  background-color: var(--color-primary);
  color: var(--text-light);
}

.bg-secondary {
  background-color: var(--color-secondary);
  color: var(--text-light);
}

.bg-light {
  background-color: var(--color-background);
}

.bg-footer {
  background-color: var(--color-footer);
  color: var(--text-light);
}

.text-primary {
  color: var(--color-primary);
}

.text-secondary {
  color: var(--color-secondary);
}

/* Botones */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--text-light);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--color-secondary);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--text-light);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
}

/* Enlaces */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-secondary);
}

.menu-topbar a {
  border-right: 1px solid #fff;
  padding: 0 10px;
}

.menu-topbar a:last-child {
  border-right: none;
}

ul.primary-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  li {
    display: inline-block;
    a {
      display: block;
      color: #353534;
      padding: 0 20px;
    }
  }
}

/* .navigation-container > a {
    padding: 0 5px;
} */

.topbar-container {
  padding: 12px 0;
  font-size: 14px;

  img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
}

.site-header {
  transition: all 0.3s ease;
  position: relative;
}

/* Estilos para el slider */
#homeSlider {
  position: relative;
}

#homeSlider .carousel-item {
  position: relative;
  height: 500px;
}

#homeSlider .carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

#homeSlider .carousel-item img {
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
}

#homeSlider .carousel-caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

#homeSlider .carousel-caption h2 {
  color: #fff;
  margin-bottom: 1rem;
}

#homeSlider .carousel-caption p {
  color: #fff;
  margin-bottom: 1.5rem;
}

#homeSlider .carousel-caption .btn-primary {
  background-color: var(--color-secondary);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}

#homeSlider .carousel-caption .btn-primary:hover {
  background-color: var(--color-primary);
}

#homeSlider .carousel-control-prev,
#homeSlider .carousel-control-next {
  z-index: 3;
}

#homeSlider .carousel-indicators {
  z-index: 3;
}

#sobreNosotros {
  h4 {
    font-size: 20px;
    font-weight: 600;
    color: #353534;
    margin-bottom: 30px;
  }

  .content {
    h2 {
      font-size: 45px;
      font-weight: 700;
      text-transform: capitalize;
      margin-bottom: 30px;
      color: #353534;
    }

    p {
      font-size: 16px;
      font-weight: 400;
      color: #353534;
    }

    a {
      display: block;
      font-weight: 400;
      font-size: 14px;
      padding: 15px 40px;
      background-color: var(--color-secondary);
      color: #fff;
      text-transform: capitalize;
      border-radius: 2px;
      text-decoration: none;
      margin-top: 20px;
      width: fit-content;
    }
  }
}

/* === FOOTER === */
.footer {
  background: #353534;
  color: #fff;
  font-size: 1rem;
}
.footer .footer-desc {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.footer h5 {
  color: #fff;
  font-weight: 600;
  font-size: 20px;
  line-height: 21px;
  margin-bottom: 1rem;
}
.footer-menu,
.footer-menu li,
.footer-menu a,
.footer-desc,
.footer-horario,
.footer-pedidos,
.footer-avalco,
.footer-legal-menu,
.footer-legal-menu li,
.footer-legal-menu a {
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 21px !important;
}
.footer-menu li {
  margin-bottom: 0.5rem;
}
.footer-menu a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-menu a:hover {
  color: var(--color-secondary);
}
.footer-horario,
.footer-pedidos,
.footer-avalco {
  color: #fff;
  font-size: 1rem;
}
.footer-avalco {
  margin-top: 0.5rem;
}
.footer-legal-menu {
  padding-left: 0;
  margin-bottom: 0;
}
.footer-legal-menu li {
  display: inline;
  margin-right: 1.2rem;
}
.footer-legal-menu li:last-child {
  margin-right: 0;
}
.footer-legal-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 0.97rem;
  transition: color 0.2s;
}
.footer-legal-menu a:hover {
  color: var(--color-secondary);
}
@media (max-width: 767.98px) {
  .footer .row > [class^="col-"],
  .footer .row > [class*=" col-"] {
    text-align: left;
  }
  .footer .row.align-items-center > .col-12 {
    text-align: left !important;
    margin-bottom: 0.5rem;
  }
  .footer-legal-menu {
    text-align: left;
    margin-top: 0.5rem;
  }
}

.subtitle {
  font-size: 48px;
  font-weight: 700;
  color: #353534;
  margin-bottom: 30px;
}

#products {
  background-color: #f2f2f2;

  .product-card {
    /* margin-bottom: 35px; */
    height: 100%;
    background-color: #fff;
    padding: 20px;
    img {
      width: 64px;
      height: auto;
      display: block;
      margin: 0 auto;
      margin-bottom: 15px;
      &.product-image {
        width: 100%;
        object-fit: contain;
        height: 200px;
      }
    }
    h3 {
      min-height: 72px;
      font-size: 30px;
      font-weight: 600;
      color: #353534;
      margin-bottom: 20px;
      text-align: center;
      padding: 0 15px;
    }
    h4 {
      font-weight: 600;
      font-size: 20px;
      color: #007ec1;
      text-transform: uppercase;
      text-align: center;
      margin-bottom: 10px;
    }
    p {
      font-size: 16px;
      font-weight: 400;
      color: #353534;
      text-align: center;
      padding: 0 15px;
    }
    a {
      display: block;
      margin: 0 auto;
      width: fit-content;
      padding: 8px 40px;
    }
  }

  .product-card-offer {
    .product-card {
      border: 1px solid #c2c2c2;
    }
    h3 {
      min-height: initial;
    }
    h4 {
      font-size: 16px;
    }
    h3 {
      font-size: 20px;
    }
    p {
      font-size: 16px;
    }
  }
}

.search-form {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 99;
  width: 100%;
  input {
    width: 100%;
    padding: 10px;
    border: 1px solid #c2c2c2;
  }

  button {
    position: absolute;
    top: 0;
    right: 0;
    height: 48px;
    border-radius: 0;
    padding: 0px 45px;
  }

  i {
    position: absolute;
    top: calc(50% - 15px);
    right: 150px;
    color: #007ec1;
    font-size: 30px;
  }
}

/* Estilos del Mini Carrito */
.mini-cart {
  position: relative;
}

.cart-form {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  z-index: 1000;
  padding: 1rem;
  margin-top: 0.5rem;
}

.cart-items {
  max-height: 400px;
  overflow-y: auto;
}

.cart-item {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  position: relative;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item-details {
  flex-grow: 1;
  position: relative;
}

.cart-item-details h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.cart-quantity-input {
  width: 60px;
  padding: 0.25rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

.cart-item-details .price {
  color: var(--color-primary);
  font-weight: 600;
  margin: 0.5rem 0;
}

.remove-item {
  position: absolute;
  top: 12px;
  left: 6px;
  color: #dc3545;
  font-size: 18px;
  transition: color 0.3s ease;
  background: white;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgb(0 0 0 / 18%);
  z-index: 1;
}

.remove-item:hover {
  color: #c82333;
  background: #f8f8f8;
}

.cart-totals {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #eee;
}

.cart-totals .subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cart-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.empty-cart-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.cart-update-message {
  background-color: var(--color-secondary);
  color: white;
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para el scrollbar del carrito */
.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

.c-pointer {
  cursor: pointer;
}

/* Estilos del Slider de Distribuidores */
.distributors-slider {
  padding: 2rem 0;
  position: relative;
}

.distributors-slider .swiper-container {
  padding: 1rem 0;
}

.distributors-slider .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
}

.distributor-item {
  display: block;
  width: 100%;
  height: 100%;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.distributor-item:hover {
  transform: scale(1.05);
}

.distributor-image {
  width: 100%;
  height: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.distributor-item:hover .distributor-image {
  filter: grayscale(0%);
}

.distributors-slider .swiper-button-next,
.distributors-slider .swiper-button-prev {
  color: var(--color-primary);
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.distributors-slider .swiper-button-next:after,
.distributors-slider .swiper-button-prev:after {
  font-size: 1.2rem;
}

.distributors-slider .swiper-button-next:hover,
.distributors-slider .swiper-button-prev:hover {
  background: var(--color-primary);
  color: white;
}

.company-page {
  h4 {
    font-size: 20px;
    font-weight: 600;
    color: #007ec1;
    line-height: 25.8px;
    text-transform: uppercase;
  }

  h2 {
    font-size: 45px;
    font-weight: 700;
    text-transform: capitalize;
    margin-bottom: 30px;
    color: #353534;
  }

  .content {
    p {
      font-size: 16px;
      font-weight: 400;
      color: #353534;
    }

    a {
      display: block;
      font-weight: 400;
      font-size: 14px;
      padding: 15px 40px;
      background-color: var(--color-secondary);
      color: #fff;
      text-transform: capitalize;
      border-radius: 2px;
      text-decoration: none;
      margin-top: 20px;
      width: fit-content;
    }
  }
}

/* Estilos para la página de empresa */
.company-page .section2-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.company-page .section2-content {
  position: relative;
  z-index: 1;
  padding: 120px 0;
  *,
  p {
    color: #fff;
  }
}

.company-page .bg-light {
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.company-page .right-content-list {
  padding: 40px 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 28px;
    color: #00316b;
  }
}

.breadcrumb {
  h1 {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
  }
  .br-container {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    span,
    a {
      color: #fff;
      font-size: 16px;
      font-weight: 400;
    }
  }
}

.site-header.fixed {
  position: fixed;
  top: 0;
  width: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.contact-page {
  ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    li {
      border-bottom: 1px solid #f2f2f2;
      padding: 20px 0;
      img {
        width: 24px;
        height: 24px;
      }
      h3 {
        font-size: 20px;
        font-weight: 600;
        color: #353534;
        margin-bottom: 10px;
      }
      p {
        font-size: 16px;
        font-weight: 400;
        color: #353534;
      }
    }
  }

  .contact-form {
    padding: 20px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25);

    textarea,
    input {
      width: 100%;
      padding: 10px;
      border: 1px solid #6f6f6f;
      margin-bottom: 15px;
      &[type="submit"] {
        width: fit-content;
        padding: 10px 20px;
        background-color: #007ec1;
        color: #fff;
        border: none;
        cursor: pointer;
      }
    }
  }
}

.box {
  border: 1px solid #c2c2c2;
  padding: 25px;
  margin-bottom: 30px;
  background-color: #fff;

  form {
    position: relative;
  }

  input {
    border-radius: 2px;
    border: 1px solid #6f6f6f;
    font-size: 14px;
    padding: 15px;
    line-height: 21px;
  }

  .abs-button {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #173667;
    color: #fff;
    border: none;
    cursor: pointer;
    bottom: 0;
    margin-bottom: 10px;
    margin-top: 10px;
    margin-right: 10px;
    border-radius: 0;
    width: 33px;
    height: 33px;
  }
}

.bg-grey {
  background-color: #f2f2f2;
}

.categories {
  h4 {
    font-weight: 600;
    font-size: 30px;
    color: #353534;
  }
}

.woocommerce-ordering select {
  border-radius: 0;
  border: 1px solid #c2c2c2;
  padding: 11px;
}

.product-single-page {
  h1 {
    font-size: 48px;
    font-weight: 700;
    color: #353534;
    margin-bottom: 20px;
  }
  .product-image {
    margin-bottom: 30px;
    img {
      width: 100%;
      height: auto;
      object-fit: contain;
    }
  }

  .product-categories {
    margin-bottom: 20px;
    h3 {
      color: #007ec1;
      font-size: 20px;
      font-weight: 600;
    }
  }

  h5 {
    color: #353534;
    font-size: 30px;
    font-weight: 600;
  }

  .product-short-description,
  .product-description {
    margin-top: 30px;
    font-size: 16px;
    line-height: 25.8px;
    color: #353534;
  }

  .product_add_cart {
    background-color: #007ec1;
    color: #fff;
    padding: 15px 30px;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;

    &:hover {
      background-color: #005f99;
    }
  }

  form.cart {
    margin-top: 30px;
    input {
      font-size: 16px;
      padding-block: 15px;
      height: initial;
      width: initial;
    }
  }
}

/* @media (max-width: 930px) {
  .topbar-container
    .d-flex.align-items-center {
      flex-direction: column;
      gap: 0 !important;
    }

    .d-flex.justify-content-end {
      justify-content: center !important;
    }
} */

/* Estilos para el header móvil */
.site-header-mobile {
  display: none;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background-color: var(--color-primary);
    color: var(--text-light);
    /* padding: var(--spacing-md); */
    display: none;
    z-index: 1000;
    height: 100vh;
  ul#menu-menu-principal-1 li {
    display: block;
    a {
      color: #ffff;
      padding: 18px 0px;
      font-weight: 700;
      font-size: 20px;
    }
  }
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list li {
  margin-bottom: var(--spacing-sm);
}

.mobile-contact {
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
}

.mobile-contact p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.mobile-menu,
.just-mobile {
  display: none;
}

/* Media query para resoluciones menores a 930px */
@media (max-width: 930px) {
  .site-header {
    display: none;
  }

  .site-header-mobile {
    display: block;
  }
  .just-desktop {
    display: none;
  }
  .just-mobile {
    display: block;
  }
}
