/* ───────────────────────────────────────────────
   Boca Totes Cart — Stylesheet v2.0.0
   ─────────────────────────────────────────────── */

:root {
  --bt-primary:   #0d9488;
  --bt-primary-d: #0f766e;
  --bt-accent:    #f97316;
  --bt-accent-d:  #ea6c0a;
  --bt-text:      #0f172a;
  --bt-muted:     #64748b;
  --bt-border:    #e2e8f0;
  --bt-bg:        #f8fafc;
  --bt-white:     #ffffff;
  --bt-radius:    12px;
  --bt-shadow:    0 12px 40px rgba(0,0,0,.14);
  --bt-trans:     .2s ease;
}

/* ── CART ICON IN NAV ── */
.nav-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--bt-border);
  color: var(--bt-text);
  cursor: pointer;
  transition: background var(--bt-trans), border-color var(--bt-trans);
  flex-shrink: 0;
}
.nav-cart-btn:hover {
  background: var(--bt-bg);
  border-color: var(--bt-primary);
  color: var(--bt-primary);
}
.mobile-cart-btn {
  margin: 0 20px 16px;
  justify-content: center;
  gap: 8px;
}
.btcart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  background: var(--bt-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 0 4px;
  pointer-events: none;
  display: none;
}
.btcart-badge.visible { display: block; }

/* fallback for wp_nav_menu themes */
li.btcart-nav-icon { margin-left: auto !important; }
li.btcart-nav-icon a { display: flex !important; align-items: center; gap: 4px; position: relative; padding: 0 8px !important; }

/* ── OVERLAY ── */
.btcart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.btcart-overlay.active { display: flex; }

/* ── BOOK NOW MODAL ── */
.btcart-modal {
  background: var(--bt-white);
  border-radius: var(--bt-radius);
  box-shadow: var(--bt-shadow);
  width: 92vw;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: btSlideUp .25s ease;
}
@keyframes btSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.btcart-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--bt-muted);
  z-index: 10;
  padding: 0 4px;
  transition: color var(--bt-trans);
}
.btcart-close:hover { color: var(--bt-text); }

/* Package header */
.btcart-pkg-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--bt-border);
}
.btcart-modal-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--bt-accent);
  margin-bottom: 6px;
  min-height: 16px;
}
.btcart-modal-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--bt-text);
  line-height: 1.2;
  padding-right: 28px;
}
.btcart-modal-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.btcart-modal-price {
  font-size: 30px;
  font-weight: 800;
  color: var(--bt-primary);
}
.btcart-modal-price-note {
  font-size: 13px;
  color: var(--bt-muted);
}
.btcart-contents-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.btcart-contents-list li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--bt-text);
  line-height: 1.4;
}
.btcart-contents-list li::before {
  content: '•';
  color: var(--bt-primary);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

/* Bullet list + weeks stepper side by side */
.btcart-pkg-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.btcart-pkg-body .btcart-contents-list { flex: 1; }

.btcart-weeks-control {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.btcart-weeks-control label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--bt-muted);
  white-space: nowrap;
}

.btcart-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--bt-border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}
.btcart-qty-btn {
  width: 38px;
  height: 40px;
  background: var(--bt-bg);
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--bt-text);
  transition: background var(--bt-trans);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btcart-qty-btn:hover { background: var(--bt-border); }
#btcart-qty {
  width: 52px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--bt-border);
  border-right: 1.5px solid var(--bt-border);
  font-size: 15px;
  font-weight: 600;
  color: var(--bt-text);
  height: 40px;
  -moz-appearance: textfield;
}
#btcart-qty::-webkit-outer-spin-button,
#btcart-qty::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── ADD-ONS SECTION ── */
.btcart-addons-section {
  padding: 20px 28px;
  border-bottom: 1px solid var(--bt-border);
}
.btcart-addons-section h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--bt-text);
}
.btcart-addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* Add-on card */
.btcart-addon-card {
  border: 2px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow: hidden;
  background: var(--bt-white);
  transition: border-color var(--bt-trans), box-shadow var(--bt-trans);
  display: flex;
  flex-direction: column;
}
.btcart-addon-card:hover {
  border-color: var(--bt-primary);
  box-shadow: 0 2px 10px rgba(13,148,136,.12);
}
.btcart-addon-card.btcart-addon-selected {
  border-color: var(--bt-primary);
  background: #f0fdfa;
}

