/* ==========================================
   CART.CSS - Stiluri pentru Bara Coș, Bottom Sheet Produse & Modale
   ========================================== */

/* ---------------- RECEIPT BOTTOM SHEET (Modal Produs & Configurare) ---------------- */
.receipt-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; height: 75vh; z-index: 50;
  width: 100%; max-width: 480px; margin: 0 auto;
  filter: drop-shadow(0 -18px 34px rgba(0,0,0,0.45));
  transform: translateY(100%); transition: transform 0.4s var(--ease-fluid);
  display: flex; flex-direction: column; overflow: visible;
}
.receipt-sheet.show { transform: translateY(0); }

.receipt-paper {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--bg-ticket); color: var(--ink); overflow: hidden;
  clip-path: polygon(
    0% 4%, 3.125% 0%, 6.25% 4%, 9.375% 0%, 12.5% 4%, 15.625% 0%, 18.75% 4%, 21.875% 0%,
    25% 4%, 28.125% 0%, 31.25% 4%, 34.375% 0%, 37.5% 4%, 40.625% 0%, 43.75% 4%, 46.875% 0%,
    50% 4%, 53.125% 0%, 56.25% 4%, 59.375% 0%, 62.5% 4%, 65.625% 0%, 68.75% 4%, 71.875% 0%,
    75% 4%, 78.125% 0%, 81.25% 4%, 84.375% 0%, 87.5% 4%, 90.625% 0%, 93.75% 4%, 96.875% 0%, 100% 4%,
    100% 100%, 0% 100%
  );
}

.floating-product-img {
  position: absolute; top: -55px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  border: 5px solid var(--bg-ticket); box-shadow: 0 8px 24px rgba(36,26,20,0.2);
  background: #FFFBF5; z-index: 65; display: none;
}
.receipt-sheet.show .floating-product-img { display: block; }

.receipt-sticky-header {
  padding: 65px 24px 16px; background: var(--bg-ticket); flex-shrink: 0;
  border-bottom: 2px dashed var(--line); text-align: center;
}
.sheet-title { font-family: var(--font-display); font-size: 22px; line-height: 1.1; margin: 0 0 6px; color: var(--ink); }
.sheet-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.4; margin-bottom: 8px; }
.sheet-price-tag { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--flame); }

.receipt-scrollable-body {
  flex: 1; overflow-y: auto; scrollbar-width: none;
  padding: 20px 24px 90px; display: flex; flex-direction: column; gap: 20px;
}
.receipt-scrollable-body::-webkit-scrollbar { display: none; }

.macros-toggle-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--card-bg); border: 1.5px solid var(--line);
  padding: 12px 14px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 700;
  color: var(--mustard); cursor: pointer; width: 100%; transition: background var(--dur-fast);
}
.macros-toggle-btn:active { background: #F3EAD8; }

.macros-content-box {
  background: #F3EAD8; border-radius: 14px; padding: 12px;
  font-size: 12.5px; color: var(--ink-soft); font-family: var(--font-mono); line-height: 1.5;
  display: none; border: 1px solid var(--line); margin-top: -10px;
}
.macros-content-box.open { display: block; }

.config-section-title {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--ink-soft); margin-bottom: 12px; display: block;
}

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-card {
  background: var(--card-bg); border: 2px solid var(--line); border-radius: var(--radius-pill); 
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: all var(--dur-fast); user-select: none;
}
.option-card.selected { background: #FFF0ED; border-color: var(--flame); }
.option-info { display: flex; flex-direction: column; gap: 2px; }
.option-label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.option-price { font-family: var(--font-mono); font-size: 11px; color: var(--mustard); font-weight: 600; }
.option-checkbox-ui {
  width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.option-card.selected .option-checkbox-ui { background: var(--flame); border-color: var(--flame); color: #fff; }
.option-checkbox-ui svg { width: 12px; height: 12px; stroke-width: 4; }

.special-notes-box {
  width: 100%; height: 75px; padding: 12px 14px; border-radius: 16px;
  border: 1.5px dashed var(--ink-soft); background: transparent;
  font-size: 13.5px; resize: none; color: var(--ink); font-family: var(--font-mono);
}
.special-notes-box:focus { border-color: var(--flame); outline: none; background: var(--card-bg); }

.sheet-footer {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 20px 24px;
  background: linear-gradient(to top, var(--bg-ticket) 85%, transparent);
  display: flex; align-items: center; gap: 12px; z-index: 60;
}

.sheet-stepper {
  display: flex; align-items: center; gap: 12px; background: var(--card-bg);
  border-radius: var(--radius-pill); padding: 6px 10px; border: 2px solid var(--line);
}
.sheet-stepper button { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--ink); background: #F3EAD8; }
.sheet-stepper span { font-family: var(--font-mono); font-weight: 700; font-size: 16px; min-width: 20px; text-align: center; }

.btn-primary {
  flex: 1; padding: 16px; border-radius: var(--radius-pill);
  background: var(--flame); color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-btn); display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform var(--dur-fast); letter-spacing: 0.3px;
}
.btn-primary:active { transform: scale(0.96); background: var(--flame-dark); }

/* ---------------- Modal Locatie ---------------- */
.loc-sheet { height: auto; max-height: 80vh; }
.loc-sheet .receipt-sticky-header { padding: 40px 24px 16px; }
.loc-list { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px 40px; }
.loc-card {
  background: var(--card-bg); border: 2px solid var(--line); border-radius: 20px;
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: all var(--dur-fast);
}
.loc-card:active { transform: scale(0.97); }
.loc-card.active { border-color: var(--flame); background: #FFF0ED; }
.loc-info-main { font-size: 16px; font-weight: 800; color: var(--ink); display:flex; align-items:center; gap:8px; }
.loc-info-sub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; font-family: var(--font-mono); }
.loc-indicator {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.loc-card.active .loc-indicator { background: var(--flame); border-color: var(--flame); color: #fff; }
.loc-indicator svg { width: 14px; height: 14px; stroke-width: 3.5; }

/* ---------------- Cart Bar (Bara de Jos Coș) ---------------- */
.cart-bar{ position:fixed; left:0; right:0; bottom:0; z-index:20; display:flex; justify-content:center; transform: translateY(120%); transition: transform var(--dur-med) var(--ease-fluid); pointer-events: none; }
.cart-bar.show{ transform: translateY(0); pointer-events: auto; }
.cart-bar-inner{
  width: 100%; max-width: calc(480px - 32px); margin: 0 16px 24px; background: var(--ink); color:#fff;
  border-radius: 20px; padding: 16px 24px; display:flex; align-items:center; justify-content:space-between;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5); cursor: pointer; transition: transform var(--dur-fast);
}
.cart-bar-inner:active { transform: scale(0.96); }
.cart-bar-count{ font-family: var(--font-mono); font-size:13px; color: var(--mustard); font-weight: 700; letter-spacing: 0.5px; }
.cart-bar-total{ font-size:19px; font-weight:800; margin-top:4px; }
.cart-bar-cta{ display:flex; align-items:center; gap:8px; font-weight:800; font-size:16px; }

@media(max-width: 360px) {
  .side-rail { width: 56px; }
  .rail-item { width: 44px; height: 44px; }
  .main-col { padding-left: 76px; }
}
