/* ==========================================================================
   Terrabox Kids - Custom Shopping Cart Styles
   ========================================================================== */

/* Top Navbar Buy/Cart Button */
.top-nav-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #8dc63f;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 30px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(141, 198, 63, 0.3);
  position: relative;
  cursor: pointer;
  border: none;
}

.top-nav-cart-btn:hover {
  background-color: #7ab332;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(141, 198, 63, 0.4);
  color: #ffffff !important;
}

.top-nav-cart-btn .favicon-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
}

.top-nav-cart-btn .cart-badge {
  background-color: #e91e63;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 5px rgba(233, 30, 99, 0.5);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Modal Custom Styling */
#terraboxCartModal .modal-content {
  border-radius: 20px;
  border: none;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

#terraboxCartModal .modal-header {
  background: linear-gradient(135deg, #8dc63f 0%, #00aeef 100%);
  color: #ffffff;
  padding: 20px 25px;
  border-bottom: none;
}

#terraboxCartModal .modal-title {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: #ffffff;
}

#terraboxCartModal .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

#terraboxCartModal .modal-body {
  padding: 25px;
  background-color: #fcfcfc;
}

/* Cart Product Item */
.cart-product-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #eef2f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.cart-product-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-product-title {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.cart-product-price {
  color: #8dc63f;
  font-weight: 800;
  font-size: 16px;
}

/* Quantity Control Buttons */
.qty-control-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 30px;
  padding: 3px;
  border: 1px solid #e2e8f0;
}

.btn-qty {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-qty:hover {
  background: #8dc63f;
  color: #ffffff;
}

.qty-input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
}

.btn-remove-item {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-item:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Shipping Alert Banner */
.shipping-info-banner {
  background: #eff6ff;
  border-left: 4px solid #00aeef;
  border-radius: 12px;
  padding: 12px 16px;
  color: #1e40af;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 18px;
}

/* Summary Card */
.order-summary-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid #eef2f5;
  margin-top: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #64748b;
}

.summary-row.total-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed #e2e8f0;
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
}

.summary-row.total-row .total-amount {
  color: #8dc63f;
  font-size: 22px;
}

/* WhatsApp Button */
.btn-whatsapp-checkout {
  background-color: #25D366;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 30px;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-whatsapp-checkout:hover {
  background-color: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
  color: #ffffff !important;
}

.btn-clear-cart {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 30px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-clear-cart:hover {
  background: #f8fafc;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Empty State */
.cart-empty-state {
  text-align: center;
  padding: 40px 20px;
}

.cart-empty-state > i {
  font-size: 64px;
  color: #cbd5e1;
  margin-bottom: 16px;
  display: block;
}

.cart-empty-state h5 {
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.cart-empty-state p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Alineación ícono + texto en botón del estado vacío */
.cart-empty-state .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  line-height: 1;
}

.cart-empty-state .btn i {
  font-size: 1.1em;
  display: flex;
  align-items: center;
  margin: 0;
}

/* Box Contents Section */
.box-contents-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.box-contents-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #166534;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.box-contents-header i {
  color: #16a34a;
  font-size: 15px;
}

.box-contents-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.box-contents-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #15803d;
  font-weight: 500;
  line-height: 1.3;
}

.box-item-icon {
  font-size: 15px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .box-contents-list {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Footer - Contraste y Legibilidad
   ========================================================================== */

/* Texto general del footer */
footer#contacto,
footer.footer {
  color: #ffffff !important;
}

/* Títulos de widgets */
footer#contacto .widget-title,
footer.footer .widget-title {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  font-weight: 800;
}

/* Textos de párrafo y listas */
footer#contacto p,
footer#contacto li,
footer#contacto span,
footer#contacto .text,
footer#contacto .text-gray,
footer#contacto .value,
footer.footer p,
footer.footer li,
footer.footer span,
footer.footer .text,
footer.footer .text-gray,
footer.footer .value {
  color: #f0f4f8 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Links del footer */
footer#contacto a,
footer.footer a {
  color: #e8f5e9 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: color 0.2s ease;
}

footer#contacto a:hover,
footer.footer a:hover {
  color: #8dc63f !important;
  text-shadow: 0 0 8px rgba(141, 198, 63, 0.5);
}

/* Íconos de contacto */
footer#contacto .contact-info-style1 .icon i,
footer#contacto .widget .icon i,
footer.footer .contact-info-style1 .icon i,
footer.footer .widget .icon i {
  color: #8dc63f !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

/* Ícono de WhatsApp en contacto */
footer#contacto .fab.fa-whatsapp,
footer.footer .fab.fa-whatsapp {
  color: #25D366 !important;
}

/* Sección "Llámanos" */
footer#contacto .text-gray a,
footer.footer .text-gray a {
  color: #e8f5e9 !important;
}

/* Sección "Tiendas Físicas" - tabla opening-hours */
footer#contacto .opening-hours li span,
footer.footer .opening-hours li span {
  color: #ffffff !important;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

footer#contacto .opening-hours li .value,
footer.footer .opening-hours li .value {
  color: #c8e6c9 !important;
}

footer#contacto .opening-hours li,
footer.footer .opening-hours li {
  border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

/* Íconos de redes sociales */
footer#contacto .styled-icons a,
footer.footer .styled-icons a {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  transition: all 0.3s ease;
}

footer#contacto .styled-icons a:hover,
footer.footer .styled-icons a:hover {
  background-color: #8dc63f !important;
  border-color: #8dc63f !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(141, 198, 63, 0.4);
}

/* Separadores de lista */
footer#contacto .list-border li,
footer.footer .list-border li {
  border-color: rgba(255, 255, 255, 0.2) !important;
}


/* ==========================================================================
   Botón flotante de WhatsApp - "Chatea con nosotros"
   ========================================================================== */

/* Contenedor del botón flotante */
#wa-float-container {
  position: fixed;
  bottom: 75px;
  right: 15px;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Botón circular principal */
#wa-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #8dc63f;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 15px rgba(141, 198, 63, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  font-size: 26px;
  line-height: 1;
  position: relative;
}

#wa-float-btn:hover {
  background-color: #7ab332;
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 22px rgba(141, 198, 63, 0.55);
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Animación de pulso en el botón */
#wa-float-btn::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(141, 198, 63, 0.35);
  animation: waPulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Tooltip / Burbuja de mensaje */
#wa-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: #ffffff;
  border-radius: 14px 14px 0 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  padding: 12px 14px 10px;
  min-width: 200px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#wa-tooltip.wa-tooltip--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#wa-tooltip .wa-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

#wa-tooltip .wa-tooltip-title {
  font-size: 13px;
  font-weight: 700;
  color: #333333;
  line-height: 1.3;
  flex: 1;
}

#wa-tooltip-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #999999;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
  flex-shrink: 0;
}

#wa-tooltip-close:hover {
  color: #555555;
}

#wa-tooltip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #8dc63f;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 25px;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#wa-tooltip-link:hover {
  background-color: #7ab332;
  transform: translateY(-1px);
  color: #ffffff !important;
}

#wa-tooltip-link i {
  font-size: 15px;
}

/* Responsive - móviles y tabletas */
@media (max-width: 768px) {
  #wa-float-container {
    bottom: 70px;
    right: 12px;
  }

  #wa-float-btn {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }

  #wa-float-btn::after {
    width: 46px;
    height: 46px;
  }

  #wa-tooltip {
    max-width: 200px;
    min-width: 180px;
    font-size: 12px;
  }
}
