/* Custom Order System - Clean Minimal Design */
/* Colors: Dark Gray, White, Red accent */

/* Hide Elementor header */
body:has(.cos-container) .elementor-location-header,
body:has(.cos-container) header.elementor-element,
body:has(.cos-container) .elementor-section[data-element_type="header"],
body:has(.cos-container) #masthead,
body:has(.cos-container) .site-header,
body:has(.cos-container) header#header,
body:has(.cos-container) .header-wrapper {
  display: none !important;
}

body.cos-active .elementor-location-header,
body.cos-active header.elementor-element,
body.cos-active .elementor-section[data-element_type="header"],
body.cos-active #masthead,
body.cos-active .site-header,
body.cos-active header#header,
body.cos-active .header-wrapper {
  display: none !important;
}

:root {
  /* שחור רך יותר - אפור כהה */
  --cos-black: #333333;
  --cos-black-dark: #222222;
  --cos-white: #ffffff;
  --cos-off-white: #fafafa;
  --cos-gray-light: #f5f5f5;
  --cos-gray: #e0e0e0;
  --cos-gray-dark: #888888;
  --cos-red: #e53935;
  --cos-red-dark: #c62828;
  --cos-border: #e0e0e0;
  --cos-shadow: rgba(0, 0, 0, 0.08);
  --header-height: 100px;
  --admin-bar-height: 0px;
}

body.admin-bar {
  --admin-bar-height: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --admin-bar-height: 46px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 170px;
  }
}

.cos-category-section {
  scroll-margin-top: calc(var(--header-height) + var(--admin-bar-height) + 10px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* === CONTAINER === */
.cos-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  direction: rtl;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--cos-off-white);
  padding-top: calc(var(--header-height) + var(--admin-bar-height));
}

/* === HEADER === */
.cos-header {
  position: fixed;
  top: var(--admin-bar-height);
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--cos-white);
  border-bottom: 1px solid var(--cos-border);
  display: flex;
  flex-direction: column;
}

/* Header Top Row */
.cos-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--cos-border);
  min-height: 50px;
}

.cos-header-right,
.cos-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cos-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.cos-header-logo img {
  height: 60px !important;
  width: auto !important;
  object-fit: contain;
}

/* SVG Icons */
.cos-icon,
.cos-cart-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Header Buttons */
.cos-back-to-site,
.cos-my-account-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent !important;
  border: 1px solid var(--cos-black) !important;
  color: var(--cos-black) !important;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cos-back-to-site:hover,
.cos-my-account-btn:hover {
  background: var(--cos-black) !important;
  color: var(--cos-white) !important;
}

.cos-back-arrow {
  font-size: 14px;
}

/* Menu Toggle - Hidden on desktop */
.cos-menu-toggle {
  display: none;
}

/* Cart Button */
.cos-mini-cart {
  position: relative;
}

.cos-cart-btn,
#prop {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 1px solid var(--cos-black) !important;
  color: var(--cos-black) !important;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.cos-cart-btn:hover,
#prop:hover {
  background: var(--cos-black) !important;
  color: var(--cos-white) !important;
}

.cart-count {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--cos-red) !important;
  color: var(--cos-white) !important;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
}

/* Header Bottom Row */
.cos-header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  gap: 20px;
  min-height: 50px;
}

/* Search */
.cos-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.cos-search-input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--cos-border);
  font-size: 14px;
  background: var(--cos-white);
  transition: border-color 0.2s ease;
}

.cos-search-input:focus {
  outline: none;
  border-color: var(--cos-black);
}

.cos-search-input::placeholder {
  color: #999;
}

.cos-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cos-search-icon svg {
  width: 18px;
  height: 18px;
  stroke: #999;
}

