/* MyHome — store.css: רכיבי המסחר. כרטיסי מוצר, רשימות, עמוד מוצר, עגלה,
   checkout, אזור אישי, חיפוש ודף הבית. הטוקנים — styles.css. */

/* ---------- כרטיס מוצר ---------- */
.product-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.product-grid.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.pc-media { position: relative; aspect-ratio: 1; background: var(--surface-alt); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .pc-media img { transform: scale(1.045); }
.no-image { height: 100%; display: grid; place-items: center; color: var(--text-muted); }
.pc-media .no-image { width: 100%; }
.pc-media .no-image svg { width: 44px; height: 44px; opacity: 0.5; }

.pc-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.badge {
  font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  color: #fff; width: fit-content;
}
.badge-sale { background: var(--sale-color); }
.badge-new { background: var(--brand-green-soft); }
.badge-oos { background: var(--text-muted); }

.pc-wish {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: var(--text-secondary);
  display: grid; place-items: center; transition: color 0.2s, transform 0.15s;
}
.pc-wish:hover { transform: scale(1.1); color: var(--sale-color); }
.pc-wish.active { color: var(--sale-color); }
.pc-wish svg { width: 18px; height: 18px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pc-wish.active svg { transform: scale(1.18); }

.pc-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.pc-name { font-size: 0.97rem; font-weight: 500; line-height: 1.35; color: var(--text-primary); }
.pc-name a { color: inherit; }
.pc-name a::after { content: ''; position: absolute; inset: 0; } /* כל הכרטיס לחיץ */
.pc-rating { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--text-muted); }
.stars { color: var(--star); letter-spacing: 1px; font-size: 0.85rem; }
.reviews-summary .stars { font-size: 1.2rem; }
.reviews-summary .rating-count { font-size: 0.9rem; }
.pc-price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.price { font-weight: 700; font-size: 1.12rem; color: var(--price-color); }
.price-compare { font-size: 0.88rem; color: var(--text-muted); text-decoration: line-through; }
.price-sale { color: var(--sale-color); }
.pc-add {
  position: relative; z-index: 2; /* מעל הקישור הפרוס */
  margin-top: 8px;
}

/* ---------- עמוד קטגוריה ---------- */
.listing-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }

.filters-panel {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px; position: sticky; top: calc(var(--header-h) + 60px);
  max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto;
}
.filters-panel h3 { font-size: 1rem; margin-bottom: 12px; }
.filter-group { border-top: 1px solid var(--border-subtle); padding: 12px 0; }
.filter-group:first-of-type { border-top: none; padding-top: 0; }
.filter-group > strong { display: block; font-size: 0.9rem; margin-bottom: 8px; }
.filter-group label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 0.9rem; margin: 5px 0; cursor: pointer; }
.filter-group input[type='checkbox'], .filter-group input[type='radio'] { width: auto; accent-color: var(--brand-terra); }
.price-inputs { display: flex; align-items: center; gap: 8px; }
.price-inputs input { padding: 7px 10px; font-size: 0.9rem; }
.filters-actions { display: flex; gap: 8px; margin-top: 14px; }

.listing-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.listing-toolbar .results-count { color: var(--text-muted); font-size: 0.9rem; }
.listing-toolbar select { width: auto; padding: 8px 12px; font-size: 0.92rem; }
.filters-open-btn { display: none; }

.subcat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.subcat-chips a {
  padding: 7px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  background: var(--surface-card); border: 1px solid var(--border-subtle); color: var(--text-primary);
}
.subcat-chips a:hover, .subcat-chips a.active {
  background: var(--brand-green); border-color: var(--brand-green); color: #fff;
}

