/* Kareo — Estilos para el Símbolo SVG de Caja y "Tu Caja Familiar" */

/* Contenedor de acciones en la tarjeta de producto */
.product-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Botón con el Símbolo SVG de Caja en cada producto */
.box-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #f0f5fa;
  color: var(--ocean, #165b91);
  border: 1.5px solid #c8dbec;
  border-radius: 7px;
  width: 37px;
  height: 37px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.box-add-btn:hover:not(:disabled) {
  background: #e3effa;
  border-color: var(--ocean, #165b91);
  transform: translateY(-1px) scale(1.05);
}

.box-add-btn.in-box {
  background: var(--ocean, #165b91);
  color: #ffffff;
  border-color: var(--ocean, #165b91);
  box-shadow: 0 2px 8px rgba(22, 91, 145, 0.25);
}

.box-add-btn.in-box:hover:not(:disabled) {
  background: #114975;
}

.box-icon-svg {
  display: block;
}

/* Insignia con el conteo dentro del botón de caja */
.box-count-pill {
  position: absolute;
  top: -7px;
  right: -7px;
  background: #25D366;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 12px;
  padding: 2px 6px;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* En la ficha de detalle de producto */
.product-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 20px 0;
}

.button-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef5fc !important;
  color: var(--ocean, #165b91) !important;
  border: 1.5px solid #bdd7ee !important;
  transition: all 0.2s ease !important;
}

.button-box:hover:not(:disabled) {
  background: #e1effb !important;
  border-color: var(--ocean, #165b91) !important;
  transform: translateY(-1px);
}

.button-box.in-box {
  background: var(--ocean, #165b91) !important;
  color: #ffffff !important;
  border-color: var(--ocean, #165b91) !important;
}

/* Adaptación para sección Beauty */
.page-beauty .box-add-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid #ecc9d6;
  background: #fff5f8;
  color: var(--beauty, #c25b7d);
}

.page-beauty .box-add-btn:hover:not(:disabled) {
  background: #fde6ee;
  border-color: var(--beauty, #c25b7d);
}

.page-beauty .box-add-btn.in-box {
  background: var(--beauty, #c25b7d);
  color: #ffffff;
  border-color: var(--beauty, #c25b7d);
  box-shadow: 0 2px 8px rgba(194, 91, 125, 0.25);
}

/* Página /arma-tu-caja (Tu Caja Familiar) */
.page-box {
  background: var(--paper, #fdfbf7);
  min-height: calc(100vh - 80px);
  padding-bottom: 70px;
}

.box-content-section {
  padding-top: 10px;
}

/* Estado vacío de la caja */
.box-empty-view {
  text-align: center;
  max-width: 620px;
  margin: 30px auto;
  padding: 50px 30px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.box-empty-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #f0f7fc;
  color: var(--ocean, #165b91);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}

.box-empty-icon svg {
  width: 36px;
  height: 36px;
}

.box-empty-view h2 {
  font-size: 24px;
  color: var(--ink, #1a2a3a);
  margin-bottom: 10px;
}

.box-empty-view p {
  font-size: 15px;
  color: var(--muted, #64748b);
  margin-bottom: 24px;
}

.box-explainer-pills {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.box-explainer-pills span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: #334155;
}

.box-explainer-pills svg {
  display: inline-block;
  vertical-align: middle;
}

.box-quick-explore {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button-outline {
  background: transparent !important;
  color: var(--ocean, #165b91) !important;
  border: 1.5px solid var(--ocean, #165b91) !important;
}

.button-outline:hover {
  background: #f0f7fc !important;
}

/* Layout con artículos en la caja */
.box-active-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 35px;
  align-items: start;
}

.box-items-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.box-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.box-card-heading h2 {
  font-size: 20px;
  color: var(--ink, #1a2a3a);
  margin: 0;
}

.box-card-heading small {
  color: var(--muted, #64748b);
  font-size: 13px;
}

.box-table-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.box-row-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.box-row-visual {
  height: 80px;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.box-row-visual img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.box-row-meta h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #1a2a3a);
  margin: 3px 0 4px;
  line-height: 1.35;
}

.box-row-meta small {
  color: var(--muted, #64748b);
  font-size: 12px;
  display: block;
}

.box-rx-text {
  display: inline-block;
  font-size: 11px;
  color: #b91c1c;
  font-weight: 600;
  margin-top: 4px;
}

.box-row-qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.qty-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.qty-pill button {
  width: 28px;
  height: 28px;
  background: #f8fafc;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
  display: grid;
  place-items: center;
}

.qty-pill button:hover {
  background: #e2e8f0;
}

.qty-pill span {
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink, #1a2a3a);
}

.remove-link {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}

.remove-link:hover {
  color: #ef4444;
  text-decoration: underline;
}

.box-row-price {
  text-align: right;
  min-width: 70px;
}

.box-row-price strong {
  display: block;
  font-size: 15px;
  color: var(--ink, #1a2a3a);
}

.box-row-price small {
  font-size: 11px;
  color: var(--muted, #64748b);
}

.box-card-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

/* Sidebar de Resumen */
.box-sidebar-card {
  position: sticky;
  top: 25px;
}

.box-sidebar-inner {
  background: #ffffff;
  border: 1px solid #dbe6f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(22, 91, 145, 0.07);
}

.box-sidebar-inner h3 {
  font-size: 18px;
  color: var(--ink, #1a2a3a);
  margin-top: 0;
  margin-bottom: 16px;
}

.box-cushion-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  margin: 16px 0;
}

.cushion-shield {
  font-size: 18px;
}

.box-cushion-notice strong {
  font-size: 12px;
  color: #1e40af;
  display: block;
  margin-bottom: 2px;
}

.box-cushion-notice p {
  font-size: 11px;
  color: #3b82f6;
  margin: 0;
  line-height: 1.4;
}

.box-sidebar-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin: 16px 0;
}

.box-sidebar-total span {
  font-size: 13px;
  color: #475569;
}

.box-sidebar-total strong {
  font-size: 22px;
  color: var(--ink, #1a2a3a);
}

.box-rx-reminder {
  font-size: 11.5px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.button-whatsapp-cta {
  background: #25D366 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
  margin-bottom: 10px;
}

.button-whatsapp-cta:hover:not(:disabled) {
  background: #1eb855 !important;
}

/* Modal de Checkout */
.box-checkout-dialog {
  max-width: 520px;
  border-radius: 16px;
  padding: 28px;
}

.box-modal-copy {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin-bottom: 18px;
}

.box-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.field-full {
  grid-column: 1 / -1;
}

.box-payment-methods {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 18px;
}

.box-payment-methods h4 {
  font-size: 12px;
  margin: 0 0 4px;
  color: #1e293b;
}

.box-payment-methods p {
  font-size: 11px;
  color: #475569;
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .box-active-layout {
    grid-template-columns: 1fr;
  }
  .box-sidebar-card {
    position: static;
  }
}

@media (max-width: 600px) {
  .box-row-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }
  .box-row-visual {
    height: 60px;
  }
  .box-row-qty {
    grid-column: 2 / 3;
    flex-direction: row;
    justify-content: space-between;
  }
  .box-row-price {
    grid-column: 2 / 3;
    text-align: left;
    margin-top: 4px;
  }
  .box-form-grid {
    grid-template-columns: 1fr;
  }
}

/* One shopping entry point, with the family box accessible inside it. */
.shop-header .cart-trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid #d5e7ef;
  background: linear-gradient(145deg, #fff, #edf8fa);
  color: var(--ocean);
  box-shadow: 0 3px 9px #165b9109;
  transition: background .2s ease, transform .2s ease;
}
.cart-trigger:hover { background: #e6f5f8; transform: translateY(-1px); }
.cart-trigger:focus-visible, .box-return-cart:focus-visible,
.cart-box-link:focus-visible, .box-contents:focus-visible {
  outline: 3px solid #1689bf;
  outline-offset: 3px;
}
.shop-header .cart-trigger #cart-count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 20px;
  width: auto;
  height: 20px;
  padding: 0 5px;
  margin: 0;
  border: 2px solid white;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.shop-header .cart-trigger #cart-count[hidden] { display: none; }
.cart-icon { display: block; }
.cart-unit-label { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.cart-box-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #d3e9e7;
  border-radius: 16px;
  background: linear-gradient(110deg, #effaf5, #eff7ff);
  color: var(--ink);
  text-decoration: none;
}
.cart-box-link:hover { border-color: #78b6c7; }
.cart-box-link > img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.cart-box-link > span { flex: 1; min-width: 0; }
.cart-box-link strong { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.cart-box-link small { display: block; margin-top: 6px; font-size: 12px; color: #506e80; }
#cart-dialog .dialog-heading { margin-bottom: 20px; }
#cart-dialog .cart-item .qty button { min-width: 32px; height: 32px; }
#cart-dialog .cart-item .qty .remove { min-width: auto; }

/* Live product slips sit on the floor of the generated open box. */
.page-box { background: #f5fafb; }
.box-page-heading { padding-top: 32px; padding-bottom: 24px; }
.box-return-cart { border: 0; background: transparent; padding: 0; font: inherit; font-size: 12px; color: var(--ocean); }
.box-page-heading .eyebrow { display: block; margin: 24px 0 10px; color: #4c7985; font-size: 10px; letter-spacing: 1.7px; }
.box-page-heading h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -1.5px; line-height: 1.1; margin: 0 0 12px; font-weight: 500; }
.box-page-heading > p { color: var(--muted); margin: 0; }
.box-content-section { max-width: 1500px; margin: 0 auto; padding-top: 0; }
.box-active-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; }
.box-visual-column { min-width: 0; }
.box-visual-column .box-card-heading { display: block; border: 0; padding: 0; margin: 0 0 14px; }
.box-visual-column .box-card-heading h2 { font-size: 16px; }
.box-visual-column .box-card-heading small { display: block; margin-top: 7px; font-size: 11px; }
.box-stage { position: relative; isolation: isolate; width: 100%; aspect-ratio: 1; }
.box-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; pointer-events: none; }
.box-contents {
  position: absolute;
  inset: 27% 16% 28%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #76aab5 #dfebe6;
  padding: 5px;
  border-radius: 6px;
}
.box-packed-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 9px 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #ffffffed;
  border: 1px solid #fff;
  border-radius: 11px;
  box-shadow: 0 4px 8px #244a3f16;
}
.box-packed-item:last-child { margin-bottom: 2px; }
.box-packed-photo { height: 65px; display: grid; place-items: center; }
.box-packed-photo img, .box-packed-photo svg { width: 100%; height: 65px; object-fit: contain; }
.box-packed-info { min-width: 0; overflow-wrap: anywhere; }
.box-packed-info .product-brand { font-size: 9px; letter-spacing: .8px; color: #4e7988; }
.box-packed-info h3 { font-size: 13px; font-weight: 600; line-height: 1.35; margin: 3px 0; }
.box-packed-info small { display: block; font-size: 11px; color: #617784; }
.box-packed-info .box-rx-text { font-size: 10px; }
.box-packed-controls { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.box-packed-controls .qty-pill { flex-shrink: 0; }
.box-packed-controls .qty-pill button { width: 32px; height: 32px; padding: 0; }
.box-packed-controls .qty-pill button:disabled { cursor: default; opacity: .4; }
.box-packed-controls .qty-pill span { padding: 0 9px; }
.box-packed-controls > strong { font-size: 13px; white-space: nowrap; }
.box-packed-controls .remove-link { min-height: 32px; color: #54707b; font-size: 11px; }
.box-brand-mark { position: absolute; top: 80%; left: 50%; transform: translateX(-50%); width: 90px; height: auto; pointer-events: none; mix-blend-mode: multiply; }
.box-contents.is-empty { display: grid; place-items: center; padding: 12px; }
.box-empty-note { text-align: center; max-width: 240px; }
.box-empty-spark { font-size: 32px; color: #589798; }
.box-empty-note h2 { font-size: 20px; line-height: 1.25; font-weight: 500; margin: 8px 0; color: #254b57; }
.box-empty-note p { font-size: 12px; line-height: 1.5; color: #4f7177; }
.box-visual-column .box-card-footer { text-align: center; border: 0; padding: 0; margin-top: 4px; }
.box-sidebar-card { top: 112px; }
.box-sidebar-inner { padding: 24px; border-radius: 20px; box-shadow: 0 8px 30px #165b9107; }
.box-empty-guide h2 { font-size: 24px; font-weight: 500; line-height: 1.2; margin: 14px 0; }
.box-empty-guide p { font-size: 13px; color: #57717d; line-height: 1.7; }
.box-empty-guide .eyebrow { color: #4c7985; font-size: 9px; letter-spacing: 1.4px; }
.box-empty-guide .box-explainer-pills { display: grid; gap: 10px; margin: 22px 0; }
.box-empty-guide .box-explainer-pills span { display: block; border: 0; padding: 12px; border-radius: 10px; font-size: 12px; line-height: 1.6; }
.box-empty-guide .box-explainer-pills strong { display: block; color: var(--ink); }

@media(max-width: 1050px) {
  .box-active-layout { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: auto; }
  .box-sidebar-card { position: static; }
}
@media(max-width: 600px) {
  .box-page-heading { padding: 24px 5% 28px; }
  .box-content-section { padding-left: 3%; padding-right: 3%; }
  .box-visual-column .box-card-heading { margin-left: 3%; }
  .box-stage { aspect-ratio: 4 / 5; }
  .box-contents { inset: 27% 7% 28%; padding: 3px; }
  .box-packed-item { padding: 9px; grid-template-columns: 42px minmax(0, 1fr); gap: 7px 9px; margin-bottom: 9px; }
  .box-packed-photo, .box-packed-photo img, .box-packed-photo svg { height: 52px; }
  .box-packed-info h3 { font-size: 12px; }
  .box-brand-mark { width: 76px; }
  .box-empty-note h2 { font-size: 18px; }
  .box-empty-note p { margin: 5px 0; }
  .box-empty-spark { font-size: 24px; }
  .box-sidebar-inner { padding: 22px; }
  .box-visual-column .box-card-footer { padding: 0 12px; }
}
@media(prefers-reduced-motion: reduce) {
  .cart-trigger { transition: none; }
  .cart-trigger:hover { transform: none; }
}
