/* Chiping - לקנות חכם */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --orange: #e86100;
  --orange-dark: #c75300;
  --orange-light: #ff7a1a;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #999999;
  --border: #e0e0e0;
  --green: #4caf50;
  --red: #e53935;
  --shadow: rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Heebo', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* Header: Logo + Search + Social */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-logo img { display: block; height: 50px; width: auto; }
.header-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.header-text-link {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  transition: color 0.2s;
}
.header-text-link:hover { color: var(--orange); }
.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}
.social-icon {
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.social-whatsapp:hover { color: #25D366; }
.social-facebook:hover { color: #1877F2; }
.social-telegram:hover { color: #0088CC; }
.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.search-box input {
  width: 100%;
  padding: 8px 40px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--orange); }
.search-box input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Small FB Strip */
.fb-strip {
  background: #e86100;
  text-align: center;
  padding: 8px 20px;
}
.fb-strip a {
  color: #333;
  font-size: 13px;
  font-weight: 500;
}
.fb-strip a:hover { text-decoration: underline; }
.fb-strip strong { font-weight: 800; color: #ffffff; }

/* Nav */
.main-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
}
.nav-main-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  padding: 10px 24px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 15px;
  color: white;
  background: var(--orange);
  border: none;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
  transition: background 0.2s;
}
.nav-link:hover { background: var(--orange-dark); }
.nav-link.active {
  background: #333;
  color: white;
}

/* Categories Mega Menu (horizontal grid) */
.nav-dropdown {
  position: static;
}
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  z-index: 200;
  padding: 20px 24px;
  max-height: 70vh;
  overflow-y: auto;
}
.mega-menu.open { display: block; }
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}
.mega-col {}
.mega-cat-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--orange);
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: color 0.15s;
}
.mega-cat-title:hover { color: var(--orange-dark); }
.mega-sub {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
  cursor: pointer;
  transition: color 0.15s;
}
.mega-sub:hover { color: var(--orange); }
.mega-close {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 251;
  background: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.2s;
}

/* Sort Bar */
.sort-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.sort-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.item-count {
  font-size: 14px;
  color: var(--text-muted);
  flex: 1;
  text-align: right;
}
.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-controls label {
  font-size: 13px;
  color: var(--text-muted);
}
.sort-controls select {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text-primary);
  font-family: 'Heebo', sans-serif;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.reset-btn {
  display: none !important;
}

/* Products Grid */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  min-height: 50vh;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Product Card - matching original Wix design */
.product-card {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  color: #333;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Recommended Label - top left */
.recommended-label {
  position: absolute;
  top: 0;
  left: 0;
  background: #1299ff;
  color: white;
  padding: 5px 14px;
  border-radius: 0 0 8px 0;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  white-space: nowrap;
  line-height: 1.3;
}

/* Sale Stamp Image */
.sale-stamp {
  position: absolute;
  bottom: 38%;
  left: 5%;
  width: 30%;
  z-index: 2;
  pointer-events: none;
  transform: rotate(-8deg);
}

.card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.3s;
}
.product-card:hover .card-image img {
  transform: scale(1.05);
}
.img-fallback {
  padding: 30% !important;
  opacity: 0.3;
  transform: none !important;

}

.card-body {
  padding: 12px 16px 14px;
  flex: 1;
}

/* Company + Price row (matching Wix: logo left, prices right) */
.card-brand-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  min-height: 40px;
}
.card-company-logo {
  max-height: 36px;
  max-width: 100px;
  object-fit: contain;
}
.card-prices {
  text-align: left;
  margin-inline-start: auto;
}
.card-original-price {
  font-size: 15px;
  color: #999;
  text-decoration: line-through;
  display: block;
  text-align: left;
}
.card-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  display: block;
  text-align: left;
}

.card-category {
  display: none;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  text-align: center;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid #eee;
  margin-top: auto;
}
.card-store {
  display: flex;
  align-items: center;
  gap: 0;
}
.card-store-img {
  max-height: 28px;
  max-width: 110px;
  object-fit: contain;
}
.card-store-text {
  font-size: 12px;
  color: #999;
}
.card-date {
  font-size: 11px;
  color: #999;
}

/* Buy Button on card hover - replaces footer */
.card-buy-btn {
  display: none;
  background: var(--orange);
  color: white;
  text-align: center;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  border-top: 1px solid #eee;
  transition: background 0.2s;
}
.product-card:hover .card-buy-btn { display: block; }
.product-card:hover .card-footer { display: none; }
.card-buy-btn:hover { background: var(--orange-dark); }

/* Loading */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: border-color 0.2s;
}
.modal-close:hover { border-color: var(--orange); }