/* Scrollable image carousel inside add-on card */
.btcart-addon-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--bt-radius) var(--bt-radius) 0 0;
}
.btcart-addon-carousel::-webkit-scrollbar { display: none; }
.btcart-addon-carousel:focus-visible {
  outline: 2px solid var(--bt-primary);
  outline-offset: -2px;
}
.btcart-addon-img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  background: var(--bt-bg);
  pointer-events: none;
}
.btcart-addon-no-img {
  width: 100%;
  height: 70px;
  background: var(--bt-bg);
  cursor: pointer;
}

/* ── ITEM DETAIL POPUP ── */
.btcart-item-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.btcart-item-popup-overlay.active { display: flex; }

.btcart-item-popup {
  background: var(--bt-white);
  border-radius: 4px;
  box-shadow: 0 24px 72px rgba(0,0,0,.32);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  animation: btSlideUp .22s ease;
}

/* Close button — floats over the image */
.btcart-ip-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,.42);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--bt-trans);
  z-index: 10;
}
.btcart-ip-close:hover { background: rgba(0,0,0,.7); }

/* Left column — gallery */
.btcart-ip-gallery {
  background: var(--bt-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
}
.btcart-ip-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.btcart-ip-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  flex-wrap: wrap;
  background: var(--bt-bg);
  border-top: 1px solid var(--bt-border);
}
.btcart-ip-thumb {
  width: 58px;
  height: 52px;
  object-fit: cover;
  border-radius: 5px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--bt-trans);
  flex-shrink: 0;
}
.btcart-ip-thumb:hover  { border-color: var(--bt-muted); }
.btcart-ip-thumb.active { border-color: var(--bt-primary); }

/* Right column — product info */
.btcart-ip-info {
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
}
.btcart-ip-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--bt-text);
  margin: 0 0 10px;
  line-height: 1.25;
}
.btcart-ip-price {
  font-size: 30px;
  font-weight: 800;
  color: var(--bt-primary);
  margin-bottom: 6px;
}
.btcart-ip-meta {
  font-size: 13px;
  color: var(--bt-muted);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bt-border);
}
.btcart-ip-desc {
  font-size: 14px;
  color: var(--bt-text);
  line-height: 1.75;
  margin: 0 0 28px;
  white-space: pre-line;
}
.btcart-ip-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
}
.btcart-ip-add-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  background: var(--bt-accent);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--bt-trans);
  letter-spacing: .3px;
  min-width: 140px;
}
.btcart-ip-add-btn:hover    { background: var(--bt-accent-d); }
.btcart-ip-add-btn.added    { background: var(--bt-primary); }
.btcart-ip-add-btn:disabled { background: var(--bt-primary); cursor: default; }

@media (max-width: 600px) {
  .btcart-item-popup {
    grid-template-columns: 1fr;
    max-height: 96vh;
    border-radius: 0;
  }
  .btcart-ip-gallery { position: static; }
  .btcart-ip-info { padding: 22px 20px 28px; }
}
.btcart-addon-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.btcart-addon-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--bt-text);
  margin-bottom: 3px;
  line-height: 1.3;
}
.btcart-addon-desc {
  font-size: 12px;
  color: var(--bt-muted);
  margin: 0 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btcart-addon-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--bt-primary);
  margin-bottom: 8px;
}
.btcart-addon-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--bt-border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: auto;
}
.btcart-addon-btn {
  flex: 0 0 30px;
  height: 30px;
  background: var(--bt-bg);
  border: none;
  font-size: 17px;
  cursor: pointer;
  color: var(--bt-text);
  transition: background var(--bt-trans);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btcart-addon-btn:hover { background: var(--bt-border); }
.btcart-addon-count {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--bt-text);
  border-left: 1.5px solid var(--bt-border);
  border-right: 1.5px solid var(--bt-border);
  line-height: 30px;
}

/* ── MODAL FOOTER ── */
.btcart-modal-footer {
  padding: 16px 28px 24px;
  position: sticky;
  bottom: 0;
  background: var(--bt-white);
  border-top: 1px solid var(--bt-border);
}
.btcart-modal-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--bt-text);
}
.btcart-modal-total-row strong {
  font-size: 22px;
  color: var(--bt-primary);
}
.btcart-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 28px;
  background: var(--bt-accent);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--bt-trans), transform var(--bt-trans), box-shadow var(--bt-trans);
  letter-spacing: .3px;
}
.btcart-add-btn:hover  { background: var(--bt-accent-d); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249,115,22,.35); }
.btcart-add-btn:active { transform: scale(.98); }
.btcart-add-btn.added  { background: var(--bt-primary); box-shadow: none; }

