/* ============================================
   MEESHO-STYLE PURE GRID WITH SHARED SEPARATOR
   Products extend edge-to-edge with ONE shared vertical line
   ============================================ */

/* Products Section - Relative for absolute line positioning */
.products-section {
  position: relative;
}

/* Product Grid Container */
.products-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) ;
  padding: 0 !important;
  margin: 0 !important;
  background: #ffffff;
  position: relative;
  width: 100%;
}

/* Mobile: Force full width edge-to-edge */
@media (max-width: 550px) {
  .products-grid {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 !important;
    padding: 0 !important;
  }
  
  /* Force products-section to have no padding on mobile */
  .products-section {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
}

body.dark-mode .products-grid {
  background: #1a1a1a;
}

/* SHARED VERTICAL SEPARATOR LINE (mobile only) */
.products-grid::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #e0e0e0;
  transform: translateX(-0.5px);
  pointer-events: none;
  z-index: 1;
}

body.dark-mode .products-grid::after {
  background: #333;
}

/* Tablet/Desktop: Normal grid, remove separator */
@media (min-width: 551px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px;
    width: 100% !important;
    margin-left: 0 !important;
  }
  
  .products-grid::after {
    display: none;
  }
}


@media (min-width: 768px) and (max-width: 1024px){
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
    width: 100% !important;
    margin-left: 0 !important;
  }
  
  .products-grid::after {
    display: none;
  }
}
@media (min-width: 1000px) and (max-width: 1400px){
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px;
    width: 100% !important;
    margin-left: 0 !important;
  }
  
  .products-grid::after {
    display: none;
  }
}

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

/* Product Item - Normal for desktop, invisible on mobile */
.products-grid .product-card,
div.product-card {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  outline: none;
  overflow: visible;
  transition: all 0.2s ease;
}
@media (min-width: 551px) {
  .products-grid .product-card,
  div.product-card {
    padding: 12px !important;
    margin: 0 !important;
  }
}
.products-grid .product-card:hover,
div.product-card:hover {
  border-color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.dark-mode .products-grid .product-card,
body.dark-mode div.product-card {
  background: #2a2a2a;
  border-color: #3a3a3a;
}

body.dark-mode .products-grid .product-card:hover,
body.dark-mode div.product-card:hover {
  border-color: #4a4a4a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Mobile: Completely invisible container */
@media (max-width: 550px) {
  .products-grid .product-card,
  div.product-card {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  
  body.dark-mode .products-grid .product-card,
  body.dark-mode div.product-card {
    background: transparent !important;
  }
}

body.dark-mode .product-card {
  background: transparent;
}
.product-card:hover  {
  transform: scale(1.01);
  opacity: 0.95;
}
/* Add horizontal separator line using ::before pseudo-element */
.product-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
  z-index: 1;
}

body.dark-mode .product-card::before {
  background: #333;
}

/* Hide separator lines on desktop, show on mobile */
@media (min-width: 551px) {
  .product-card::before {
    display: none;
  }
}

/* Hide the bottom border lines on last row (mobile) */
@media (max-width: 550px) {
  .product-card:nth-last-child(-n+2)::before {
    display: none;
  }
}

/* Image Container - ABSOLUTE EDGE TO EDGE */
.product-card-image {
  position: relative;
  width: 100%;
  padding-top: 133.33%;
  overflow: hidden;
  background: #fafafa;
  cursor: pointer;
  margin: 0;
}
/* Mobile: Force 100% width, zero everything */
@media (max-width: 550px) {
  .product-card-image {
    width: 100% !important;
    margin: 0 !important;
    padding-top: 133.33% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }
}

body.dark-mode .product-card-image {
  background: #1f1f1f;
}

.product-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}



/* Discount Badge */
.product-card .discount-badge{
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ff3b3b;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
  line-height: 1.2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

body.dark-mode .product-card .discount-badge {
  background: #ff4757;
}

/* Wishlist Button */
.wishlist-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wishlist-btn:hover {
  background: #ffffff;
  transform: scale(1.05);
}

body.dark-mode .wishlist-btn {
  background: rgba(42, 42, 42, 0.95);
}

.wishlist-btn svg {
  width: 16px;
  height: 16px;
}

.wishlist-btn.saved svg {
  fill: #ff3b3b;
  stroke: #ff3b3b;
}

.wishlist-btn:not(.saved) svg {
  fill: none;
  stroke: #666;
}

body.dark-mode .wishlist-btn:not(.saved) svg {
  stroke: #999;
}

/* Product Info - Normal padding for desktop, minimal for mobile */
.product-card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 12px;
}

/* Mobile: ABSOLUTELY ZERO PADDING */
@media (max-width: 550px) {
  .product-card-info {
    padding: 8px !important;
    gap: 5px !important;
  }
}
 @media (min-width: 551px) {
  .products-grid .product-card,
  div.product-card {
    padding: 12px;
  }
}
/* Product Name */
.product-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 0;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  min-height: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 551px) {
  .product-card-name {
    font-size: 13px;
    min-height: auto;
  }
}

