

/* Oculta la superposición nativa de Astra */
#astra-mobile-cart-overlay,
.astra-mobile-cart-overlay{
  display:none !important;
}



/* Overlay personalizado */
.cj-cart-overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgb(0 0 0 / 25%);
  opacity:0;
  visibility: hidden;
  transition:opacity .3s ease;
  z-index:9998;
}
.cj-cart-overlay.open{
    opacity:1;
    visibility: visible;
    z-index: 99999999999999999999999999;
}


/* Oculta drawer nativo Astra */
#astra-mobile-cart-drawer, .astra-cart-drawer {
    display:none!important;
}

/* Drawer */
#cj-mobile-cart-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: 430px !important; height: 80vh !important;
  display: flex;
  flex-direction: column;
  transition: right .3s ease;
  z-index: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;
    
}

/* Contenido con espacio inferior */
.cj-drawer-content{flex:1;overflow-y:auto;padding-bottom: 80px;background: #fff;}

/* Footer absoluto */
.cj-drawer-footer{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    background: #ffffffd4;
    backdrop-filter: blur(15px);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, .1);
}


#cj-mobile-cart-drawer.open {
    right: 15px !important;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    z-index: 99999999999999999999999999999999999999999999999999999999999999999999;
}

@media (min-width: 922px) {
  #cj-mobile-cart-drawer {
    width: 35%; height: 75vh;
    top: 12.5vh;
  }
  
  
}


#cj-mobile-cart-drawer > div.cj-drawer-header > h3{
    margin-bottom: 0 !important;
    text-transform: uppercase !important;
    font-size: 20px !important;
}

.cj-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .8rem 1.2rem;
    background: #f7f7f7;
    backdrop-filter: blur(15px);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 7px 14.5px -8px #c9c9c9;
    z-index: 9;
}

#cj-mobile-cart-drawer > div.cj-drawer-header > h3{
    margin-bottom: 0 !important;
}


.cj-drawer-close {
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    font-size: 35px;
    color: #002041 !important;
    justify-content: center;
    align-items: center;
    display: flex;
    text-align: center;
    /* height: 100%; */
    background: none !important;
    /* width: 100px; */
    margin-top: -6px;
}

.cj-cart-items { list-style: none; margin:0; padding:0; padding-bottom: 20px; background: #fcfcfc;}

.cj-cart-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 1rem 40px 0px 15px !important;
  width:100%;          /* nunca más de 100 % */
  overflow:hidden;     /* bloquea la barra horizontal */
}
.cj-cart-item .cj-item-image img { max-width:60px; margin-right:1rem; }

.cj-related-products {
    padding: 1rem;
    margin-top: 1rem;
    padding-bottom: 2rem;
    border-top: 1px solid #ededed;
}

.cj-related-list {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0 0 90px 0!important;
}

.related-item img{
    border-radius: 5px !important;
}

.cj-drawer-footer {
  padding:1rem; border-top:1px solid #eee;
}
.cj-footer-buttons {
  display:flex; justify-content:space-between;
  margin-top:1rem;
}

.cj-footer-buttons a{
    width: 100% !important;
    height: 50px !important;
    border-radius: 15px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    background: #002041;
    color: #fff;
}
.cj-footer-buttons a:hover{
    background: #002041;
    color: #fff;
}


/* Oculta drawer nativo Astra */
#astra-mobile-cart-drawer, .astra-cart-drawer { display:none!important; }

/* Drawer */
.cj-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px; /* ajusta según la altura de tu footer */
}

#cj-mobile-cart-drawer.open { right: 0; z-index: 9999999999999999999999999999999999999999999999999999999999999;}
@media(min-width:922px){
  #cj-mobile-cart-drawer {
    width:35%; height:90vh !important; top:5vh !important;
  }
}