/* ── CART DRAWER ── */
#btcart-drawer-overlay { justify-content: flex-end; }
.btcart-drawer {
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bt-white);
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  animation: btSlideRight .25s ease;
}
@keyframes btSlideRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.btcart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--bt-border);
  flex-shrink: 0;
}
.btcart-drawer-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--bt-text); }
.btcart-drawer-scroll { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* Cart items */
.btcart-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--bt-border);
}
.btcart-cart-item-info strong { display: block; font-size: 15px; font-weight: 700; color: var(--bt-text); }
.btcart-cart-item-info span   { font-size: 13px; color: var(--bt-muted); }
.btcart-cart-item-right { display: flex; align-items: center; gap: 10px; }
.btcart-cart-item-price { font-size: 16px; font-weight: 700; color: var(--bt-primary); }
.btcart-remove-item {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.btcart-cart-empty { text-align: center; color: var(--bt-muted); padding: 30px 0; font-size: 15px; }
.btcart-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 6px;
  font-size: 16px;
  color: var(--bt-text);
}
.btcart-cart-total-row strong { font-size: 20px; color: var(--bt-primary); }

.btcart-divider { border: none; border-top: 1px solid var(--bt-border); margin: 16px 0; }
.btcart-section-heading { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--bt-text); }

/* Booking form */
.btcart-form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.btcart-form-row label { font-size: 13px; font-weight: 600; color: var(--bt-text); }
.btcart-form-row .req { color: #c0392b; }
.btcart-form-row input,
.btcart-form-row textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--bt-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--bt-text);
  background: #fff;
  font-family: inherit;
  transition: border-color var(--bt-trans);
  resize: vertical;
}
.btcart-form-row input:focus,
.btcart-form-row textarea:focus { outline: none; border-color: var(--bt-primary); }

/* Stripe card element */
.btcart-stripe-card {
  padding: 10px 12px;
  border: 1.5px solid var(--bt-border);
  border-radius: 8px;
  background: #fff;
  transition: border-color var(--bt-trans);
  min-height: 44px;
}
.btcart-stripe-card.StripeElement--focus  { border-color: var(--bt-primary); }
.btcart-stripe-card.StripeElement--invalid { border-color: #ef4444; }
.btcart-card-errors {
  font-size: 13px;
  color: #ef4444;
  margin-top: 4px;
  min-height: 18px;
}

.btcart-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 28px;
  background: var(--bt-accent);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--bt-trans), transform var(--bt-trans), box-shadow var(--bt-trans);
  letter-spacing: .3px;
  margin-top: 4px;
}
.btcart-submit-btn:hover    { background: var(--bt-accent-d); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249,115,22,.35); }
.btcart-submit-btn:disabled { background: #999; cursor: not-allowed; transform: none; box-shadow: none; }

/* Status messages */
#btcart-form-msg { margin-top: 12px; }
.btcart-msg-success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}
.btcart-msg-error {
  background: #fdecea;
  color: #c62828;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

/* ── TERMS & CONDITIONS ── */
.btcart-tos-row {
  margin-bottom: 16px;
}
.btcart-tos-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: var(--bt-text);
  cursor: pointer;
  line-height: 1.5;
  user-select: none;
}
.btcart-tos-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--bt-primary);
  cursor: pointer;
}
.btcart-tos-toggle {
  background: none;
  border: none;
  color: var(--bt-primary);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  display: inline;
}
.btcart-tos-toggle:hover { color: var(--bt-primary-d); }

.btcart-tos-panel {
  margin-top: 10px;
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-radius: 8px;
  padding: 14px 16px;
  max-height: 260px;
  overflow-y: auto;
  font-size: .8rem;
  color: var(--bt-text);
  line-height: 1.65;
  animation: btSlideUp .18s ease;
}
.btcart-tos-panel h4 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--bt-text);
  margin-bottom: 4px;
}
.btcart-tos-panel .btcart-tos-updated {
  font-size: .75rem;
  color: var(--bt-muted);
  margin-bottom: 12px;
}
.btcart-tos-panel h5 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--bt-text);
  margin: 10px 0 3px;
}
.btcart-tos-panel p {
  color: var(--bt-muted);
  margin: 0;
}
.btcart-tos-panel strong { color: var(--bt-text); }
.btcart-tos-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--bt-primary);
  font-size: .8rem;
  text-decoration: underline;
}
.btcart-tos-link:hover { color: var(--bt-primary-d); }

.btcart-tos-error {
  display: none;
  font-size: .82rem;
  color: #ef4444;
  margin-top: 6px;
  font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .btcart-modal { width: 100vw; max-height: 100vh; border-radius: 0; }
  .btcart-drawer { width: 100vw; }
  .btcart-controls { flex-direction: column; }
  .btcart-addons-grid { grid-template-columns: 1fr 1fr; }
}