/* Filters */
.cos-filters {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cos-filter-btn {
  background: transparent !important;
  border: 1px solid var(--cos-black) !important;
  color: var(--cos-black) !important;
  padding: 10px 20px;

  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cos-filter-btn:hover {
  background: var(--cos-gray-light) !important;
}

.cos-filter-btn.active {
  background: var(--cos-black) !important;
  color: var(--cos-white) !important;
}

/* === CONTENT === */
.cos-content-wrapper {
  display: flex;
  gap: 20px;
  padding: 20px;
  min-height: calc(100vh - var(--header-height) - var(--admin-bar-height));
}

/* === SIDEBAR === */
.cos-sidebar {
  width: 250px;
  flex-shrink: 0;
}

.cos-sidebar-sticky {
  position: fixed;
  top: calc(var(--header-height) + var(--admin-bar-height) + 20px);
  width: 250px;
  background: var(--cos-white);
  padding: 16px;
  border: 1px solid var(--cos-border);
  max-height: calc(
    100vh - var(--header-height) - var(--admin-bar-height) - 40px
  );
  overflow-y: auto;
}

/* Sidebar Header - Hidden on desktop */
.cos-sidebar-header {
  display: none;
}

.cos-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cos-category-item {
  margin-bottom: 4px;
}

.cos-category-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  color: var(--cos-black);
  text-decoration: none;

  transition: all 0.2s ease;
  font-size: 14px;
}

.cos-category-item a:hover {
  background: var(--cos-gray-light);
}

.cos-category-item.active a {
  background: var(--cos-black);
  color: var(--cos-white);
}

.category-count {
  color: var(--cos-gray-dark);
  font-size: 12px;
}

.cos-category-item.active .category-count {
  color: rgba(255, 255, 255, 0.7);
}

/* === MAIN CONTENT === */
.cos-main-content {
  flex: 1;
  min-width: 0;
}

.cos-category-section {
  margin-bottom: 40px;
}

.cos-category-title {
  background: var(--cos-black);
  color: var(--cos-white);
  padding: 12px 20px;

  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 600;
}

/* === PRODUCTS GRID === */
.cos-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* === PRODUCT CARD === */
.cos-product-card {
  background: var(--cos-white);
  overflow: hidden;
  border: 1px solid var(--cos-border);
  transition: box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Out of stock */
.cos-product-card.cos-out-of-stock {
  cursor: default;
}
.cos-product-card.cos-out-of-stock .cos-product-image img {
  filter: grayscale(0.6) opacity(0.55);
}
.cos-oos-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}
.cos-oos-badge {
  background: rgba(51, 51, 51, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.cos-add-btn-oos {
  background: #bdbdbd !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.85;
  width: 100%;
}
.cos-add-btn-oos:hover {
  background: #bdbdbd !important;
}

.cos-product-card:hover {
  box-shadow: 0 4px 20px var(--cos-shadow);
}

.cos-product-card.hidden {
  display: none;
}

.cos-product-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%;
  overflow: hidden;
  background: var(--cos-gray-light);
}

.cos-product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

/* Sale Badge — rounded pill, unified language with bulk badges */
.cos-sale-star {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  background: var(--cos-red) !important;
  color: var(--cos-white) !important;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.2px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  z-index: 10;
}

/* Bulk Deal Badges */
.cos-bulk-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.cos-bulk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: var(--cos-white);
  padding: 6px 12px 6px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.15;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.28);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
  direction: rtl;
}

.cos-bulk-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.cos-bulk-badge:hover,
.cos-bulk-badge.active {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.38);
}

.cos-bulk-badge.active {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 1px;
}

/* Free / BOGO variant */
.cos-bulk-badge.cos-bulk-free {
  background: linear-gradient(135deg, #ffb300 0%, #e65100 100%);
  box-shadow: 0 2px 6px rgba(230, 81, 0, 0.35);
  animation: cosBulkFreePulse 2.4s ease-in-out infinite;
}

.cos-bulk-badge.cos-bulk-free:hover,
.cos-bulk-badge.cos-bulk-free.active {
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.5);
}

.cos-bulk-badge.cos-bulk-free .cos-bulk-badge-icon {
  background: rgba(255, 255, 255, 0.28);
  font-size: 13px;
}

@keyframes cosBulkFreePulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(230, 81, 0, 0.35); }
  50%      { box-shadow: 0 2px 14px rgba(230, 81, 0, 0.6); }
}

/* "כמות" label — elegant styling */
.cos-modal-quantity > label,
.cos-quantity-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cos-black);
  letter-spacing: 0.3px;
  position: relative;
  padding-right: 2px;
}

.cos-modal-quantity > label::before,
.cos-quantity-label::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e7d32' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='7' width='16' height='13' rx='2'/><path d='M8 7V5a4 4 0 0 1 8 0v2'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Hide old elements */
.cos-sale-badge,
.cos-price-badge,
.cos-quick-add-btn,
.cos-product-overlay {
  display: none !important;
}

.cos-product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.cos-product-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--cos-black);
  margin: 0;
  line-height: 1.4;
  min-height: 40px;
}

