/* =========================================================
   CAPCROCHET MENU — ESTILOS FRONT
   ========================================================= */

/* =========================
   1) BOTÓN (BURGER) + WRAPPER
   ========================= */

/* Contenedor general (por si quieres posicionarlo) */
.ccm-wrapper{
  position: relative;
}

/* Botón que abre el menú */
.ccm-burger{
  display: inline-flex;        /* botón en línea pero con flex */
  align-items: center;         /* centra vertical */
  gap: .55rem;                 /* espacio entre texto e icono */
  border: 1px solid rgba(0,0,0,.2);
  background: #fff;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
}

/* Texto del botón */
.ccm-burger-text{
  font-size: 14px;
}

/* Caja del icono hamburguesa */
.ccm-burger-box{
  width: 20px;
  height: 14px;
  position: relative;
  display: inline-block;
}

/* Las 3 líneas de la hamburguesa */
.ccm-burger-inner,
.ccm-burger-inner:before,
.ccm-burger-inner:after{
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  content: "";
}

/* Línea central */
.ccm-burger-inner{
  top: 50%;
  transform: translateY(-50%);
}

/* Línea superior */
.ccm-burger-inner:before{
  top: -6px;
}

/* Línea inferior */
.ccm-burger-inner:after{
  top: 6px;
}


/* =========================
   2) OVERLAY (FONDO OSCURO)
   ========================= */

/* Fondo negro que aparece detrás del drawer */
.ccm-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 9998;
}

/* Cuando está oculto */
.ccm-overlay[hidden]{
  display: none;
}


/* =========================
   3) DRAWER (MENÚ LATERAL)
   ========================= */

.ccm-drawer{
  position: fixed;
  inset: 0 auto 0 0;                    /* pegado a la izquierda */
  width: min(92vw, 420px);              /* ancho responsive (máx 420px) */
  background: #fff;

  transform: translateX(-105%);         /* empieza fuera de pantalla */
  transition: transform .24s ease;      /* animación al abrir/cerrar */
  z-index: 9999;

  display: flex;
  flex-direction: column;
  box-shadow: 3px 0 18px rgba(0,0,0,.08);

  height: 100dvh;                       /* mejor en móviles modernos */
  height: 100vh;                        /* fallback */
}

/* Drawer abierto */
.ccm-drawer[aria-hidden="false"]{
  transform: translateX(0);
}

/* Cabecera del drawer (se queda fija arriba) */
.ccm-drawer-header{
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #fff;
  z-index: 1;
}

/* Botón de cerrar "X" */
.ccm-close{
  font-size: 24px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* Zona del logo dentro del drawer */
.ccm-logo{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex;
  justify-content: center;
}

/* Tamaño del logo (responsive) */
.ccm-logo img{
  width: clamp(130px, 42vw, 220px);
  height: auto;
  display: block;
}

/* Contenido scrolleable del drawer */
.ccm-drawer-content{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 14px 14px;
}


/* =========================
   4) LISTADO DE CATEGORÍAS
   ========================= */

/* Para evitar problemas raros de tamaños */
.ccm-cats *{
  box-sizing: border-box;
}

/* Lista sin bullets */
.ccm-cat-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Cada fila/categoría */
.ccm-cat-item{
  border-top: 1px solid rgba(0,0,0,.08);
}

/* Fila de categoria (texto + flecha) */
.ccm-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 6px;
}

/* Link de categoría */
.ccm-cat-link{
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* Categoría activa */
.ccm-cat-link.is-active{
  font-weight: 700;
}

/* Botón flechita abrir/cerrar subcategorías */
.ccm-toggle{
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}

/* Icono flecha */
.ccm-toggle:before{
  content: "▾";
  display: block;
  line-height: 1;
}

/* Si está abierto cambia la flecha */
.ccm-cat-item.is-open > .ccm-row .ccm-toggle:before{
  content: "▴";
}

/* Contenedor subcategorías */
.ccm-subwrap{
  padding-left: 10px;
}

/* Oculto */
.ccm-subwrap[hidden]{
  display: none;
}

/* Subcategoría estilo más “suave” */
.ccm-subwrap .ccm-cat-link{
  text-transform: none;
  opacity: .85;
}


/* =========================
   5) BLOQUEO SCROLL BODY
   ========================= */

/* Cuando el menú está abierto, bloqueamos scroll de la web */
body.ccm-no-scroll{
  overflow: hidden;
  touch-action: none;
}


/* =========================================================
   6) TARJETAS / CAJAS (LO QUE QUIERES RETOCAR)
   ========================================================= */

/* --------
   GRID (disposición de cajas)
   --------
   CAMBIA AQUÍ:
   - 2 columnas (default) -> repeat(2,...)
   - 3 columnas -> repeat(3,...)
   - separación entre cajas -> gap
   - margen arriba/abajo -> margin
*/
.ccm-subcat-grid{
  display: grid;

  /* 👇 2 columnas */
  grid-template-columns: repeat(2, minmax(0, 1fr));

  /* 👇 separación entre cajas */
  gap: 24px;

  /* 👇 margen del bloque de cajas */
  margin: 24px 0;
}

/* En móvil: 1 columna */
@media (max-width: 768px){
  .ccm-subcat-grid{
    grid-template-columns: 1fr;
  }
}


/* --------
   CAJA (tarjeta entera)
   --------
   CAMBIA AQUÍ:
   - border-radius (esquinas)
   - sombra
   - etc.
*/
.ccm-card{
  display: flex;
  flex-direction: column;
  text-decoration: none;

  background: #fff;
  border: 1px solid rgba(0,0,0,.08);

  /* 👇 tamaño visual: esquinas */
  border-radius: 16px;

  overflow: hidden;

  /* 👇 sombra */
  box-shadow: 0 8px 24px rgba(0,0,0,.06);

  transition: transform .2s ease, box-shadow .2s ease;
}

/* Hover */
.ccm-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}


/* --------
   IMAGEN (esto define la “altura” principal de la caja)
   --------
   CAMBIA AQUÍ PARA HACER LA CAJA MÁS ALTA O MÁS BAJA:
   - aspect-ratio: 1/1  -> cuadrada (default)
   - aspect-ratio: 4/3  -> un poco rectangular
   - aspect-ratio: 16/9 -> más bajita (apaisada)
*/
.ccm-card__img{
  aspect-ratio: 16 / 10;
  background: #fafafa;
  overflow: hidden;
  display: block;
}

/* La imagen dentro */
.ccm-card__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Si no hay imagen */
.ccm-card__img--empty{
  background: repeating-linear-gradient(
    45deg,
    #fafafa,
    #fafafa 10px,
    #f0f0f0 10px,
    #f0f0f0 20px
  );
}


/* --------
   TÍTULO (texto debajo de la imagen)
   --------
   CAMBIA AQUÍ:
   - padding (altura del bloque)
   - font-size
*/
.ccm-card__title{
  font-weight: 600;
  text-align: center;

  /* 👇 más padding = caja más alta */
  padding: 14px 10px;

  letter-spacing: .03em;
}


/* =========================
   7) REDUCIR ANIMACIONES
   ========================= */
@media (prefers-reduced-motion: reduce){
  .ccm-drawer{ transition: none; }
  .ccm-card{ transition: none; }
}