/* Mambo Pawsitory — cart modal, drawer & shared cart styles */

.cart-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cart-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 48px rgba(17, 24, 39, 0.18);
  transform: translateY(12px);
  transition: transform 0.22s ease;
}

.cart-modal-overlay.is-open .cart-modal {
  transform: translateY(0);
}

.cart-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid #e6e6f0;
}

.cart-modal-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f9f9ff;
}

.cart-modal-head-text {
  flex: 1;
  min-width: 0;
}

.cart-modal-head-text .meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.cart-modal-head-text h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cart-modal-head-text .from-price {
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
}

.cart-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f9f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #6b7280;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}

.cart-modal-close:hover {
  background: #e7e6fb;
  color: #111827;
}

.cart-modal-body {
  padding: 18px 22px 22px;
}

.cart-modal-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 12px;
}

.variant-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.variant-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #e6e6f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: left;
  width: 100%;
  background: #fff;
  font: inherit;
  color: inherit;
}

.variant-option:hover {
  border-color: #c7c7d6;
}

.variant-option.selected {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
  background: #f9f9ff;
}

.variant-option .v-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.variant-option .v-label {
  font-size: 14.5px;
  font-weight: 700;
}

.variant-option .v-hint {
  font-size: 12px;
  color: #6b7280;
}

.variant-option .v-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.variant-option .v-price {
  font-size: 14px;
  font-weight: 700;
}

.variant-option .v-flag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}

.v-flag.flag-standard {
  background: #f9f9ff;
  color: #6b7280;
}

.v-flag.flag-save {
  background: #c9f7e2;
  color: #065f46;
}

.v-flag.flag-mega {
  background: #fef3c7;
  color: #92400e;
}

.modal-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-qty-row .qty-label {
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
}

.modal-qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #e6e6f0;
  border-radius: 10px;
  overflow: hidden;
}

.modal-qty-stepper button {
  width: 40px;
  height: 40px;
  font-size: 16px;
  font-weight: 700;
  color: #4b5563;
  background: none;
  border: none;
  cursor: pointer;
}

.modal-qty-stepper button:hover {
  background: #f9f9ff;
}

.modal-qty-stepper .qty-val {
  width: 36px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.modal-add-btn {
  width: 100%;
  height: 48px;
  background: #ff5a36;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 90, 54, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.modal-add-btn:hover {
  background: #ea4c29;
}

.modal-add-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Toast confirmation */
.cart-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 2100;
  background: #111827;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  max-width: calc(100% - 40px);
  text-align: center;
}

.cart-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Product card quick-add button — always visible, icon only */
.product-card .quick-add {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.12);
  z-index: 3;
  border: none;
  cursor: pointer;
  opacity: 1;
  transform: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.product-card .quick-add:hover {
  background: #ff5a36;
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 90, 54, 0.28);
}

/* Related / inline add button (product page, home) */
.related-add,
.inline-add {
  position: absolute;
  right: 12px;
  bottom:10px; /* 12px (original) + 30px higher */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f9f9ff;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.12s ease,
    transform 0.12s ease;
  z-index: 4;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
}

.related-add:hover,
.inline-add:hover {
  background: #ff5a36;
  color: #fff;
}

/* ========== CART DRAWER ========== */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cart-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2210;
  width: min(420px, 100vw);
  background: #fff;
  box-shadow: -16px 0 40px rgba(17, 24, 39, 0.14);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-drawer-overlay.is-open .cart-drawer {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid #e6e6f0;
  flex-shrink: 0;
}

.cart-drawer-header h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.cart-drawer-header .drawer-count {
  font-size: 11px;
  font-weight: 700;
  background: #e7e6fb;
  color: #3730a3;
  padding: 3px 9px;
  border-radius: 999px;
}

.cart-drawer-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f9f9ff;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-drawer-close:hover {
  background: #e7e6fb;
  color: #111827;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
  min-height: 0;
}

.cart-drawer-empty {
  text-align: center;
  padding: 48px 28px;
  color: #6b7280;
}

.cart-drawer-empty .empty-icon {
  font-size: 40px;
  margin-bottom: 14px;
}

.cart-drawer-empty p {
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.cart-drawer-empty a {
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  color: #ff5a36;
}

.cart-drawer-item {
  display: flex;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid #f0f0f5;
}

.cart-drawer-item-img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #f9f9ff;
  flex-shrink: 0;
}

.cart-drawer-item-info {
  flex: 1;
  min-width: 0;
}

.cart-drawer-item-info .name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
}

.cart-drawer-item-info .variant {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}

.cart-drawer-item-info .unit-price {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 8px;
}

.cart-drawer-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cart-drawer-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid #e6e6f0;
  border-radius: 8px;
  overflow: hidden;
}

.cart-drawer-qty button {
  width: 32px;
  height: 32px;
  font-size: 15px;
  font-weight: 700;
  color: #4b5563;
  background: none;
  border: none;
  cursor: pointer;
}

.cart-drawer-qty button:hover {
  background: #f9f9ff;
}

.cart-drawer-qty .qty {
  width: 28px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
}

.cart-drawer-remove {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}

.cart-drawer-remove:hover {
  color: #ff5a36;
}

.cart-drawer-item-total {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 2px;
}

.cart-drawer-footer {
  border-top: 1px solid #e6e6f0;
  padding: 18px 22px 22px;
  flex-shrink: 0;
  background: #fff;
}

.cart-promo-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.cart-promo-row input {
  flex: 1;
  min-width: 0;
  background: #f9f9ff;
  border: 1px solid #e6e6f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  outline: none;
  font: inherit;
}

.cart-promo-row input:focus {
  border-color: #ff5a36;
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.12);
}

.cart-promo-row button {
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
}

.cart-promo-row button:hover {
  background: #272e3e;
}

.cart-promo-msg {
  font-size: 12px;
  margin: -8px 0 12px;
  min-height: 16px;
}

.cart-promo-msg.ok {
  color: #065f46;
}

.cart-promo-msg.err {
  color: #b91c1c;
}

.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.cart-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #4b5563;
}

.cart-totals-row.discount {
  color: #065f46;
  font-weight: 600;
}

.cart-totals-row.total {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  padding-top: 8px;
  border-top: 1px solid #e6e6f0;
  margin-top: 4px;
}

.cart-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-btn-checkout {
  width: 100%;
  height: 46px;
  background: #ff5a36;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 90, 54, 0.28);
  font: inherit;
}

.cart-btn-checkout:hover {
  background: #ea4c29;
}

.cart-btn-checkout:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.cart-btn-continue {
  width: 100%;
  height: 42px;
  background: #f9f9ff;
  color: #111827;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
}

.cart-btn-continue:hover {
  background: #e7e6fb;
}

body.cart-drawer-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .cart-drawer {
    width: 100vw;
  }
}

/* Make top navbar sticky on all breakpoints (desktop / tablet / mobile) */
header.site {
  position: sticky;
  top: 0;
  z-index: 3000;
  width: 100%;
  /* keep the same background as your header — adjust if you use a transparent header */
  background: rgba(255,255,255,0.98);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(17,24,39,0.04);
}

/* Ensure the mobile nav panel sits below the sticky header when opened */
nav.main-nav.is-open {
  /* if your mobile nav becomes fixed/absolute, ensure it starts below header */
  margin-top: calc(var(--header-height, 64px) * 1);
}

/* Optional: provide a CSS variable for header height if you need to reference it elsewhere */
:root {
  --header-height: 64px; /* adjust to match your header height on desktop/mobile */
}