.cos-product-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--cos-black);
}

/* Sale Prices */
.cos-sale-prices {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cos-sale-prices .original-price {
  text-decoration: line-through;
  font-size: 13px;
  color: var(--cos-gray-dark);
}

.cos-sale-prices .sale-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--cos-red);
}

/* === QUICK ADD === */
.cos-quick-add-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.cos-qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--cos-black) !important;

  overflow: hidden;
}

.cos-qty-btn {
  background: transparent !important;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 16px !important;
  cursor: pointer;
  color: var(--cos-black) !important;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cos-qty-btn:hover {
  background: var(--cos-gray-light) !important;
}

.cos-qty-display {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--cos-black);
}

.cos-add-btn {
  flex: 1;
  background: transparent !important;
  color: var(--cos-black) !important;
  border: 1px solid var(--cos-black) !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cos-add-btn:hover {
  background: var(--cos-black) !important;
  color: var(--cos-white) !important;
}

.cos-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === MODAL === */
.cos-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cos-modal.active {
  display: flex;
}

.cos-modal-content {
  background: var(--cos-white);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--cos-border);
  display: flex;
  flex-direction: column;
}

.cos-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--cos-gray-light) !important;
  color: var(--cos-black) !important;
  border: 1px solid var(--cos-border) !important;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cos-modal-close:hover {
  background: var(--cos-gray) !important;
}

.cos-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.cos-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--cos-black);
  margin: 0 0 16px 0;
  text-align: center;
}

.cos-modal-image {
  width: 100%;
  margin-bottom: 16px;
}

.cos-modal-description {
  background: var(--cos-gray-light);
  padding: 16px;
  line-height: 1.6;
  color: var(--cos-black);
  margin-bottom: 16px;
  font-size: 14px;
}

.cos-modal-pricing {
  background: var(--cos-gray-light);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.cos-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cos-price-row:not(:last-child) {
  margin-bottom: 6px;
}

.cos-price-label {
  font-size: 13px;
  color: var(--cos-gray-dark);
}

.cos-price-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--cos-black);
}

.cos-price-value.original {
  text-decoration: line-through;
  color: var(--cos-gray-dark);
  font-size: 13px;
  font-weight: 400;
}

.cos-modal-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.cos-modal-quantity label {
  font-weight: 500;
  font-size: 14px;
  color: var(--cos-black);
}

.cos-quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--cos-black);
  padding: 6px 12px;
}

.qty-btn {
  background: transparent !important;
  color: var(--cos-black) !important;
  border: none !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 18px !important;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--cos-gray-light) !important;
}

.qty-display {
  font-size: 16px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  color: var(--cos-black);
}

.cos-modal-footer {
  padding: 16px 24px;
  background: var(--cos-white);
  border-top: 1px solid var(--cos-border);
}

.cos-modal-actions {
  display: flex;
  gap: 12px;
}

.cos-btn {
  flex: 1;
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cos-btn-primary {
  background: var(--cos-black) !important;
  color: var(--cos-white) !important;
  border: 1px solid var(--cos-black) !important;
}

.cos-btn-primary:hover {
  background: transparent !important;
  color: var(--cos-black) !important;
}

.cos-btn-secondary {
  background: transparent !important;
  color: var(--cos-black) !important;
  border: 1px solid var(--cos-black) !important;
}

.cos-btn-secondary:hover {
  background: var(--cos-gray-light) !important;
}

/* Modal Bulk Deal */
.cos-price-row.cos-bulk-deal {
  background: rgba(46, 125, 50, 0.08);
  padding: 6px 8px;
  margin-top: 4px;
}

.cos-bulk-deal-text {
  color: #43a047;
  font-weight: 700;
}

.cos-bulk-add-btn {
  width: 100%;
  background: #43a047 !important;
  color: var(--cos-white) !important;
  border: 1px solid #43a047 !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  text-align: center;
}

.cos-bulk-add-btn:last-of-type {
  margin-bottom: 12px;
}

.cos-bulk-add-btn:hover {
  background: #2e7d32 !important;
  border-color: #2e7d32 !important;
}

/* Overlay */
.cos-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.cos-overlay.active {
  display: block;
}

/* Mobile Menu Overlay */
.cos-mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.cos-mobile-menu-overlay.active {
  display: block;
}

/* === NOTIFICATIONS === */
.cos-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 24px 40px;
  background: var(--cos-white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  font-weight: 500;
  font-size: 16px;
  direction: rtl;
  text-align: center;
  min-width: 280px;
  border: 1px solid var(--cos-border);
}

.cos-notification-success {
  border-color: #4caf50;
  color: #43a047;
}

.cos-notification-error {
  border-color: #f44336;
  color: #c62828;
}

.cos-notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
}

