/* Alizade — small targeted fixes (loaded after style.css) */
/* Cart toast while the drawer is open: dock it just above the drawer footer
   (promo field / totals / checkout button) instead of the top edge, where it
   used to sit on top of the drawer title on phones. */
body.toast-top #toast {
  top: auto !important;
  bottom: var(--toast-dock-bottom, 190px) !important;
  z-index: 3000;
}
/* footer brand/tagline were removed — keep the footer grid balanced */
#site-footer .footer-tagline:empty { display: none; }

/* An empty toast used to sit visible as a bare dark rectangle (its hide state relied
   only on the translate offset, which the mobile bottom offset undid). Hide it for real. */
#toast {
  visibility: hidden;
  opacity: 0;
  transition: transform .35s var(--ease), opacity .2s var(--ease), visibility 0s linear .35s;
  pointer-events: none;
}
#toast.show {
  visibility: visible;
  opacity: 1;
  transition: transform .35s var(--ease), opacity .15s var(--ease), visibility 0s;
}

/* Trendyol-style coupon chips under a product card ("Kuponu götür").
   Cards are ~160-220px wide, so the chip stacks: code + amount, then the button. */
.card-coupons { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.coupon-chip {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  border: 1px dashed var(--tan, #c8a98b); border-radius: 8px; background: #fff8f2;
  padding: 8px 9px; font-size: 0.72rem; color: var(--choco, #4a2e1f); min-width: 0;
}
.coupon-chip-info {
  display: block; line-height: 1.35; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.coupon-chip-info i { margin-right: 3px; }
.coupon-chip-info strong { letter-spacing: 0.04em; }
.coupon-chip-btn {
  border: 0; border-radius: 6px; background: var(--choco, #4a2e1f); color: #fff;
  padding: 6px 10px; font-size: 0.68rem; font-weight: 600; font-family: inherit; cursor: pointer;
  white-space: nowrap; transition: opacity .15s ease;
}
.coupon-chip-btn:hover { opacity: .88; }
.coupon-chip.claimed { background: #f3f7f3; border-color: #3c7a52; }
.coupon-chip.claimed .coupon-chip-btn { background: #3c7a52; cursor: default; opacity: .95; }

/* ---- Support entry (floating button, header + footer links, guest notice) ---- */
.support-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; background: var(--choco); color: #fff; border-radius: 999px; font-family: inherit; font-size: 0.9rem; font-weight: 500; text-decoration: none; box-shadow: 0 6px 20px rgba(42, 28, 18, 0.28); transition: transform .2s, background .2s; }
.support-fab:hover { background: var(--choco-deep); transform: translateY(-2px); }
.support-fab i { font-size: 1rem; }
body:has(.buybar) .support-fab { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }   /* stay above the product buy bar */
@media (max-width: 520px) { .support-fab span { display: none; } .support-fab { padding: 14px; } }
.support-login-note { max-width: 420px; margin: 0 auto 16px; padding: 12px 16px; background: var(--cream-dark); border: 1px solid var(--hairline); border-radius: 10px; color: var(--choco); font-size: 0.92rem; text-align: center; }

/* ---- Low-stock badge (product cards + product page) ----
   Replaces the old red "Yalnız N qalıb" text with one quiet boutique-style
   pill: soft beige/champagne background, chocolate lettering, a small tan dot.
   The number is always the real remaining quantity (stock <= 5). */
.badge-stock-low {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  padding: 5px 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, #F7F0E6 0%, #EFE3D2 100%);
  border: 1px solid var(--hairline, #e3d8c8);
  color: var(--choco, #4a2e1f);
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(74, 46, 31, 0.05);
}
.badge-stock-low::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--tan, #c8a98b);
}
/* The meta row (stock note / low-stock badge) sits under the centred card text */
.card-meta-row { justify-content: center; }
/* On the product page the badge rides inline after the delivery estimate */
.pd-ship .badge-stock-low { margin: 0 0 0 6px; vertical-align: middle; }

@media (max-width: 520px) {
  .product-card .badge-sale, .product-card .badge-bestseller { top: 10px; font-size: 0.56rem; padding: 4px 9px; letter-spacing: 0.12em; }
  .product-card .badge-sale { left: 10px; }
  .product-card .badge-bestseller { left: 10px; }
  .product-card .card-img .badge-sale + .badge-bestseller { top: 38px; }
}

/* ---- Product page option selectors (size / colour / weight / custom) ----
   Only the states the new variant UI needs; the rest of the design is untouched. */
/* colour thumbnails: ~64px, and the selected colour carries an unmistakable border */
.color-swatch { width: 64px; height: 64px; }
.color-swatch.active { border-color: var(--choco); box-shadow: 0 0 0 2px var(--cream), 0 0 0 3px var(--choco); }
.color-swatch.oos { opacity: .4; }
.color-swatch.oos img { filter: grayscale(.6); }
/* a size / weight / colour choice that is sold out is faded and crossed out, and cannot be picked */
.var-pill.oos { opacity: .42; cursor: not-allowed; }
.var-pill.oos:hover { border-color: var(--tan-light, #E4D5C3); }
.var-pill.oos .vp-l, .var-pill.oos .vp-p { text-decoration: line-through; }
.var-pill:disabled { cursor: not-allowed; }
@media (max-width: 520px) { .color-swatch { width: 60px; height: 60px; } }

/* ---- Seller registration: platform service fee agreement (mandatory checkbox) ---- */
.seller-agreement {
  border: 1px solid var(--hairline, #e6ddd3);
  background: var(--cream-soft, #fbf7f1);
  border-radius: 10px;
  padding: 14px 16px;
}
.seller-agreement-text strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--choco);
  margin-bottom: 6px;
}
.seller-agreement-text p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text, #3d312a);
  margin: 0 0 12px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--choco);
  cursor: pointer;
  line-height: 1.45;
}
.check-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--choco, #4a2e1f);
  flex: none;
}
.check-row em { color: var(--text-muted); font-style: normal; font-size: 0.78rem; }

/* ---- Platform service fee panel (seller) ---- */
.fee-due {
  border-top: 1px solid var(--hairline, #e6ddd3);
  border-bottom: 1px solid var(--hairline, #e6ddd3);
  padding: 16px 2px 14px;
  margin-bottom: 16px;
}
.fee-due-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--choco-light, #8a6a4f);
  margin-bottom: 6px;
}
.fee-due-amount {
  display: block;
  font-family: var(--serif, 'Cormorant Garamond', serif);
  font-size: 2rem;
  line-height: 1.15;
  color: var(--choco);
}
/* the reminder sits neatly under the amount: small, readable, never dominant */
.fee-due-note {
  display: none;
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #8A6A2F;
}
.pf-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--cream-soft, #fbf7f1);
  border: 1px solid var(--hairline, #e6ddd3);
  border-radius: 10px;
  padding: 14px 16px;
}
.pf-card-box { display: flex; flex-direction: column; gap: 3px; }
.pf-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--choco-light, #8a6a4f);
}
.pf-card-box strong { font-size: 1rem; letter-spacing: 0.05em; color: var(--choco); }
.pf-card-label { font-size: 0.78rem; color: var(--text-muted); }
.pf-pay .btn-primary { padding: 11px 26px; white-space: nowrap; }
.pf-pay .btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.pf-state { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; min-height: 1em; }
.pf-state.pending { color: #8A6A2F; }
.pf-state.ok { color: var(--success, #4b7d3a); }
.pf-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--hairline, #e6ddd3);
  white-space: nowrap;
}
.pf-chip.pending { background: #F3EBDD; color: #8A6A2F; }
.pf-chip.confirmed { background: #E5EFDF; color: var(--success, #4b7d3a); }
.pf-chip.rejected { background: #F3E3DF; color: var(--danger, #a83232); }

/* ---- Customer order card: full status history ---- */
.order-history {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--hairline, #e6ddd3);
}
.order-history-title {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--choco-light, #8a6a4f);
  margin-bottom: 5px;
}
.order-history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 1px 0;
}
.order-history-row span:first-child { color: var(--text, #3d312a); }

/* ---- "Son N ədəd" on the photo — the SAME badge as “Bestseller” ----
   It carries the .badge-bestseller class, so font, size, weight, colour, background, border and
   padding are literally the same rules; only the corner differs: bottom-left on a card (the
   discount label owns the top-left and the heart the top-right), stacked under the discount
   label on the product page. Nothing here sets a colour of its own. */
.card-img .badge-badge-stock { top: auto; right: auto; bottom: 14px; left: 14px; }
.detail-img .badge-badge-stock { top: 52px; bottom: auto; left: 14px; right: auto; }
.detail-img.no-sale .badge-badge-stock { top: 14px; }
@media (max-width: 520px) {
  .product-card .card-img .badge-badge-stock { top: auto; right: auto; bottom: 10px; left: 10px; }
  .detail-img .badge-badge-stock { top: 46px; bottom: auto; left: 10px; right: auto; }
  .detail-img.no-sale .badge-badge-stock { top: 10px; }
}