.cj-drawer-header { /* igual que antes */ }
.cj-cart-items { flex:1; overflow-y:auto; list-style:none; margin:0;}
.cj-cart-item { display:flex; justify-content:space-between; align-items:center; padding:1rem; border-bottom:1px solid #eee; }
.cj-item-image img { max-width:60px; }
.cj-cart-item .cj-item-details { flex:1; margin-left:1rem; }
.cj-item-size, .cj-item-custom, .cj-item-price { margin:0.25rem 0; }
.cj-item-remove { background:none; border:none; font-size:1.2rem; cursor:pointer; color:#c00; }

.cj-related-products { padding:1rem; }
.cj-related-list { display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; list-style:none; padding:0; margin:0; }

/* Footer fijo */
/* Footer fijo abajo */
.cj-drawer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    border-radius: 20px 20px 0 0;
    border-top: 1px solid #eee;
    background: #ffffffd9;
    backdrop-filter: blur(15px);
    box-shadow: 0 7px 14.5px 8px #0000002e;
}

.cj-footer-buttons{
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 0 !important;
}
.cj-footer-buttons .button{
    border-radius: 13px !important;
    text-align: center;
    font-size: 15px !important;
}
.button.ver-carrito{
    background: #ededed !important;
    color: #002041 !important;
}
.button.tramitar-pedido{
    background: #002041 !important;
    color: #fff !important;
}




/* --- Layout horizontal de cada ítem --- */
.cj-cart-item{
    /* display: flex; */
    align-items: start;
    gap: 12px;
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: transparent;
}
.cj-col.cj-img{
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    border-radius: 5px;
}
.cj-col.cj-img img{
    border-radius: 10px;
    height: auto;
    width: auto;
    max-height: 89px !important;
    max-width: 90px !important;
    margin: auto !important;
    filter: drop-shadow(0 0 5px #c3c3c3);
}
.cj-col.cj-info{
    flex: 1;
    min-width: 0;
    display: grid;
    height: auto !important;
    align-items: start;
}
.cj-item-name{
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    color: #002041e8;
}
.meta{
  font-size: 18px;
  color: #a9a9a9;
  margin-top: 6px;
  margin-left: -15px;
}
.variation{
    display: flex;
}
.variation dd{
    margin: 0;
}
.variation p{
    margin: 0;
    padding: 2px 15px;
    line-height: 1;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}
.variation-Nmero{
    border-left: 1px solid #d7d7d7ee;
}
.cj-item-price{
    font-weight: 600;
    color: #0b2740;
    margin: 0;
    display: flex;
    flex-direction: row-reverse;
    justify-content: start;
    gap: 10px;
    align-items: center;
    line-height: 20px;
}
.cj-item-price del{
    color: #002041b0;
    font-size: 13px;
    text-shadow: 0 0 4px #b5b5b5;
}
.cj-item-price ins{
    font-size: 17px;
    font-weight: 700;
    text-shadow: 0 0 4px #b5b5b5;
}
.cj-col.cj-remove{
    width: 35px;
    display: flex
;
    justify-content: center;
    text-align: right;
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1rem !important;
}
.cj-item-remove{
    background: none;
    position: relative;
    border: none;
    bottom: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #999 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}




/* Tarjetas relacionados – apilar título y precio */
.cj-related-products h3{
    margin-bottom: 10px !important;
    font-size: 20px;
    font-weight: 700;
    color: #002041;
}



.related-item a{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  text-decoration:none;
  gap:2px;
}
.rel-title{
    font-size: .88rem;
    line-height: 1.2;
    font-weight: 500;
    margin-top: 5px;
    color: #002041de;
}
.rel-price {
    color: #0b2740;
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
    line-height: 20px;
    font-weight: 700;
}

.rel-price del{
    font-size: 13px;
    color: #002041c4;
}

.cj-cart-total{
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 17px;
    font-weight: 700;
    color: #002041;
    border-bottom: 1px solid #0020410d;
    padding-bottom: 5px;
}


/* ───── Personalización (Nombre / Número) igual que antes ───── */
.cj-item-metaaa{
    font-size: 0.85rem !important;
    color: #666 !important;
    line-height: 1.2 !important;
    margin-top: 7px !important;
    padding: 0 !important;
    font-weight: 500 !important;
}

/* aire extra debajo de la lista de productos */
.cj-cart-items{
    padding-bottom:24px !important;        /* ajusta a gusto */
}



/* WooCommerce envuelve cada meta en <dl class="variation"> … */
.cj-item-metaaa dl{
  margin:0;
}

/* quitar margen y bullet que WooCommerce añade a <dd> */
.cj-item-metaaa dd{
  margin:0;
  padding:0;
  display:inline;         /* valores en línea */
}

/* Meta pieces separados con barra y espacio mayor */
.cj-item-meta-text{
    display: flex;
    gap: 10px;
    font-size: .80rem;
    line-height: 1.3;
    color: #afafaf;
    flex-wrap: wrap;
    white-space:normal !important;
}

.cj-item-meta-text .meta-piece + .meta-piece { margin-left:.3em; }
/* PARCHES */
.cj-item-patches .patch-thumb{
    width: 17px;
}


.meta-piece{
  position:relative;
  padding-left:15px;        /* espacio para la barra vertical */
  text-transform: uppercase;
}
.meta-piece:first-child{
  padding-left:0;           /* el primero no necesita hueco */
}
.meta-piece:not(:first-child)::before{
  content:"|";
  position:absolute;
  left:0;
}





/* Bloque resumen ─ letra pequeña antes del TOTAL */
.row{
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    line-height: 1.4;
    color: #002041;
}
dt{
  margin:0;
}
dd{
  margin:0;
  font-weight:600;
}


/* ── bloque progreso envío ───────────────────────── */
#cj-shipping-progress-wrapper#cj-shipping-progress-wrapper {
    width: 100%;
    margin-bottom: 13px;
    z-index: 99999999;
}

.cj-drawer-footer #cj-summary-wrapper{
    padding-top: 10px;
    border-top: 1px solid #0020410d;
    /* border-bottom: 1px solid #0020410d; */
}

.cj-ship-msg{
    font-size: 12px;
    margin: auto;
    color: #002041;
    text-align: center;
    width: 100%;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 800;
}
p.cj-ship-msg strong {
    font-weight: 900;
}
.cj-ship-msg.success{ color:#005507; }
.cj-progress-bar{
  height:6px;
  background:#ededed;
  border-radius:3px;
  overflow:hidden;
}
.cj-progress-bar span{
  display:block;
  height:100%;
  background:#002041;          /* color progreso normal */
  transition:width .3s;
}
.cj-ship-msg.success + .cj-progress-bar span{
  background:#005507;             /* verde cuando es gratis */
  width:100%!important;
}




/* botón checkout deshabilitado */
.checkout-button.disabled{
  background:#bfbfbf!important;
  cursor:not-allowed;
  pointer-events:none;
  color: #fff;
}



.cj-empty-cart{
    justify-content: center;
    display: flex;
    margin-top: 30px;
    font-size: 20px;
    font-weight: 700;
    color: #002041;
}




/* ==== FIX: relacionados del drawer en móvil – sin overflow ==== */

/* Contenedor padre: nunca dejar que salga nada por los lados */
#cj-mobile-cart-drawer .cj-related-products{
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Grid robusto: 2 columnas con fracciones (el gap ya no “suma” ancho) */
#cj-mobile-cart-drawer .cj-related-list{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 0 141px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Evita que el contenido ensanche las columnas */
#cj-mobile-cart-drawer .cj-related-list .related-item{ min-width: 0 !important; }
#cj-mobile-cart-drawer .cj-related-list .related-item a{
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    text-decoration: none;
    background: #f3f3f3;
    border-radius: 6px;
}
#cj-mobile-cart-drawer .cj-related-list .related-item img {
    max-width: 190px;
    max-height: 200px;
    width: auto;
    height: auto;
    padding: 10px;
    margin: auto;
    filter: drop-shadow(0 0 5px #c3c3c3);
}

/* Los textos no deben empujar el ancho */
#cj-mobile-cart-drawer .cj-related-list .rel-title{
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-top: 5px !important;
    background: #ffffff;
    padding-top: 6px;
}
#cj-mobile-cart-drawer .cj-related-list .rel-price{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    flex-direction: row;
    width: 100%;
    margin-top: -3px;
    background: #ffffff;
}




