/* === PRODUCT PAGE LAYOUT === */

.container {
  max-width: 1400px;
  margin: auto;
  padding: 20px;
}

main.container {
  display: flex;
  gap: 24px;
}

/* === FILTER SIDEBAR === */

.filters {
  width: 280px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
  position: sticky;
  top: 90px;
  height: fit-content;
}


.filters h3 {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
}


.filters label {
  font-size: 14px;
}

.filters div {
  margin-bottom: 14px;
}

.filters button {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
}


#apply-filters {
  background: black;
  color: white;
}

#clear-filters {
  background: #eee;
}

.filters input[type="range"] {
  width: 100%;
  accent-color: black;
}

.filters select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* -----------------------
   Updated Product Toolbar
   ----------------------- */
.product-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allows stacking on mobile */
  gap: 15px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.product-toolbar h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

/* Container for Stock + Sort */
.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Stock Filter Pill Style */
.stock-filter-group {
  display: flex;
  gap: 4px;
  background: #f4f4f4;
  padding: 4px;
  border-radius: 30px;
  border: 1px solid #eee;
}

.stock-filter-group label {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
}

/* Hide the actual radio circle but keep functionality */
.stock-filter-group input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

.stock-filter-group label:has(input:checked) {
  background: #fff;
  color: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Sort Dropdown Style */
.sort-wrapper select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.sort-wrapper select:focus {
  border-color: #111;
}

/* Mobile Tweak */
@media (max-width: 600px) {
  .product-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .toolbar-controls {
    width: 100%;
    justify-content: space-between;
  }
}

/* === PRODUCT GRID === */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* ✅ Fixed 4 per row on desktop */
  gap: 28px;
  margin-top: 24px;
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, 1fr); /* Tablet landscape */
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* Mobile = 2 per row */
  }
}
/* === PRODUCT CARD === */

.card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  transition: 0.3s ease;
  padding-bottom: 14px;
  position: relative;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 26px 60px rgba(0,0,0,0.16);
}


.card img {
  width: 100%;
  height: 280px;   /* ✅ Bigger for premium look */
  object-fit: cover;
  transition: 0.3s ease;
}

.card h4 {
  font-size: 16px;
  margin: 12px 14px 4px;
  font-weight: 600;
}

.card small {
  color: #777;
  margin: 0 14px;
  display: block;
  font-size: 13px;
}

.card p {
  margin: 8px 14px;
  font-size: 17px;
  font-weight: 700;
}


/* === CARD BUTTONS === */

.card .flex {
  display: flex;
  gap: 12px;
  padding: 0 14px;
  margin-top: 8px;
}


.card button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}


.add-cart {
  background: linear-gradient(135deg,#000,#333);
  color: white;
}


.card button:last-child {
  background: #eee;
}

/* === MOBILE RESPONSIVE === */

@media(max-width: 991px){
  main.container {
    flex-direction: column;
  }

  .filters {
    width: 100%;
    position: relative;
    top: 0;
  }
}


/* PRODUCT DETAIL LAYOUT */
.product-detail-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 34px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.product-gallery {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}

.product-gallery img {
  width: 100%;
  height: 520px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8f8f8;
}

.product-info {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}

.product-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 14px;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  margin: 14px 0;
}

.product-actions {
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:18px;
}

/* BULB ADD-ON BOX */
.bulb-addon {
  display:flex;
  gap:12px;
  align-items:center;
  border: 1px solid #eee;
  padding: 12px;
  border-radius: 10px;
  margin-top: 14px;
  background: linear-gradient(180deg, #fff, #fbfbfb);
}

.bulb-addon img {
  width:56px;
  height:56px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid #f0f0f0;
}

.bulb-details {
  flex:1;
}

.bulb-details .type { font-weight:600; font-size:14px; }
.bulb-details .spec { font-size:13px; color:#666; margin-top:4px;}

.bulb-price { font-weight:700; font-size:15px; color:#111; margin-left:10px; }

/* quantity small control */
.qty-control {
  display:inline-flex;
  align-items:center;
  border-radius:8px;
  border:1px solid #ddd;
  overflow:hidden;
  margin-left:10px;
}
.qty-control button { background:none; border:none; padding:6px 10px; cursor:pointer; font-weight:600; }
.qty-control input { width:36px; text-align:center; border:0; padding:6px 4px; font-weight:600; }

/* CART DRAWER */
.cart-drawer {
  position: fixed;
  right: -420px;
  top: 0;
  height: 100vh;
  width: 380px;
  background: #fff;
  box-shadow: -20px 0 60px rgba(0,0,0,0.18);
  z-index: 30000;
  transition: right 0.35s ease;
  display:flex;
  flex-direction:column;
}

.cart-drawer.open { right: 0; }

.cart-header {
  padding: 18px;
  border-bottom: 1px solid #eee;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:700;
}

.cart-items { padding: 12px; overflow:auto; flex:1; }

.cart-item {
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px 6px;
  border-bottom: 1px solid #f4f4f4;
}

.cart-item img { width:64px; height:48px; object-fit:cover; border-radius:8px; }

.cart-item .ci-info { flex:1; font-size:13px; }

.cart-item .ci-price { font-weight:700; }

.cart-footer {
  padding: 14px;
  border-top:1px solid #eee;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.cart-empty { color:#777; text-align:center; padding:36px 0; }

/* responsive */
@media(max-width: 980px) {
  .product-detail-grid { grid-template-columns: 1fr; }
  .product-gallery img { height: 420px; }
  .cart-drawer { width: 100%; max-width: 420px; }
}


/* ===== Bulb Grid ===== */
#bulb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* ===== Bulb Card ===== */
.bulb-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: box-shadow .2s ease, transform .2s ease;
}

.bulb-card:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

/* ===== Image Wrapper ===== */
.bulb-img-wrap {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.bulb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ===== Text ===== */
.bulb-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.bulb-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.bulb-price {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ===== Button ===== */
.bulb-card button {
  margin-top: auto;
  background: #111;
  color: #fff;
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.bulb-card button:hover {
  background: #000;
}
