/*
|--------------------------------------------------------------------------
| CR Mega Vertical Menu
|--------------------------------------------------------------------------
| FrontOffice CSS
|--------------------------------------------------------------------------
*/

#cr-mega-menu {
  position: relative;
  width: 320px;
  z-index: 9999;
  font-family: Arial, Helvetica, sans-serif;
}

/* =========================================================
   HEADER
========================================================= */

.cr-menu-header {
  position: relative;
}

.cr-menu-toggle {
  width: 100%;
  height: 52px;
  background: transparent;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cr-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cr-menu-title {
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* =========================================================
   CONTENEDOR
========================================================= */

.cr-menu-container {
  position: absolute;
  top: 70px;
  width: 300px;
}

/* =========================================================
   LISTA PRINCIPAL
========================================================= */

.cr-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-top: none;
}

/* =========================================================
   ITEMS
========================================================= */

.cr-menu-item {
  position: relative;
}

.cr-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  color: #222222;
  text-decoration: none;
  border-bottom: 1px solid #f1f1f1;
  transition: all 0.25s ease;
  background: #ffffff;
}

.cr-menu-link:hover {
  background: #f8f8f8;
  padding-left: 24px;
  color: #1c5d46;
}

/* =========================================================
   LADO IZQUIERDO
========================================================= */

.cr-menu-link-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =========================================================
   ICONOS
========================================================= */

.cr-category-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.cr-default-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  flex-shrink: 0;
}

/* =========================================================
   NOMBRE
========================================================= */

.cr-category-name {
  font-size: 1.2rem;
  font-weight: 400;
  font-family: roboto;
  color: inherit;
}

/* =========================================================
   FLECHA
========================================================= */

.cr-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  transition: all 0.2s ease;
}

.cr-menu-item:hover .cr-arrow {
  color: #1c5d46;
  transform: translateX(4px);
}

/* =========================================================
   MEGAMENU
========================================================= */

.cr-megamenu {
  position: absolute;
  top: 0;
  left: 100%;
  width: 980px;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid #ececec;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  display: none;
  animation: crFade 0.25s ease;
}



/* =========================================================
   INNER
========================================================= */

.cr-megamenu-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
}

/* =========================================================
   COLUMNAS
========================================================= */

.cr-megamenu-columns{
    flex:1;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(125px,1fr));
    gap:20px;
}

.cr-megamenu-column {
  min-width: 0;
}

/* =========================================================
   TITULO COLUMNA
========================================================= */

.cr-column-title {
  margin: 0 0 15px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  border-bottom: 1px solid #ff9b58;
  text-transform: uppercase;
  text-align: center;
}

.cr-column-title a {
  color: #111111;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cr-column-title a:hover {
  color: #1c5d46;
}

/* =========================================================
   IMAGEN COLUMNA
========================================================= */

.cr-column-image {
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 10px;
}

.cr-column-image img {
  margin: auto;
  display: block;
  transition: transform 0.3s ease;
}

.cr-column-image:hover img {
  transform: scale(1.04);
}

/* =========================================================
   SUBCATEGORIAS
========================================================= */

.cr-subcategory-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cr-subcategory-item {
  margin-bottom: 10px;
  margin-left: 25px;
  list-style: circle;
}

.cr-subcategory-item:last-child {
  margin-bottom: 0;
}

.cr-subcategory-item a {
  color: #666666;
  text-decoration: none;
  font-size: 15px;
  font-weight: 300;
  transition: all 0.2s ease;
}

.cr-subcategory-item a:hover {
  color: #1c5d46;
  padding-left: 5px;
}

.cr-sub-subcategory-list {
  margin-top: 8px;
  padding-left: 15px;
}

.cr-sub-subcategory-item {
  margin-bottom: 6px;
}

.cr-sub-subcategory-item a {
  font-size: 13px;
  opacity: 0.8;
}
/* =========================================================
   SIDEBAR
========================================================= */

.cr-megamenu-sidebar {
  flex-shrink: 0;
}

/* =========================================================
   BANNER
========================================================= */

.cr-banner {

}

.cr-banner a {
  display: block;
}

.cr-banner img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

/* =========================================================
   PRODUCTOS DESTACADOS
========================================================= */

.cr-featured-products {
  width: 100%;
}

.cr-featured-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #111111;
}

/* =========================================================
   LISTA PRODUCTOS
========================================================= */

.cr-featured-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =========================================================
   PRODUCTO
========================================================= */

.cr-featured-product {
  border: 1px solid #f1f1f1;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s ease;
  background: #ffffff;
}

.cr-featured-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cr-featured-product > a {
  display: block;
  text-decoration: none;
}

/* =========================================================
   IMAGEN PRODUCTO
========================================================= */

.cr-product-image {
  width: 100%;
  overflow: hidden;
}

.cr-product-image img {
  width: 100%;
  display: block;
}

/* =========================================================
   INFO PRODUCTO
========================================================= */

.cr-product-info {
  padding: 14px;
}

.cr-product-name {
  font-size: 13px;
  color: #222222;
  line-height: 1.4;
  margin-bottom: 8px;
}

.cr-product-price {
  font-size: 18px;
  font-weight: 700;
  color: #e53935;
}

/* =========================================================
   ANIMACIONES
========================================================= */

@keyframes crFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   TABLET
========================================================= */

@media (min-width: 992px) and (max-width: 1400px) {
  .cr-megamenu {
    width: 760px;
  }

  .cr-megamenu-columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .cr-megamenu-sidebar {
    width: 220px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 991px) {
  #cr-mega-menu {
    width: 100%;
  }

  .cr-menu-container {
    display: none;
  }

  #cr-mega-menu.mobile-open .cr-menu-container {
    display: block;
  }

  .cr-menu-link {
    min-height: 52px;
    padding: 0 16px;
  }

  .cr-megamenu {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
    display: none;
  }

  .cr-menu-item.active > .cr-megamenu {
    display: block;
  }

  .cr-megamenu-inner {
    flex-direction: column;
    padding: 20px;
  }

  .cr-megamenu-columns {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cr-megamenu-sidebar {
    width: 100%;
  }

  .cr-column-image img {
    max-width: 100%;
  }
}