/* === ICONO PAPELERA – tamaño, color y visibilidad === */

/* Botón cómodo para tocar */
#cj-mobile-cart-drawer .cj-item-remove{
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer;
    color: #b9b9b9;
}

#cj-mobile-cart-drawer .cj-item-remove:hover .cj-ico{
    fill: #cd0000 !important;
    color: #cd0000 !important;
    transform: rotate(-45deg) !important;
}

/* Tamaño REAL del SVG (no por font-size) */
#cj-mobile-cart-drawer .cj-item-remove .cj-ico{
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    flex: 0 0 auto !important;
    transition: transform .2s, color .2s;
}

/* Asegura que el SVG “hereda” el color, tanto si es de relleno como de trazo */
#cj-mobile-cart-drawer .cj-item-remove .cj-ico *{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Hover: giro y color */
#cj-mobile-cart-drawer .cj-item-remove .cj-ico:hover .cj-ico{ transform: rotate(-20deg); color: #e11;}

/* Ubicación del contenedor del botón (ya lo tenías, solo por claridad) */
#cj-mobile-cart-drawer .cj-col.cj-remove{
    width: 35px;
    position: absolute;
    right: 15px;
    bottom: 0px;
    display: flex;
    justify-content: center;
    text-align: right;
    align-items: center;
}

/* En pantallas muy estrechas, pasa a 1 columna */
@media (max-width: 360px){
  #cj-mobile-cart-drawer .cj-related-list{
    grid-template-columns: 1fr !important;
  }
}





@media (max-width:922px) {
    
    #cj-mobile-cart-drawer .cj-related-list .related-item img {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    padding: 10px;
    margin: auto;
    filter: drop-shadow(0 0 5px #c3c3c3);
}

  /* Estado base: escondido fuera de pantalla, a la derecha */
  #cj-mobile-cart-drawer{
      width:95vw !important;
      height:85vh !important;
      right:-100%;
      top:50%;
      transform:translate(100%,-50%);    /* se “aparta” del viewport */
      background:#F9F9F9;
      border-radius: 15px !important;
      overflow:visible;
  }

  /* Estado abierto: centrado */
  #cj-mobile-cart-drawer.open{
      right:auto;               /* anula -100% */
      left:50%;
      transform:translate(-50%,-50%);
      overflow:hidden;
      z-index: 9999999999999999999999999999999999999999999999999999999999999;
  }

  /* Overlay (solo por claridad, mantén si ya existe igual) */
  .cj-cart-overlay{
      position:fixed;top:0;left:0;width:100%;height:100%;
      background: rgb(0 0 0 / 25%);
      opacity:0;visibility:hidden;pointer-events:none;
      transition:opacity .3s ease;z-index:9998;
  }
  .cj-cart-overlay.open{
      opacity:1;visibility:visible;pointer-events:auto; z-index: 99999999999999999999999999;
  }
}

