/* =====================
   RESET
===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =====================
   VARIABLES
===================== */
:root {
  --color-bg: #ffffff;
  --color-text: #000000;
}

/* =====================
   BASE
===================== */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-family:'Montserrat', sans-serif;
  font-family:'Inter', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* =====================
   MEDIA DEFAULT
===================== */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* =====================
   FORM RESET
===================== */
input,
button,
textarea,
select {
  font: inherit;
}

/* =====================
   LINKS & BUTTONS
===================== */
a {
  text-decoration: none;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ====================================================================================
   DESARROLLO DE LA PÁGINA WEB
==================================================================================== */
.actions a,
.secondary-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-btn i {
  font-size: 16px;
}

/* ================================
   HEADER
================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.container {
  width: 95%;
  max-width: 1300px;
  margin: 0 auto;
}

/* ================================
   TOPBAR
================================ */

.topbar {
  background: #e30613;
  padding: 6px 0;
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-desktop img {
  height: 50px;
  height: 60px;
}

.logo-mobile{
  display: none;
}

.search {
  flex: 1;
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  max-width: 600px;
}

.search input {
  flex: 1;
  padding: 12px 18px;
  border: none;
  outline: none;
}

.search-btn {
  padding: 0 20px;
  background: #e30613;
  color: white;
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 25px;
}

.actions a {
  color: white;
  font-weight: 500;
  font-size: 14px;
}

/* ================================
   SUBBAR
================================ */

.subbar {
  background: #f2f2f2;
  background: #fff;
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.subbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.categories-btn {
  font-weight: 600;
}

.secondary-nav {
  display: flex;
  gap: 25px;
}

.secondary-nav a {
  color: #333;
  font-size: 14px;
}

.secondary-nav a.sucursales{
  color:#e30613;
  font-weight:600;
}

/* ================================
   MOBILE
================================ */

.mobile-menu-btn {
  display: none;
  font-size: 22px;
  color: white;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: white;
  padding: 80px 20px;
  transition: 0.3s ease;
  z-index: 2000;
}

.mobile-drawer.active {
  left: 0;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 1500;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ================================
   RESPONSIVE
================================ */
/*Media querie para dispositivos moviles*/
/* Estilos específicos para pantallas pequeñas */
@media (max-width: 768px) {
  body {
    font-size: 0.875rem;
  }

  .logo-desktop{
    display: none;
  }
  
  .logo-mobile{
    display: flex;
  }

  .logo-mobile img {
    height: 50px;
    height: 50px;
  }
  
}

@media (max-width: 1024px) {

  .actions {
    display: none;
  }

  .secondary-nav {
    display: none;
  }

  .subbar {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .search {
    max-width: 100%;
  }

}

/*-------------------------------------------- Panel de categorias --------------------------------------------*/
/* ===============================
   PANEL CATEGORÍAS
=================================*/

.categories-panel{
  position:fixed;
  top:120px;
  left:0;
  width:100%;
  background:#fff;
  border-top:1px solid #eee;
  box-shadow:0 15px 40px rgba(0,0,0,.12);
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:.25s ease;
  z-index:999;
}

.categories-panel.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

/* wrapper */

.categories-wrapper{
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:380px;
}

/* sidebar */

.categories-sidebar{
  border-right:1px solid #eee;
  padding:20px 0;
  background:#fafafa;
}

.cat-item{
  width:100%;
  padding:14px 24px;
  display:flex;
  justify-content:space-between;
  font-weight:500;
  color:#333;
  transition:.2s;
}

.cat-item:hover,
.cat-item.active{
  background:#eee;
}

/* content */

.categories-content{
  padding:30px 40px;
  display:grid;
}

.cat-content{
  display:none;
  grid-template-columns:repeat(3,1fr);
  gap:40px;
}

.cat-content.active{
  display:grid;
}

.col h4{
  margin-bottom:12px;
  font-size:15px;
}

.col a{
  display:block;
  color:#555;
  padding:4px 0;
  font-size:14px;
}

.col a:hover{
  color:#e30613;
}

/* ===============================
   MOBILE
=================================*/

@media(max-width:1024px){

  .categories-panel{
    top:0;
    height:100vh;
    overflow:auto;
  }

  .categories-wrapper{
    grid-template-columns:1fr;
  }

  .categories-sidebar{
    border-right:none;
  }

  .cat-content{
    grid-template-columns:1fr;
    gap:20px;
    padding-top:10px;
  }

}

/*-------------------------------------------- Main --------------------------------------------*/
/* =========================
   SLIDER
========================= */

.hero-slider{
  width:100%;
  background:#f5f5f5;
  padding:14px 0;
}

.slider{
  position:relative;
  max-width:1300px;
  margin:auto;
  overflow:hidden;
  border-radius:14px;
}

.slide{
  position:absolute;
  inset:0;
  opacity:0;
  transition:opacity .6s ease;
}

.slide.active{
  opacity:1;
  position:relative;
}

.slide img{
  width:100%;
  height:auto;
  display:block;
  border-radius:14px;
}

/* botones */

.slider-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:50%;
  background:white;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
  font-size:20px;
  display:grid;
  place-items:center;
  z-index:10;
  transition:.2s;
}

.slider-btn:hover{
  transform:translateY(-50%) scale(1.1);
}

.prev{ left:12px; }
.next{ right:12px; }

/* responsive */

@media(max-width:768px){
  .slider-btn{
    width:34px;
    height:34px;
    font-size:16px;
  }
}

/* =========================
   DOTS SLIDER
========================= */
.slider-dots{
  position:absolute;
  bottom:14px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:10px;
  z-index:15;
}

.slider-dots button{
  width:12px;
  height:12px;
  border-radius:50%;
  border:none;
  background:#ffffff80;
  cursor:pointer;
  transition:.3s;
}

.slider-dots button.active{
  background:#fff;
  transform:scale(1.25);
}

.slider-dots button:hover{
  background:#fff;
}

/*-------------------------------------------- Categorias --------------------------------------------*/
.categories{
  padding:28px 0;
  background:#eee;
}

.categories-track{
  display:grid;
  grid-template-columns: repeat(7,1fr);
  gap:22px;
  gap: 20px;
}

.category-card{
  background: #d8fdd7;
  background:#dbeaf1;
  border-radius:18px;
  padding: 20px 16px;
  padding:10px 8px;
  text-align:center;
  transition:.25s;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:150px;
}

.category-card img{
  width:85px;
  height:85px;
  width: 80%;
  height: 80%;
  object-fit:contain;
  margin-bottom:10px;
  
}

.category-card span{
  font-weight:600;
  color:#1d2a33;
  display: block;
}

.category-card:hover{
  transform:translateY(-6px);
  box-shadow:0 10px 25px rgba(0,0,0,.12);
}

/* =========================
   TABLET
========================= */

@media(max-width:1024px){

  .categories-track{
    display:flex;
    overflow-x:auto;
    gap:16px;
    scroll-snap-type:x mandatory;
    padding-bottom:8px;
  }

  .categories-track::-webkit-scrollbar{
    display:none;
  }

  .category-card{
    min-width:160px;
    flex-shrink:0;
    scroll-snap-align:start;
  }
}

/* =========================
   MOBILE
========================= */

@media(max-width:600px){
  .categories-track{
    gap:6px;
  }
  .category-card{
    min-width:120px;
    padding:18px 14px;
    padding:5px 0px;
    width: 120px;
    min-height:auto;
  }

  .category-card img{
    width:120px;
    height:100px;

    margin-bottom: 0px;
    
  }

  .category-card span{
    padding: 0 6px; 
    
  }

  .categories{
    padding:22px 0;
  }
}