.pagination { display: flex; justify-content: center; gap: 6px; margin: 30px 0 10px; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: var(--surface-card); font-size: 0.92rem; color: var(--text-primary);
}
.pagination .current { background: var(--brand-green); color: #fff; border-color: var(--brand-green); }
.pagination a:hover { border-color: var(--brand-terra); color: var(--brand-terra-deep); }

.filters-backdrop { display: none; }
.filters-handle { display: none; }

@media (max-width: 900px) {
  .listing-layout { grid-template-columns: 1fr; }
  .filters-open-btn { display: inline-flex; }
  .filters-backdrop {
    display: block; position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 12, 9, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  }
  .filters-backdrop.open { opacity: 1; pointer-events: auto; }
  .filters-panel {
    display: block; position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 101;
    max-height: 82vh; border-radius: 20px 20px 0 0;
    padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(105%); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.35, 1);
    box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.2);
  }
  .filters-panel.open { transform: translateY(0); }
  .filters-handle {
    display: block; width: 40px; height: 4px; border-radius: 3px;
    background: var(--border-strong); margin: 6px auto 10px;
  }
  .filters-close {
    position: absolute; top: 14px; inset-inline-end: 16px;
    background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--text-primary);
  }
}
@media (min-width: 901px) { .filters-close { display: none; } }

/* ---------- עמוד מוצר ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; margin-top: 10px; }

.gallery-main {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-alt); border: 1px solid var(--border-subtle);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; cursor: grab; }
.gallery-thumbs.dragging { cursor: grabbing; user-select: none; }
.gallery-thumbs button {
  width: 68px; height: 68px; flex-shrink: 0; padding: 0; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid var(--border-subtle); cursor: pointer; background: var(--surface-alt);
  transition: border-color 0.18s ease, transform 0.15s ease;
}
.gallery-thumbs button.active { border-color: var(--brand-terra); }
.gallery-thumbs.dragging button { pointer-events: none; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-video { margin-top: 14px; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; }
.gallery-video iframe { width: 100%; height: 100%; border: none; }

.product-info h1 { margin-bottom: 6px; }
.pi-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.88rem; margin-bottom: 14px; }
.pi-price-row { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 4px; }
.pi-price-row .price { font-size: 1.9rem; }
.pi-price-row .price-compare { font-size: 1.15rem; }
.discount-pill {
  background: var(--sale-color); color: #fff; font-size: 0.85rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.pi-stock { font-size: 0.92rem; font-weight: 600; margin-bottom: 12px; }
.pi-stock.in { color: var(--success); }
.pi-stock.low { color: var(--brand-terra-deep); }
.pi-stock.out { color: var(--danger); }
.pi-short { color: var(--text-secondary); }

.countdown {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(192, 57, 43, 0.08); border: 1px dashed var(--sale-color);
  color: var(--sale-color); font-weight: 600; font-size: 0.92rem;
  padding: 8px 16px; border-radius: var(--radius-md); margin: 8px 0;
}
.countdown b { font-variant-numeric: tabular-nums; font-size: 1.05rem; }

.tiered-box {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 12px 16px; margin: 12px 0; background: var(--surface-alt); font-size: 0.92rem;
}
.tiered-box strong { display: block; margin-bottom: 6px; color: var(--brand-green-soft); }
.tiered-box span { display: block; padding: 2px 0; }

.pi-actions { display: flex; gap: 12px; align-items: stretch; margin: 18px 0 10px; flex-wrap: wrap; }
.pi-actions--tight { margin-top: 0; }
.qty-stepper {
  display: inline-flex; align-items: center; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md); overflow: hidden; background: var(--surface-card);
}
.qty-stepper button {
  width: 40px; height: 46px; border: none; background: none; cursor: pointer;
  font-size: 1.2rem; color: var(--text-primary);
}
.qty-stepper button:hover { background: var(--surface-alt); }
.qty-stepper input {
  width: 52px; border: none; text-align: center; font-weight: 600; font-size: 1rem;
  -moz-appearance: textfield; background: transparent;
}
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pi-actions .btn-primary { flex: 1; min-width: 180px; }
.pi-secondary { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.pi-secondary button, .pi-secondary a {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 0.9rem; font-family: var(--font-body); padding: 4px 0;
}
.pi-secondary button:hover, .pi-secondary a:hover { color: var(--brand-terra-deep); }
.pi-secondary svg { width: 17px; height: 17px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pi-secondary .active { color: var(--sale-color); }
.pi-secondary .active svg { transform: scale(1.15); }

.notify-form { display: flex; gap: 10px; margin: 14px 0; max-width: 380px; }

/* טאבים */
.tabs { margin-top: 40px; }
.tab-buttons { display: flex; gap: 4px; border-bottom: 2px solid var(--border-subtle); overflow-x: auto; cursor: grab; }
.tab-buttons.dragging { cursor: grabbing; user-select: none; }
.tab-buttons.dragging button { pointer-events: none; }
.tab-buttons button {
  padding: 11px 20px; background: none; border: none; cursor: pointer;
  font-family: var(--font-heading); font-size: 0.98rem; font-weight: 600;
  color: var(--text-secondary); border-bottom: 3px solid transparent; margin-bottom: -2px;
  white-space: nowrap;
}
.tab-buttons button.active { color: var(--brand-terra-deep); border-bottom-color: var(--brand-terra); }
.tab-panel { padding: 22px 4px; display: none; }
.tab-panel.active { display: block; }