.modal-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.modal-image img {
  max-width: 80%;
  max-height: 100%;
  object-fit: contain;
}
.modal-body { padding: 24px; }
.modal-category {
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}
.modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  white-space: pre-line;
}
.modal-specs {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}
.modal-specs-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}
.modal-price-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.modal-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--orange);
}
.modal-full-price {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.modal-store-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.modal-buy-btn {
  display: block;
  width: 100%;
  background: var(--orange);
  color: white;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-family: 'Heebo', sans-serif;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.modal-buy-btn:hover { background: var(--orange-light); }
.modal-coupon {
  background: rgba(232, 97, 0, 0.1);
  border: 1px dashed var(--orange);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  text-align: center;
}
.modal-coupon-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.modal-coupon-code {
  font-size: 18px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 2px;
}

/* Page Overlays (About, Contact) */
.page-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  overflow-y: auto;
}
.page-overlay.open { display: flex; }
.page-content {
  background: white;
  border-radius: 12px;
  max-width: 650px;
  width: 100%;
  padding: 40px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  margin-top: 40px;
}
.page-content h1 {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.page-content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-align: right;
}
.page-link {
  color: var(--orange) !important;
  text-decoration: underline;
  font-weight: 600;
}
.page-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #f5f5f5;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background 0.2s;
}
.page-close:hover { background: #e0e0e0; }

/* Contact Form */
.contact-subtitle {
  text-align: center !important;
  color: var(--text-muted) !important;
  margin-bottom: 24px !important;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form select,
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: white;
  outline: none;
  transition: border-color 0.2s;
  direction: rtl;
}
.contact-form select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-submit {
  background: var(--orange);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-family: 'Heebo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-submit:hover { background: var(--orange-light); }
.contact-success {
  text-align: center;
  color: var(--green);
  font-weight: 600;
  padding: 12px;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--orange); }
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 6px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* Mobile Dropdown (hamburger menu) */
.mobile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 99;
}
.mobile-dropdown.open { display: flex; flex-direction: column; }
.mobile-dropdown a {
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.2s;
}
.mobile-dropdown a:hover { color: var(--orange); }

/* Scroll Sentinel */
.scroll-sentinel { height: 1px; }