/* === RESPONSIVE === */

@media (min-width: 1400px) {
  .cos-products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

@media (max-width: 1199px) {
  .cos-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .cos-sidebar,
  .cos-sidebar-sticky {
    width: 220px;
  }
}

@media (max-width: 991px) {
  .cos-header-top,
  .cos-header-bottom {
    padding: 8px 16px;
  }
  .cos-back-text,
  .cos-account-text {
    display: none;
  }
  .cos-back-to-site,
  .cos-my-account-btn {
    padding: 8px 10px;
  }
  .cos-search-wrapper {
    max-width: 280px;
  }
  .cos-filter-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .cos-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === MOBILE === */
@media (max-width: 767px) {
  /* Header */
  .cos-header-top {
    padding: 8px 12px;
    min-height: 44px;
  }
  .cos-header-center {
    position: static;
    transform: none;
    order: 2;
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .cos-header-right {
    order: 1;
    gap: 8px;
  }
  .cos-header-left {
    order: 3;
  }
  .cos-header-logo img {
    height: 50px !important;
  }
  .cos-header-bottom {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
    min-height: auto;
  }
  .cos-search-wrapper {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .cos-search-input {
    padding: 12px 40px 12px 14px;
  }
  .cos-filters {
    width: 100%;
    justify-content: center;
    flex-basis: 100%;
  }
  .cos-filter-btn {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
  }

  /* Menu Toggle Button - Show on mobile, next to search */
  .cos-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 1px solid var(--cos-black) !important;
    color: var(--cos-black) !important;
    padding: 0 12px;
    height: 44px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .cos-menu-toggle:hover {
    background: var(--cos-black) !important;
    color: var(--cos-white) !important;
  }

  .cos-hamburger-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
  }

  /* Content */
  .cos-content-wrapper {
    flex-direction: column;
    padding: 12px;
  }

  /* Sidebar - Mobile Drawer */
  .cos-sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    z-index: 10000;
    transition: right 0.3s ease;
  }

  .cos-sidebar.open {
    right: 0;
  }

  .cos-sidebar-sticky {
    position: static;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border: none;
    padding: 0;
  }

  /* Sidebar Header - Show on mobile */
  .cos-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--cos-border);
    background: var(--cos-gray-light);
  }

  .cos-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cos-black);
  }

  .cos-sidebar-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--cos-black);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cos-sidebar-close svg {
    width: 20px;
    height: 20px;
  }

  .cos-sidebar-close:hover {
    color: var(--cos-red);
  }

  .cos-category-list {
    display: block;
    overflow-y: auto;
    padding: 12px;
  }

  .cos-category-item {
    margin-bottom: 4px;
  }

  .cos-category-item a {
    padding: 12px 16px;
    font-size: 15px;
  }

  /* Products Grid */
  .cos-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .cos-product-info {
    padding: 10px;
  }
  .cos-product-title {
    font-size: 13px;
    min-height: 36px;
  }
  .cos-quick-add-wrapper {
    flex-direction: column;
    gap: 6px;
  }
  .cos-qty-selector {
    width: 100%;
    justify-content: center;
  }
  .cos-add-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cos-back-to-site,
  .cos-my-account-btn,
  .cos-cart-btn,
  #prop {
    padding: 6px 8px;
  }
  .cos-icon,
  .cos-cart-icon,
  .cos-hamburger-icon {
    width: 16px;
    height: 16px;
  }
  .cos-filter-btn {
    font-size: 12px;
    padding: 8px 10px;
  }
  .cos-header-logo img {
    height: 55px !important;
  }
  .cos-products-grid {
    gap: 10px;
  }
  .cos-product-info {
    padding: 8px;
  }
  .cos-product-title {
    font-size: 12px;
    min-height: 32px;
  }
  .cos-add-btn {
    font-size: 12px !important;
    padding: 8px !important;
  }
  .cos-qty-btn {
    width: 28px !important;
    height: 28px !important;
  }

}