.specs-table { width: 100%; border-collapse: collapse; max-width: 640px; }
.specs-table th, .specs-table td { text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--border-subtle); font-size: 0.94rem; }
.specs-table th { color: var(--text-muted); font-weight: 500; width: 38%; }

/* ביקורות */
.reviews-summary { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.reviews-summary .big-score { font-size: 2.6rem; font-weight: 700; color: var(--brand-green); line-height: 1; }
.review-item { border-bottom: 1px solid var(--border-subtle); padding: 16px 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.review-head .rev-name { font-weight: 600; }
.review-head .rev-date { color: var(--text-muted); font-size: 0.82rem; }
.verified-tag {
  font-size: 0.72rem; color: var(--success); border: 1px solid currentColor;
  padding: 1px 8px; border-radius: 999px;
}
.review-title { font-weight: 600; margin: 2px 0; }
.review-body { color: var(--text-secondary); font-size: 0.95rem; margin: 4px 0; }
.review-photos { display: flex; gap: 8px; margin-top: 8px; }
.review-photos a img { width: 74px; height: 74px; object-fit: cover; border-radius: var(--radius-sm); }
.review-form, .question-form {
  background: var(--surface-alt); border-radius: var(--radius-lg);
  padding: 18px; margin-top: 20px; max-width: 640px;
}
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.5rem; color: var(--border-strong); cursor: pointer; margin: 0; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--star); }

/* שו"ת */
.qa-item { border-bottom: 1px solid var(--border-subtle); padding: 14px 0; }
.qa-q { font-weight: 600; }
.qa-a { color: var(--text-secondary); margin-top: 4px; padding-inline-start: 14px; border-inline-start: 3px solid var(--brand-sand); }

/* קרוסלת מוצרים */
.strip-wrap { position: relative; }
.product-strip {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory;
  cursor: grab;
  mask-image: linear-gradient(to right, transparent 0, black 18px, black calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 18px, black calc(100% - 18px), transparent 100%);
}
.product-strip .product-card { flex: 0 0 230px; scroll-snap-align: start; }
.product-strip.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.product-strip.dragging .product-card { pointer-events: none; }

