.ib-cart-open { border: 2px solid #16ccf8; border-radius: 30px; background: transparent; color: #16ccf8; padding: 8px 14px; font: inherit; cursor: pointer; }
.ib-cart-open:hover { background: #16ccf8; color: white; }
.ib-cart-count { font-size: 12px; font-weight: 700; }
.ib-cart-floating { position: fixed; right: 20px; bottom: 85px; z-index: 1000; display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; background: #16ccf8; color: #fff; box-shadow: 0 6px 24px #0003; font-size: 14px; font-weight: 600; }
.ib-cart-floating:hover { background: #31708f; border-color: #31708f; }
.ib-cart-floating > i { font-size: 20px; }
.ib-cart-floating .ib-cart-count { display: inline-flex; justify-content: center; align-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 50%; background: #fff; color: #31708f; }
.ib-cart-visible .ib-cart-floating { visibility: hidden; }
.btn-product[data-cart-add] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 17px; white-space: nowrap; cursor: pointer; }
.btn-product[data-cart-add] i { font-size: 16px; }
.btn-plan[data-cart-add] { cursor: pointer; }
.btn-plan[data-cart-add] i { margin-right: 6px; }
.ib-cart-placeholder { width: 72px; height: 80px; display: grid; place-items: center; border-radius: 10px; background: #eaf9fd; color: #31708f; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
@media (max-width: 480px) { .ib-cart-floating { right: 14px; bottom: calc(85px + env(safe-area-inset-bottom)); padding: 11px 16px; } .ib-cart-toast { bottom: calc(150px + env(safe-area-inset-bottom)); } }
#ib-cart { width: min(640px, calc(100% - 24px)); max-height: 90vh; padding: 30px; border: 0; border-radius: 20px; color: #222; background: #fff; box-shadow: 0 20px 80px #0004; font-family: "Work Sans", Arial, sans-serif; overflow-y: auto; }
#ib-cart::backdrop { background: #101923b3; }
body.ib-cart-visible { overflow: hidden; }
.ib-cart-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.ib-cart-heading h2 { margin: 8px 0 20px; font-size: 28px; font-weight: 700; }
.ib-cart-heading .section-subtitle { color: #16ccf8; font-size: 12px; letter-spacing: 2px; }
.ib-cart-close { background: none; border: 0; font-size: 32px; color: #333; cursor: pointer; }
.ib-cart-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 15px; padding: 18px 0; border-bottom: 1px solid #eee; align-items: center; }
.ib-cart-row img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: #f7f7f7; }
.ib-cart-row h3 { font-size: 15px; font-weight: 600; margin: 0 0 5px; }
.ib-cart-row p { font-size: 13px; margin: 0 0 7px; }
.ib-cart-quantity { display: flex; align-items: center; gap: 10px; }
.ib-cart-quantity button { border: 1px solid #16ccf8; background: transparent; color: #31708f; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; }
.ib-cart-remove { background: none; border: 0; color: #666; text-decoration: underline; font-size: 12px; cursor: pointer; padding: 0; }
.ib-cart-row strong { font-size: 14px; }
.ib-cart-total { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0; font-size: 18px; }
.ib-cart-total strong { color: #31708f; }
#ib-cart-form label { display: block; font-weight: 500; font-size: 14px; margin: 14px 0 7px; }
#ib-cart-form input, #ib-cart-form select, #ib-cart-form textarea { width: 100%; border: 1px solid #ddd; border-radius: 10px; padding: 11px 14px; background: #fafafa; font: inherit; font-size: 14px; color: #222; }
.ib-cart-note, #ib-cart-status { font-size: 13px; color: #666; margin: 16px 0; }
.ib-cart-submit { width: 100%; cursor: pointer; }
.ib-cart-submit:disabled { opacity: .5; cursor: wait; }
.ib-cart-continue { display: block; margin: 18px auto 0; background: transparent; border: 0; color: #31708f; text-decoration: underline; cursor: pointer; }
.ib-cart-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2937; color: white; padding: 12px 22px; border-radius: 30px; z-index: 10000; display: none; max-width: calc(100% - 30px); text-align: center; }
.ib-cart-toast.is-visible { display: block; }
.ib-cart-open:focus-visible, #ib-cart button:focus-visible, #ib-cart input:focus-visible, #ib-cart select:focus-visible, #ib-cart textarea:focus-visible { outline: 2px solid #16ccf8; outline-offset: 3px; }
@media (max-width: 480px) { #ib-cart { padding: 22px 18px; } .ib-cart-row { grid-template-columns: 46px 1fr; gap: 10px; } .ib-cart-row img { width: 46px; height: 46px; } .ib-cart-row > strong { grid-column: 2; } .ib-cart-heading h2 { font-size: 23px; } }

/* Presentación del carrito, controles y formulario adaptables. */
#ib-cart { box-sizing: border-box; width: min(660px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 28px; border-radius: 24px; line-height: 1.5; scrollbar-width: thin; }
#ib-cart *, #ib-cart *::before, #ib-cart *::after { box-sizing: border-box; }
.ib-cart-heading { align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid #edf0f2; }
.ib-cart-heading h2 { font-size: clamp(22px, 4vw, 28px); margin: 6px 0 0; line-height: 1.2; }
.ib-cart-heading .section-subtitle { display: block; font-weight: 700; font-size: 10px; letter-spacing: 2px; }
.ib-cart-close { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #f3f6f7; font-size: 26px; line-height: 1; }
.ib-cart-close:hover { background: #e4f8fd; color: #31708f; }
#ib-cart-status:empty { display: none; }
#ib-cart-status:not(:empty) { background: #f0f8fb; border-radius: 10px; padding: 12px 14px; color: #31708f; margin: 16px 0; }
#ib-cart-items { margin-top: 18px; }
.ib-cart-row { grid-template-columns: 72px minmax(0, 1fr) auto; padding: 16px; margin-bottom: 10px; gap: 14px; background: #f8fafb; border: 1px solid #edf0f2; border-radius: 16px; }
.ib-cart-row img { width: 72px; height: 80px; background: #fff; padding: 6px; }
.ib-cart-info { min-width: 0; }
.ib-cart-row h3 { overflow-wrap: anywhere; line-height: 1.4; margin-bottom: 4px; }
.ib-cart-row p { color: #6b7780; font-size: 12px; }
.ib-cart-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ib-cart-quantity { gap: 0; background: #fff; border: 1px solid #dce7ed; border-radius: 30px; overflow: hidden; }
.ib-cart-quantity button { width: 40px; height: 40px; border: 0; border-radius: 0; display: grid; place-items: center; font: inherit; font-size: 20px; line-height: 1; color: #31708f; }
.ib-cart-quantity button:hover:not(:disabled) { background: #e4f8fd; }
.ib-cart-quantity button:disabled { opacity: .35; cursor: default; }
.ib-cart-quantity span { min-width: 28px; text-align: center; font-size: 14px; font-weight: 600; }
#ib-cart .ib-cart-remove { width: auto; height: auto; min-height: 40px; padding: 6px 0; border: 0; border-radius: 0; background: none; color: #73808a; font-size: 12px; text-decoration: none; }
#ib-cart .ib-cart-remove:hover { color: #c13e3e; }
.ib-cart-row > strong { color: #263b48; white-space: nowrap; align-self: start; margin-top: 3px; }
.ib-cart-total { background: #eaf9fd; border: 1px solid #cdf0f9; border-radius: 14px; padding: 16px 18px; margin: 18px 0 22px; align-items: center; font-size: 15px; }
.ib-cart-total strong { font-size: 22px; overflow-wrap: anywhere; }
.ib-cart-form-title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.ib-cart-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#ib-cart-form label { font-size: 12px; color: #52616b; margin: 0 0 7px; }
#ib-cart-form input, #ib-cart-form select, #ib-cart-form textarea { min-height: 46px; background: #fff; border-color: #dce3e7; font-size: 16px; border-radius: 10px; padding: 11px 12px; }
#ib-cart-form input:focus, #ib-cart-form select:focus, #ib-cart-form textarea:focus { border-color: #16ccf8; }
#ib-cart-address-wrap { margin-top: 16px; }
#ib-cart-form textarea { resize: vertical; }
.ib-cart-note { background: #f8fafb; border-radius: 10px; padding: 12px 14px; font-size: 12px; line-height: 1.6; }
.ib-cart-submit { white-space: normal; padding: 14px 18px; line-height: 1.5; font-size: 12px; }
.ib-cart-submit:disabled { opacity: 1; background: #e7eef1; border-color: #e7eef1; color: #647580; cursor: not-allowed; }
.ib-cart-continue { font: inherit; font-size: 13px; text-decoration: none; min-height: 40px; margin-top: 10px; }
@media (max-width: 540px) {
  #ib-cart { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 20px 16px; border-radius: 18px; }
  .ib-cart-row { grid-template-columns: 56px minmax(0, 1fr); padding: 12px; gap: 10px; }
  .ib-cart-row img, .ib-cart-placeholder { width: 56px; height: 64px; grid-row: 1 / 3; }
  .ib-cart-row > strong { grid-column: 2; font-size: 15px; margin: 0; }
  .ib-cart-row h3 { font-size: 14px; }
  .ib-cart-controls { gap: 10px; }
  .ib-cart-form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ib-cart-total { padding: 14px; font-size: 13px; }
  .ib-cart-total strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { #ib-cart button { transition: none; } }

/* Acceso compacto al carrito con contador de notificaciones. */
.ib-cart-floating { width: 56px; height: 56px; padding: 0; gap: 0; border-radius: 50%; justify-content: center; }
.ib-cart-floating > i { font-size: 24px; line-height: 1; }
.ib-cart-floating .ib-cart-count { position: absolute; top: -5px; right: -5px; min-width: 24px; height: 24px; padding: 0 5px; border: 2px solid #fff; background: #31708f; color: #fff; border-radius: 20px; font-size: 11px; line-height: 1; box-shadow: 0 2px 6px #0002; }
@media (max-width: 480px) { .ib-cart-floating { width: 52px; height: 52px; padding: 0; } .ib-cart-floating > i { font-size: 22px; } }
.ib-cart-count[hidden] { display: none !important; }
