
/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-left: 12px;
}
.status-badge.open {
  background: #EAF2EE;
  color: var(--pine-green);
  border: 1px solid rgba(24, 53, 35, 0.2);
}
.status-badge.closed {
  background: #FDF3F3;
  color: var(--wine);
  border: 1px solid rgba(139, 43, 44, 0.2);
}

/* Category Scroll */
.category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.category-card {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 40px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  transition: all 0.25s;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.category-card:hover {
  border-color: var(--pine-green);
  color: var(--pine-green);
  transform: translateY(-1px);
}
.category-card.is-active {
  background: var(--pine-green);
  color: #fff;
  border-color: var(--pine-green);
  box-shadow: 0 4px 14px rgba(33, 71, 47, 0.25);
}
.category-icon-wrapper { display: flex; align-items: center; line-height: 1; }

/* ── VITRINE ─────────────────────────────────────────────── */

/* Product image inside card */
.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  flex-shrink: 0;
  background: var(--line);
}
.product-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  display: block;
}
.product-card:hover .product-image img { transform: scale(1.06); }

/* Card body */
.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.product-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price + button row */
.product-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-footer .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--pine-green);
  font-family: var(--serif, 'Playfair Display', serif);
}

/* ★ THE BUTTON */
.add-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--pine-green);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(33, 71, 47, 0.22);
  position: relative;
  overflow: hidden;
}
.add-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(33, 71, 47, 0.32);
  background: #1a3a26;
}
.add-btn:hover::before { background: rgba(255,255,255,0.05); }
.add-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(33,71,47,0.2); }

/* Sold-out state */
.product-card.sold-out {
  opacity: 0.6;
  pointer-events: none;
}
.product-card.sold-out::after {
  content: "ESGOTADO";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: var(--wine);
  color: #fff;
  padding: 8px 16px;
  font-weight: 900;
  letter-spacing: 2px;
  font-size: 18px;
  border-radius: 8px;
  z-index: 10;
}

/* Closed/out-of-hours badge */
.closed-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(20,20,20,0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  z-index: 5;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Dimmed state when store is closed */
.product-card.is-closed .product-image img { filter: brightness(0.85); }
.product-card.is-closed .add-btn {
  background: #8a9b8e;
  box-shadow: none;
  cursor: default;
}
.product-card.is-closed .add-btn:hover {
  transform: none;
  box-shadow: none;
  background: #8a9b8e;
}

/* ── CHECKOUT UI ─────────────────────────────────────────── */

/* Overlays */
.drawer-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
  z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.35s;
}
.drawer-overlay.is-active { opacity: 1; pointer-events: auto; }

/* Cart Drawer (main) – controlled by body.cart-open via styles.css */
/* Product Details Drawer – dedicated class */
.pd-drawer {
  position: fixed; top: 0; right: 0; width: 100%; max-width: 460px; height: 100vh;
  background: var(--cream-100, #FAF7EF); z-index: 10001;
  box-shadow: -6px 0 40px rgba(0,0,0,0.12);
  display: flex; flex-direction: column;
  transform: translateX(110%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.pd-drawer.is-active { transform: translateX(0); }

/* Inputs */
.chk-input-group { margin-bottom: 18px; }
.chk-input-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--soft); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.chk-control {
  width: 100%; height: 50px; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 0 16px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--text); transition: all 0.25s;
  appearance: none; -webkit-appearance: none;
}
.chk-control:focus {
  outline: none; border-color: var(--pine-green);
  box-shadow: 0 0 0 3px rgba(33, 71, 47, 0.1);
}
select.chk-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea.chk-control { height: auto; padding: 14px 16px; resize: none; line-height: 1.5; }

.checkout-flow.is-active { display: flex !important; }

/* Back button row */
.cart-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--wine); font-weight: 700; font-size: 13px;
  cursor: pointer; margin-bottom: 20px;
  background: none; border: none; padding: 0;
  text-transform: uppercase; letter-spacing: 0.4px;
  transition: opacity 0.2s;
}
.cart-back-btn:hover { opacity: 0.7; }

/* Cart items */
.cart-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--line); align-items: center;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.cart-item-img {
  width: 76px; height: 76px; border-radius: 14px;
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 14px; font-weight: 700;
  color: var(--pine-green); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-addons {
  font-size: 11px; color: var(--soft); line-height: 1.4;
  margin-bottom: 4px;
}
.cart-item-price { font-size: 14px; font-weight: 800; color: var(--wine); margin-top: 6px; }

/* Qty controls */
.cart-item-controls { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff;
  cursor: pointer; font-size: 15px; font-weight: 700;
  color: var(--pine-green); line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover { background: var(--pine-green); color: #fff; border-color: var(--pine-green); }
.qty-val { font-size: 14px; font-weight: 800; color: var(--text); min-width: 16px; text-align: center; }

/* Empty cart */
.cart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; flex: 1;
}
.cart-empty svg { opacity: 0.25; margin-bottom: 16px; }
.cart-empty p { color: var(--soft); font-size: 15px; font-weight: 500; line-height: 1.5; }

/* Cart footer nav – two-button row */
.cart-nav-row { display: flex; gap: 10px; width: 100%; }
.cart-nav-row .btn { flex: 1; height: 52px; font-size: 15px; }
.cart-nav-row .btn-secondary { flex: 0 0 auto; width: 52px; padding: 0; border-radius: 14px; }

/* Addons */
.addon-group { margin-bottom: 24px; }
.addon-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.addon-header h4 { font-size: 14px; font-weight: 700; color: var(--pine-green); }
.addon-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  background: #FDF3F3; color: var(--wine);
  border: 1px solid rgba(139,43,44,0.2);
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.addon-options { display: flex; flex-direction: column; gap: 8px; }
.addon-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 1.5px solid var(--line);
  border-radius: 14px; cursor: pointer; transition: all 0.2s;
  background: #fff;
}
.addon-option:hover { border-color: var(--pine-green); background: #F4F8F5; }
.addon-option input { accent-color: var(--pine-green); width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; }
.addon-option input:checked + .addon-option { border-color: var(--pine-green); }

/* Toast */
.toast-notif {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--pine-green); color: #fff;
  padding: 14px 24px; border-radius: 40px; z-index: 19999;
  opacity: 0; transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 30px rgba(33,71,47,0.25); white-space: nowrap;
}
.toast-notif.is-active { transform: translateX(-50%) translateY(0); opacity: 1; }