.strip-arrow {
  display: none; position: absolute; top: calc(50% - 12px); transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; z-index: 4;
  background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-lift);
  color: var(--text-primary); cursor: pointer;
  align-items: center; justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.strip-arrow:hover { background: var(--brand-terra); color: #fff; border-color: var(--brand-terra); }
.strip-arrow:active { transform: translateY(-50%) scale(0.94); }
.strip-arrow.prev { inset-inline-start: 6px; }
.strip-arrow.next { inset-inline-end: 6px; }
html[dir='rtl'] .strip-arrow svg { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
  .strip-wrap.has-overflow .strip-arrow { display: flex; }
}

/* ---------- עגלה ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 30px; align-items: start; }

.cart-lines { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border-subtle); align-items: center; }
.cart-line:last-child { border-bottom: none; }
.cart-line img, .cart-line .no-image { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-alt); }
.cl-info .cl-name { font-weight: 600; font-size: 0.97rem; }
.cl-info .cl-unit { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }
.cl-info .qty-stepper { margin-top: 8px; }
.cl-info .qty-stepper button { height: 34px; width: 32px; }
.cl-info .qty-stepper input { width: 40px; font-size: 0.92rem; }
.cl-side { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cl-total { font-weight: 700; font-size: 1.05rem; color: var(--price-color); }
.cl-remove { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.82rem; }
.cl-remove:hover { color: var(--danger); }

.cart-summary {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 20px; position: sticky; top: calc(var(--header-h) + 70px);
}
.cart-summary h2 { font-size: 1.15rem; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.95rem; }
.sum-row.discount { color: var(--success); }
.sum-row.total { border-top: 2px solid var(--border-subtle); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.15rem; }
.coupon-row { display: flex; gap: 8px; margin: 12px 0; }
.coupon-row input { flex: 1; }
.free-ship-note {
  background: var(--surface-alt); border-radius: var(--radius-sm);
  font-size: 0.88rem; padding: 8px 12px; margin: 10px 0; text-align: center;
}
.free-ship-bar { height: 6px; background: var(--border-subtle); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.free-ship-bar > div { height: 100%; background: var(--terra-gradient); border-radius: 3px; transition: width 0.4s ease; }

.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty svg { width: 74px; height: 74px; color: var(--border-strong); margin-inline: auto; }

@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .product-layout { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- שורת קנייה דביקה (מובייל בלבד) ---------- */
.mobile-buybar { display: none; }
@media (max-width: 760px) {
  .mobile-buybar:not([hidden]) {
    display: flex; align-items: center; gap: 12px;
    position: fixed; inset-inline: 0; bottom: var(--tabbar-h, 0); z-index: 85;
    background: var(--surface-card); border-top: 1px solid var(--border-subtle);
    padding: 10px 16px; box-shadow: 0 -4px 16px rgba(21, 18, 14, 0.1);
  }
  body:not(:has(.mobile-tabbar)) .mobile-buybar:not([hidden]) {
    bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
  }
  .mobile-buybar .mb-info { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  .mobile-buybar .mb-info img { width: 38px; height: 38px; object-fit: cover; border-radius: var(--radius-sm); }
  .mobile-buybar .price { font-size: 1.05rem; white-space: nowrap; }
  .mobile-buybar .btn { flex: 1; }
}

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 30px; align-items: start; }
.checkout-section {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px;
}
.checkout-section h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.checkout-section h2 .step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-green);
  color: #fff; font-size: 0.9rem; display: grid; place-items: center; flex-shrink: 0;
}
.option-tile {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border: 1.5px solid var(--border-subtle); border-radius: var(--radius-md);
  cursor: pointer; margin-bottom: 10px; font-weight: 400;
}
.option-tile:has(input:checked) { border-color: var(--brand-terra); background: rgba(225, 6, 0, 0.05); }
.option-tile input { width: auto; accent-color: var(--brand-terra); }
.option-tile .ot-label { flex: 1; }
.option-tile .ot-label small { display: block; color: var(--text-muted); }
.option-tile .ot-price { font-weight: 700; color: var(--price-color); white-space: nowrap; }
.checkout-summary .cart-summary { position: static; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; margin: 14px 0; }
.consent-row input { width: auto; margin-top: 4px; accent-color: var(--brand-terra); }

@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }

/* ---------- Thank you ---------- */
.thankyou-box { max-width: 640px; margin: 50px auto; text-align: center; }
.thankyou-box .check-circle {
  width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--success); color: #fff; display: grid; place-items: center;
}
.thankyou-box .check-circle svg { width: 42px; height: 42px; }
.order-number-pill {
  display: inline-block; background: var(--surface-alt); border: 1px dashed var(--border-strong);
  padding: 8px 22px; border-radius: 999px; font-weight: 700; font-size: 1.1rem; margin: 10px 0;
}
.payment-instructions {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 20px; margin: 22px 0; text-align: start;
}