/* Mobile */
@media (max-width: 768px) {
  /* FB strip - compact 2 lines */
  .fb-strip { font-size: 12px; padding: 6px 12px; }
  .fb-strip a { display: block; line-height: 1.5; }

  /* Header - compact */
  .header { padding: 6px 0; }
  .header-inner { gap: 8px; }
  .header-logo { order: 10; }
  .search-box { order: 2; }
  .mobile-menu-btn { order: -1; display: flex; }
  .header-logo img { height: 34px; }
  .header-links { display: none; }
  .social-links { display: none; }
  .search-box { max-width: none; flex: 1; }
  .search-box input { padding: 8px 34px 8px 12px; font-size: 14px; }

  /* Nav - compact row */
  .nav-inner { height: 40px; padding: 0 12px; }
  .nav-main-links { gap: 4px; }
  .nav-link { padding: 7px 16px; font-size: 13px; border-radius: 20px; }

  /* Categories mega menu - full screen overlay */
  .mega-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none;
    border-radius: 0;
    padding: 50px 12px 20px;
    z-index: 300;
    overflow-y: auto;
    background: white;
    box-shadow: none;
  }
  .mega-menu::before {
    content: 'קטגוריות';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--orange);
    color: white;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    z-index: 301;
  }
  .mega-close {
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 302;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    font-size: 18px;
    color: white;
  }
  .mega-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .mega-cat-title { font-size: 13px; }
  .mega-sub { font-size: 12px; padding: 4px 0; }

  /* Sort bar */
  .sort-inner { flex-wrap: wrap; gap: 6px; font-size: 13px; padding: 8px 12px; }

  /* Product cards */
  .products-section { padding: 12px 8px 40px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card-body { padding: 8px 8px 10px; }
  .card-title { font-size: 13px; }
  .card-price { font-size: 20px; }
  .card-original-price { font-size: 14px; }
  .card-buy-btn { display: none !important; }
  .card-image img { padding: 8px; }
  .card-company-logo { max-height: 20px; max-width: 60px; }
  .card-brand-price { min-height: 34px; }
  .card-footer { padding: 6px 8px; }
  .card-store-img { max-height: 18px; max-width: 65px; }
  .card-date { font-size: 11px; }

  /* Layout picker */
  .layout-picker { display: flex !important; }

  /* List view on mobile */
  .products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .list-view .product-card {
    flex-direction: row;
    min-height: 120px;
  }
  .list-view .card-image {
    width: 130px;
    min-width: 130px;
    aspect-ratio: auto;
  }
  .list-view .card-image img {
    height: 100%;
    padding: 6px;
  }
  .list-view .card-body {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .list-view .card-title { font-size: 14px; -webkit-line-clamp: 2; }
  .list-view .card-price { font-size: 22px; }
  .list-view .card-original-price { font-size: 14px; }
  .list-view .card-company-logo { max-height: 22px; max-width: 70px; }
  .list-view .card-footer { display: none; }
  .list-view .ribbon { font-size: 10px; padding: 3px 8px; }
  .list-view .recommended-label { font-size: 10px; padding: 3px 8px; }
  .list-view .sale-stamp { width: 30%; bottom: 10%; }

  /* Labels */
  .ribbon { font-size: 11px; padding: 4px 10px; }
  .recommended-label { font-size: 11px; padding: 4px 10px; }
  .sale-stamp { width: 25%; }

  /* Modal */
  .modal { border-radius: 12px; margin: 10px; }
  .modal-title { font-size: 20px; }
  .modal-price { font-size: 28px; }
  .modal-body { padding: 16px; }
  .modal-buy-btn { font-size: 16px; }

  /* Page overlays */
  .page-content { padding: 24px 16px; margin-top: 20px; }
  .page-content h1 { font-size: 22px; }

  /* Mobile dropdown menu */
  .mobile-dropdown { font-size: 15px; }

  /* First-time FB banner */
  .fb-banner { font-size: 11px; flex-wrap: wrap; justify-content: center; padding: 8px 12px; gap: 6px; }
}

@media (max-width: 480px) {
  .products-grid { gap: 6px; }
  .card-body { padding: 6px 7px 8px; }
  .card-title { font-size: 12px; -webkit-line-clamp: 2; }
  .card-price { font-size: 18px; }
  .card-original-price { font-size: 12px; }
  .card-footer { display: none; }
  .card-brand-price { min-height: 28px; }
  .card-company-logo { max-height: 16px; max-width: 50px; }
  .ribbon { font-size: 10px; padding: 3px 7px; }
  .recommended-label { font-size: 10px; padding: 3px 7px; }
  .nav-link { padding: 6px 12px; font-size: 12px; }

  .list-view .card-image { width: 110px; min-width: 110px; }
  .list-view .card-title { font-size: 13px; }
  .list-view .card-price { font-size: 20px; }
}

/* Layout Picker - hidden on desktop, visible on mobile via media query */
.layout-picker {
  display: none;
  gap: 0;
  align-items: center;
  margin-left: 8px;
}
.layout-btn {
  background: #fff;
  border: 1px solid #ddd;
  padding: 6px 10px;
  cursor: pointer;
  color: #999;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.layout-btn:first-child { border-radius: 0 6px 6px 0; border-left: none; }
.layout-btn:last-child { border-radius: 6px 0 0 6px; }
.layout-btn.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Admin Link (hidden in footer) */
.admin-link {
  position: fixed;
  bottom: 10px;
  left: 10px;
  font-size: 10px;
  color: var(--border);
  opacity: 0.3;
}
.admin-link:hover { opacity: 1; color: var(--orange); }

/* Ribbons (lowest price) - top right */
.ribbon {
  position: absolute;
  top: 0;
  right: 0;
  color: white;
  padding: 5px 14px;
  border-radius: 0 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  white-space: nowrap;
  line-height: 1.3;
}
.ribbon-red { background: #e53935; }

/* First-time Facebook Banner (JS-generated) */
.fb-banner {
  background: #1877f2;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}
.fb-banner-btn {
  background: white;
  color: #1877f2;
  padding: 4px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
}
.fb-banner-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
}
.fb-banner-close:hover { opacity: 1; }

/* Modal enhancements */
.modal-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.modal-category-link {
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
}
.modal-category-link:hover { text-decoration: underline; }
.modal-ribbon {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: white;
}
.modal-ribbon-red { background: #e53935; }
.modal-ribbon-blue { background: #1299ff; }
.modal-subcats {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.modal-model {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.modal-shipping {
  font-size: 14px;
  color: var(--text-secondary);
}
.modal-discount-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.modal-savings {
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}
.modal-foreign-price {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.modal-coupon-btn {
  background: var(--orange);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.modal-coupon-btn:hover { background: var(--orange-light); }
.modal-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.modal-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Info Box (tax/customs warnings) */
.info-box {
  background: #f9f9f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.info-box.info-warning {
  border-color: #ff9800;
  background: rgba(255, 152, 0, 0.08);
}

/* Gallery */
.modal-gallery { border-radius: 16px 16px 0 0; overflow: hidden; }
.gallery-main {
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/10;
  position: relative;
}
.gallery-main img { max-width: 80%; max-height: 100%; object-fit: contain; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.gallery-arrow:hover { background: rgba(0,0,0,0.7); }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-counter {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
}
.gallery-thumbs {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: var(--bg-secondary);
  overflow-x: auto;
}
.gallery-thumb {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #f9f9f9;
  padding: 2px;
  flex-shrink: 0;
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--orange); }

/* Share Buttons */
.modal-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.share-btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }
.modal-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: left;
}