.product-card-name:hover {
  color: #667eea;
}

body.dark-mode .product-card-name {
  color: #e0e0e0;
}

/* Badge Row */
.badge-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;

}

.info-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

@media (min-width: 551px) {
  .info-badge {
    padding: 3px 8px;
    font-size: 11px;
  }
}

/* VIBRANT GRADIENTS */
.info-badge.size-badge {
 background: linear-gradient(to right, #C9A961, #B8860B);
color: #1a1a1a;

  font-weight: 800;
}

.info-badge.flavor-badge {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #ffffff;
}

body.dark-mode .info-badge.size-badge {
 background: linear-gradient(to right, #C9A961, #B8860B);
color: #1a1a1a;
}

body.dark-mode .info-badge.flavor-badge {
  background: linear-gradient(135deg, #ff9dff 0%, #ff6b88 100%);
}

.info-badge.rating-badge {
  background: transparent;
  color: #FFA500;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
}

@media (min-width: 551px) {
  .info-badge.rating-badge {
    font-size: 15px;
  }
}

body.dark-mode .info-badge.rating-badge {
  background: transparent;
  color: #FFB52E;
}
/* Price Section */
.product-price-section {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  line-height: 1;
  margin-top: 2px;
}

.price-new {
  font-size: 17px;
  font-weight: 900;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}
@media (min-width: 551px) {
  .price-new {
    font-size: 20px;
  }
  .price-old {
  font-size: 16px;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
}

.price-discount {
  font-size: 14px;
  font-weight: 700;
  color: #22c55e;
}
}

body.dark-mode .price-new {
  color: #e0e0e0;
}

.price-old {
  font-size: 14px;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
}

.price-discount {
  font-size: 12px;
  font-weight: 700;
  color: #22c55e;
}

body.dark-mode .price-discount {
  color: #4ade80;
}

/* Size Button */
.size-select-btn {
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(to right, #141E30, #243B55);
  color: #ffffff;
  font-weight: 900;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-top: 4px;
  min-height: 44px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
}
@media (max-width: 550px) {
  .size-select-btn {
    padding: 6px 10px !important;
    margin: 2px 0 !important;
    font-size: 14px;
    min-height: 38px;
  }
}
.size-select-btn:hover {
  background: linear-gradient(to right, #101A28, #1E3348);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(67, 233, 123, 0.4);
}

.size-select-btn:active {
  transform: translateY(0);
  filter: saturate(0.96);
}

.size-select-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4), 0 10px 28px rgba(0, 0, 0, 0.12);
}

.size-select-btn .arrow-down {
  font-size: 9px;
}

/* Add to Cart */
.add-to-cart-btn {
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(to right, #F8D800, #FFB300);
  color: #1a1a1a;
  border: none;
  font-weight: 900;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-top: 6px;
  min-height: 44px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  letter-spacing: 0.3px;
}
@media (max-width: 550px) {
  .add-to-cart-btn {
  padding: 6px 10px !important;
    margin: 2px 0 !important;
    font-size: 14px;
    min-height: 40px;
  }
}


.add-to-cart-btn:hover {
  background: linear-gradient(to right, #E9C900, #F0A000);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn:active {
  transform: translateY(0);
  filter: saturate(0.96);
}

.add-to-cart-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4), 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* ============================
   PREMIUM QUANTITY CONTROLS
   ============================ */

/* Wrapper – pill, subtle shadow, matches card buttons */
.quantity-controls {
  display: none; /* JS adds .active */
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 6px 16px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(148, 163, 184, 0.12);
  margin-top: 8px;
  box-sizing: border-box;
}

.quantity-controls.active {
  display: flex;
}

@media (max-width: 550px) {
  .quantity-controls {
    padding: 4px 8px;
    margin-top: 4px;
    gap: 8px;
  }
}

/* Dark mode wrapper */
body.dark-mode .quantity-controls {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(75, 85, 99, 0.9);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* Plus / Minus buttons */
.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #f97316, #ea580c);
  color: #ffffff;
  box-shadow:
    0 8px 18px rgba(234, 88, 12, 0.36),
    0 0 0 1px rgba(248, 250, 252, 0.8);
  transform: translateY(0);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease,
    background 0.2s ease;
}

@media (min-width: 551px) {
  .qty-btn {
    width: 32px;
    height: 32px;
  }
}

.qty-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgba(234, 88, 12, 0.45),
    0 0 0 1px rgba(248, 250, 252, 0.9);
}

.qty-btn:active {
  transform: translateY(0);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(248, 250, 252, 0.8);
}

/* Dark mode buttons – keep pop, not too neon */
body.dark-mode .qty-btn {
  background: linear-gradient(to right, #f97316, #ea580c);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.95);
}

/* Quantity number */
.qty-count {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #0f172a;
  min-width: 26px;
  text-align: center;
}

@media (min-width: 551px) {
  .qty-count {
    font-size: 16px;
    min-width: 30px;
  }
}

body.dark-mode .qty-count {
  color: #e5e7eb;
}


/* No Results Message */
#noResults,
#noResultsMessage {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: #666;
  grid-column: 1 / -1;
}

body.dark-mode #noResults,
body.dark-mode #noResultsMessage {
  color: #999;
}

/* Size/Flavor Selection Modal */
.size-flavor-modal {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  z-index: 10000;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
}

.size-flavor-modal.active {
  display: flex;
  flex-direction: column;
}

body.dark-mode .size-flavor-modal {
  background: #2a2a2a;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

.modal-overlay#sizeFlavorOverlay.active {
  display: block;
}

body.dark-mode .modal-overlay#sizeFlavorOverlay {
  background: rgba(0, 0, 0, 0.7);
}

/* Modal Header */
.modal-header-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

body.dark-mode .modal-header-product {
  border-bottom-color: #3a3a3a;
}

.modal-title-product {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

body.dark-mode .modal-title-product {
  color: #e0e0e0;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.modal-close-btn:hover {
  background: #f5f5f5;
}

body.dark-mode .modal-close-btn:hover {
  background: #3a3a3a;
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: #666;
}

body.dark-mode .modal-close-btn svg {
  stroke: #999;
}

/* Modal Body */
.modal-body-product {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Size Section */
.size-section {
  margin-bottom: 24px;
}

.section-label {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

body.dark-mode .section-label {
  color: #e0e0e0;
}

.size-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.size-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fafafa;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.size-option:hover {
  background: #f5f5f5;
  border-color: #667eea;
}

.size-option.selected {
  background: #f0f4ff;
  border-color: #667eea;
}

body.dark-mode .size-option {
  background: #1f1f1f;
  border-color: #3a3a3a;
}

body.dark-mode .size-option:hover {
  background: #2a2a2a;
  border-color: #667eea;
}

body.dark-mode .size-option.selected {
  background: #2a2f4a;
  border-color: #667eea;
}

.size-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.size-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #d0d0d0;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
}

.size-option.selected .size-radio {
  border-color: #667eea;
}

.size-option.selected .size-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #667eea;
  border-radius: 50%;
}

body.dark-mode .size-radio {
  border-color: #4a4a4a;
}

body.dark-mode .size-option.selected .size-radio {
  border-color: #7c8fff;
}

body.dark-mode .size-option.selected .size-radio::after {
  background: #7c8fff;
}

.size-label {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

body.dark-mode .size-label {
  color: #e0e0e0;
}

.size-option-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.size-price {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

body.dark-mode .size-price {
  color: #e0e0e0;
}

.size-price-old {
  font-size: 13px;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
}

/* Flavor Section */
.flavor-section {
  margin-bottom: 24px;
}

.flavor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flavor-option {
  flex: 1;
  min-width: calc(50% - 5px);
  max-width: calc(50% - 5px);
  padding: 12px;
  background: #fafafa;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flavor-option:hover {
  background: #f5f5f5;
  border-color: #667eea;
}

.flavor-option.selected {
  background: #f0f4ff;
  border-color: #667eea;
}

body.dark-mode .flavor-option {
  background: #1f1f1f;
  border-color: #3a3a3a;
}

body.dark-mode .flavor-option:hover {
  background: #2a2a2a;
  border-color: #667eea;
}

body.dark-mode .flavor-option.selected {
  background: #2a2f4a;
  border-color: #667eea;
}

.flavor-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #d0d0d0;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.flavor-option.selected .flavor-radio {
  border-color: #667eea;
}

.flavor-option.selected .flavor-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
}

body.dark-mode .flavor-radio {
  border-color: #4a4a4a;
}

body.dark-mode .flavor-option.selected .flavor-radio {
  border-color: #7c8fff;
}

body.dark-mode .flavor-option.selected .flavor-radio::after {
  background: #7c8fff;
}

.flavor-label {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

body.dark-mode .flavor-label {
  color: #e0e0e0;
}

/* Modal Footer */
.modal-footer-product {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

body.dark-mode .modal-footer-product {
  border-top-color: #3a3a3a;
}

.modal-cancel-btn,
.modal-apply-btn {
  flex: 1;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.modal-cancel-btn {
  background: transparent;
  border: 1.5px solid #e0e0e0;
  color: #666;
}

.modal-cancel-btn:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

body.dark-mode .modal-cancel-btn {
  border-color: #3a3a3a;
  color: #999;
}

body.dark-mode .modal-cancel-btn:hover {
  background: #2a2a2a;
  border-color: #4a4a4a;
}

.modal-apply-btn {
  background: #667eea;
  color: #ffffff;
}

.modal-apply-btn:hover {
  background: #5568d3;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

body.dark-mode .modal-apply-btn {
  background: #7c8fff;
}

body.dark-mode .modal-apply-btn:hover {
  background: #667eea;
  box-shadow: 0 4px 12px rgba(124, 143, 255, 0.3);
}

/* Out of Stock Button */
.out-of-stock-btn {
  width: 100%;
  padding: 12px 14px;
  background: #9CA3AF;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: not-allowed;
  min-height: 44px;
  opacity: 0.7;
  margin-top: 6px;
}

@media (max-width: 550px) {
  .out-of-stock-btn {
    padding: 8px 12px !important;
    font-size: 13px;
    min-height: 38px;
  }
}

/* ============================================
   STAR RATING FIX - CRITICAL
   ============================================ */
.rating-stars {
    display: inline-flex !important;
    gap: 4px !important;
    align-items: center !important;
}

.star-icon {
    width: 18px !important;
    height: 18px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.star-icon.full {
    fill: #FFA500 !important; /* Orange */
}

.star-icon.half {
    fill: url(#half-gradient) !important;
}

.star-icon.empty {
    fill: none !important;
    stroke: #FFA500 !important;
    stroke-width: 1.5 !important;
}

/* Fix the badge container */
.info-badge.rating-badge {
    background: transparent !important;
    color: #FFA500 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

body.dark-mode .info-badge.rating-badge {
    color: #FFB52E !important;
}

body.dark-mode .star-icon.full {
    fill: #FFB52E !important;
}

body.dark-mode .star-icon.empty {
    stroke: #FFB52E !important;
}
/* Force proper SVG rendering */
.star-icon {
    overflow: visible !important;
}

/* Fix half star gradient on mobile */
.star-icon.half path {
    fill: #FFA500 !important;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%) !important;
}

/* Badge container - prevent overflow */
.info-badge.rating-badge {
    overflow: visible !important;
    flex-wrap: nowrap !important;
}

.badge-row {
    overflow: visible !important;
}

/* Mobile sizing */
@media (max-width: 550px) {
    .star-icon {
        width: 16px !important;
        height: 16px !important;
    }
}
.cart-item-message {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 4px;
  padding: 6px 8px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
  word-wrap: break-word;           /* ✅ Break long words */
  overflow-wrap: break-word;       /* ✅ Modern browsers */
  white-space: normal;             /* ✅ Allow multiple lines */
  max-width: 100%;                 /* ✅ Stay within parent */
  line-height: 1.4;                /* ✅ Better readability */
}
body.dark-mode .cart-item-message {
  color: #d1d5db;
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  border-left-color: #f59e0b;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
  line-height: 1.4;
}
@media (max-width: 320px) {
  .products-grid {
    gap: 0 !important;
    padding: 0 !important;
  }
  
  /* Force equal column widths */
  .product-card {
    width: 50vw !important;
    max-width: 50vw !important;
  }
  
  .product-card-image {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .product-card-info {
    padding: 5px 6px 6px 6px !important;
    gap: 3px !important;
  }
  
  .product-card-name {
    font-size: 14px !important;
    padding: 5px 6px !important;
  }
  
  .price-new {
    font-size: 14px !important;
  }
  
  .price-old {
    font-size: 11px !important;
  }
  
  .info-badge {
    padding: 2px 4px !important;
    font-size: 8px !important;
  }
  
  .size-select-btn,
  .add-to-cart-btn {
    padding: 6px 6px !important;
    font-size: 11px !important;
    min-height: 32px !important;
  }
  
  .product-card .discount-badge {
    padding: 2px 5px !important;
    font-size: 8px !important;
  }
}
@media (max-width: 290px) {
  .products-grid {
    gap: 0 !important;
    padding: 0 !important;
  }
  
  /* Force equal column widths */
  .product-card {
    width: 50vw !important;
    max-width: 50vw !important;
  }
  
  .product-card-image {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .product-card-info {
    padding: 3px 4px 4px 4px !important;
    gap: 1px !important;
  }
  
  .product-card-name {
    font-size: 12px !important;
    padding: 5px 6px !important;
  }
  
  .price-new {
    font-size: 12px !important;
  }
  
  .price-old {
    font-size: 9px !important;
  }
  
  .info-badge {
    padding: 2px 4px !important;
    font-size: 5px !important;
  }
  
  .size-select-btn,
  .add-to-cart-btn {
    padding: 6px 6px !important;
    font-size: 11px !important;
    min-height: 32px !important;
  }
  
  .product-card .discount-badge {
    padding: 2px 5px !important;
    font-size: 8px !important;
  }
    .rating-stars {
    display: inline-flex !important;
    gap: 2px !important;
    align-items: center !important;
}

.star-icon {
    width: 13px !important;
    height: 13px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}
.info-badge.rating-badge {
    background: transparent !important;
    color: #FFA500 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
}
}