/* ---------- אזור אישי ---------- */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; margin-top: 10px; }
.account-nav {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 10px; display: flex; flex-direction: column;
}
.account-nav button {
  text-align: start; padding: 11px 14px; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--text-primary); border-radius: var(--radius-sm);
}
.account-nav button:hover { background: var(--surface-alt); }
.account-nav button.active { background: var(--brand-green); color: #fff; font-weight: 600; }
.account-panel { min-height: 300px; }
.auth-box { max-width: 420px; margin: 30px auto; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 26px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; padding: 10px; border: none; cursor: pointer; border-radius: var(--radius-sm);
  background: var(--surface-alt); font-family: var(--font-heading); font-weight: 600; color: var(--text-secondary);
}
.auth-tabs button.active { background: var(--brand-green); color: #fff; }

.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th, .orders-table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); font-size: 0.93rem; }
.orders-table th { color: var(--text-muted); font-weight: 500; font-size: 0.85rem; }
.status-pill { font-size: 0.78rem; font-weight: 600; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.st-pending_payment { background: #FDF3E0; color: #9A6B15; }
.st-paid { background: #E5F2E6; color: #2E7D32; }
.st-processing { background: #E3EDF7; color: #1D5B94; }
.st-shipped { background: #EAE4F7; color: #5E3DA8; }
.st-delivered { background: #E5F2E6; color: #1B5E20; }
.st-cancelled { background: #F3E5E5; color: #B03A2E; }
.st-refunded { background: #EFEBE2; color: #6D655A; }
html[data-theme='dark'] .status-pill { filter: brightness(0.85) saturate(1.2); }

.address-card {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 12px;
}
.address-card .ac-actions { display: flex; gap: 8px; align-items: flex-start; }

@media (max-width: 800px) { .account-layout { grid-template-columns: 1fr; } }

/* ---------- דף הבית ---------- */
.hero {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  margin-top: 18px; background: var(--brand-gradient); color: #fff;
  min-height: 420px; display: flex; align-items: center;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(16, 13, 10, 0.12) 0%, rgba(16, 13, 10, 0.58) 48%, rgba(16, 13, 10, 0.92) 100%);
}
html[dir='ltr'] .hero-media::after {
  background: linear-gradient(to right, rgba(16, 13, 10, 0.12) 0%, rgba(16, 13, 10, 0.58) 48%, rgba(16, 13, 10, 0.92) 100%);
}
.hero-badge {
  position: absolute; top: 22px; inset-inline-end: 26px; z-index: 3;
  opacity: 0.92; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}
.hero-badge img { display: block; border-radius: 50%; }
.hero-content { position: relative; z-index: 2; padding: 40px clamp(22px, 6vw, 70px); max-width: 620px; }
.hero-content h1 { font-family: var(--font-brand); font-weight: 600; color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 10px; }
.hero-content p { color: #E8E1D4; font-size: clamp(1rem, 2vw, 1.2rem); margin-bottom: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.btn-outline-invert { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.55); }
.btn-outline-invert:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.hero-dots { position: absolute; bottom: 16px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
html[dir='rtl'] .hero-dots { transform: translateX(50%); }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,0.45); cursor: pointer; padding: 0; }
.hero-dots button.active { background: #fff; width: 26px; border-radius: 6px; }

@media (max-width: 700px) {
  .hero-media::after, html[dir='ltr'] .hero-media::after {
    background: linear-gradient(180deg, rgba(16, 13, 10, 0.35) 0%, rgba(16, 13, 10, 0.86) 88%);
  }
  .hero-badge { display: none; }
}

/* ---------- פס לייף-סטייל ---------- */
.lifestyle-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 4px; }
.ls-item {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.ls-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ls-item:hover img { transform: scale(1.05); }
@media (max-width: 700px) {
  .lifestyle-strip { grid-template-columns: 1fr 1fr; }
  .ls-item:nth-child(3) { display: none; }
}

.category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.category-tile {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--surface-alt); display: block;
  border: 1px solid var(--border-subtle);
}
.category-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.category-tile:hover img { transform: scale(1.06); }
.category-tile .ct-name {
  position: absolute; inset-inline: 0; bottom: 0; padding: 26px 14px 10px;
  background: linear-gradient(transparent, rgba(15, 12, 9, 0.78));
  color: #fff; font-weight: 600; font-size: 1rem;
}
.category-tile.no-img { display: grid; place-items: center; }
.category-tile.no-img .ct-name { position: static; background: none; color: var(--text-primary); padding: 0; text-align: center; }

/* מסכים קטנים: רשימת התמונות הופכת לפס עגולים נגלל — קומפקטי במקום גריד מרובע גדול */
@media (max-width: 640px) {
  .category-tiles:has(.category-tile:not(.no-img)) {
    display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 8px;
    scroll-snap-type: x mandatory; cursor: grab;
    mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 10px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 10px), transparent 100%);
  }
  .category-tiles.dragging { cursor: grabbing; }
  .category-tiles.dragging .category-tile { pointer-events: none; }
  .category-tile:not(.no-img) {
    flex: 0 0 78px; aspect-ratio: auto; overflow: visible; scroll-snap-align: start;
    display: flex; flex-direction: column; align-items: center; border: none; background: none;
  }
  .category-tile:not(.no-img) img {
    width: 78px; height: 78px; border-radius: 50%; border: 1px solid var(--border-subtle);
  }
  .category-tile:not(.no-img) .ct-name {
    position: static; margin-top: 6px; padding: 0; background: none;
    color: var(--text-primary); font-weight: 500; font-size: 0.74rem; text-align: center;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25;
  }

  /* בלי תמונה (כרגע ברירת המחדל בקטלוג): צ'יפים קומפקטיים בשורות עוטפות במקום כרטיסים מרובעים */
  .category-tiles:not(:has(.category-tile:not(.no-img))) {
    display: flex; flex-wrap: wrap; gap: 8px;
  }
  .category-tile.no-img {
    flex: 0 0 auto; width: auto; aspect-ratio: auto; overflow: visible;
    border-radius: 999px; padding: 9px 16px; background: var(--surface-card);
  }
  .category-tile.no-img .ct-name { font-size: 0.88rem; font-weight: 500; }
}

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.why-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 22px 18px; text-align: center;
}
.why-card .why-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--brand-green); color: #fff;
  box-shadow: 0 0 0 3px var(--bg-base), 0 0 0 4.5px var(--brand-terra);
  display: grid; place-items: center;
  transition: background 0.22s ease;
}
.why-card:hover .why-icon { background: var(--brand-terra); }
.why-card .why-icon svg { width: 26px; height: 26px; }
.why-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.why-card p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }

.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.testimonial-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 20px;
}
.testimonial-card .stars { margin-bottom: 8px; }
.testimonial-card blockquote { margin: 0 0 10px; color: var(--text-secondary); font-size: 0.95rem; }
.testimonial-card cite { font-style: normal; font-weight: 600; font-size: 0.9rem; }