/* === QUANTITY BUTTONS === */
button.cos-qty-btn.cos-qty-plus,
button.cos-qty-btn.cos-qty-minus {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* === DESKTOP/MOBILE TOGGLE === */
.cos-desktop-only {
  display: flex;
}

.cos-mobile-only {
  display: none;
}

/* === MOBILE HEADER - EQUAL HEIGHT BUTTONS === */
@media (max-width: 767px) {
  /* Desktop/Mobile toggle */
  .cos-desktop-only {
    display: none !important;
  }

  .cos-mobile-only {
    display: flex !important;
  }

  /* Mobile button opens modal */
  .cos-mobile-only .cos-add-btn {
    width: 100%;
  }

  /* Header buttons equal height */
  .cos-header-top {
    padding: 8px 12px;
    min-height: 52px;
  }

  .cos-back-to-site,
  .cos-my-account-btn,
  .cos-cart-btn,
  #prop {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .cos-back-arrow {
    font-size: 16px;
    line-height: 1;
  }

  .cos-icon,
  .cos-cart-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
  }

  /* Hide text on mobile */
  .cos-back-text,
  .cos-account-text {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .cos-back-to-site,
  .cos-my-account-btn,
  .cos-cart-btn,
  #prop {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 8px !important;
  }

  .cos-icon,
  .cos-cart-icon {
    width: 16px !important;
    height: 16px !important;
  }

  .cos-back-arrow {
    font-size: 14px;
  }

  .cos-menu-toggle {
    height: 40px;
    padding: 0 10px;
  }
}

/* Mobile View Product Button - Same style as add button */
button.cos-view-product-btn {
  width: 100% !important;
  background: transparent !important;
  color: var(--cos-black) !important;
  border: 1px solid var(--cos-black) !important;
  padding: 6px 9px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cos-view-product-btn:hover {
  background: var(--cos-black) !important;
  color: var(--cos-white) !important;
}

/* === ALL BUTTONS - NO BORDER RADIUS === */
.cos-container button,
.cos-container .cos-btn,
.cos-container .cos-add-btn,
.cos-container .cos-view-product-btn,
.cos-container .cos-filter-btn,
.cos-container .cos-back-to-site,
.cos-container .cos-my-account-btn,
.cos-container .cos-cart-btn,
.cos-container .cos-menu-toggle,
.cos-container .cos-modal-close,
.cos-container .cos-qty-btn,
.cos-container .qty-btn,
.cos-container .cos-sidebar-close,
.cos-container #prop,
.cos-container .cos-bulk-add-btn,
.cos-container input,
.cos-container .cos-search-input,
.cos-container .cos-qty-selector,
.cos-container .cos-quantity-controls,
.cos-container .cart-count,
.cos-modal button,
.cos-modal .cos-btn,
.cos-modal .qty-btn,
.cos-modal input {
  border-radius: 0 !important;
}

/* === BADGES — MOBILE: prevent bulk badge / "מבצע!" collision (v1.7.5) ===
   On narrow cards the green bulk-deal badge (top-left) and the red
   "מבצע!" star (top-right) used to share the same top band and overlap.
   Fix: keep bulk badges top-left, move the sale star to the BOTTOM-right
   on small screens so they sit in opposite corners (zero overlap for any
   text length). Both are compacted slightly and kept as clean rounded
   pills with consistent height/font (bulk-free and bulk-qty stay identical). */
@media (max-width: 767px) {
  .cos-bulk-badges {
    top: 8px;
    left: 8px;
    gap: 5px;
    /* never let a badge reach the right half of the card */
    max-width: calc(100% - 16px);
  }
  .cos-bulk-badge {
    padding: 5px 10px;
    font-size: 11px;
  }
  .cos-bulk-badge .cos-bulk-badge-text {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cos-sale-star {
    top: auto;
    bottom: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .cos-bulk-badges {
    top: 6px;
    left: 6px;
    gap: 4px;
    max-width: calc(100% - 12px);
  }
  .cos-bulk-badge {
    padding: 4px 9px;
    font-size: 10px;
  }
  .cos-sale-star {
    bottom: 6px;
    right: 6px;
    padding: 3px 9px;
    font-size: 9px;
  }
}

/* "הנמכרים ביותר" — מוצג רק דרך פילטר עליון, לא בזרימה הרגילה.
   ה-JS מציג אותו (.show) כשפילטר best-sellers פעיל. מונע הבזק לפני טעינת ה-JS. */
.cos-category-section[data-category="best-sellers"] {
  display: none;
}