.brand-strip { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 10px 0 20px; }
.brand-strip a, .brand-strip span {
  padding: 12px 26px; background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); font-weight: 600; color: var(--text-secondary); font-size: 1.02rem;
}
.brand-strip a:hover { color: var(--brand-terra-deep); border-color: var(--brand-terra); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.blog-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
}
.blog-card .bc-media { aspect-ratio: 16/9; background: var(--surface-alt); }
.blog-card .bc-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .bc-body { padding: 16px; }
.blog-card h3 { font-size: 1.05rem; }
.blog-card p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }
.blog-card .bc-date { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 6px; }

/* ---------- פופ-אפ ניוזלטר ---------- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 110; background: rgba(15, 12, 9, 0.6);
  display: grid; place-items: center; padding: 20px;
}
.popup-box {
  background: var(--surface-card); border-radius: var(--radius-xl); max-width: 440px; width: 100%;
  padding: 30px; text-align: center; position: relative; box-shadow: var(--shadow-lift);
}
.popup-close {
  position: absolute; top: 12px; inset-inline-end: 14px;
  background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted);
}

/* ---------- מסמך הזמנה להדפסה ---------- */
@media print {
  .order-doc { display: block !important; }
  .account-nav, .account-panel > :not(.order-doc) { display: none !important; }
}

/* ---------- דפי תוכן (אודות/משפטי/עזרה) ---------- */
.prose h2 { margin-top: 28px; }
.prose h3 { margin-top: 20px; }
.prose ul { padding-inline-start: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose blockquote {
  margin: 0 0 1em; padding: 10px 16px; border-inline-start: 3px solid var(--brand-sand);
  background: var(--surface-alt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-secondary);
}
.faq-item { border-bottom: 1px solid var(--border-subtle); padding: 16px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--brand-terra); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 10px 0 0; color: var(--text-secondary); }
