.sb-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px }
.sb-card { border:1px solid #eee; border-radius:8px; overflow:hidden; display:flex; flex-direction:column }
.sb-thumb img { width:100%; height:auto; display:block }
.sb-info { padding:12px }
.sb-title { margin:0 0 6px; font-size:16px }
.sb-rating { margin:6px 0 }
.sb-price { font-weight:600; margin:6px 0 12px }
.sb-btn { display:inline-block; padding:8px 12px; background:#111; color:#fff; text-decoration:none; border:0; border-radius:6px; cursor:pointer; transition: all 0.3s; }
.sb-product { display:grid; grid-template-columns:1fr 1fr; gap:24px }
@media (max-width:800px){ .sb-product { grid-template-columns:1fr } }

.sb-cart-empty { padding:12px; color:#666; }
.sb-cart-list { list-style:none; padding:0; margin:0 0 10px; }
.sb-cart-line { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #eee; }
.sb-cart-thumb { width:44px; height:44px; object-fit:cover; border-radius:4px; }
.sb-cart-title { flex:1; }
.sb-cart-qty { margin-left:auto; margin-right:8px; font-weight:600; }
.sb-cart-price { min-width:110px; text-align:right; }
.sb-btn + .sb-btn { margin-left:8px; }
.sb-buy { display:flex; align-items:center; gap:10px; }
.sb-qty { width:80px; }

.sb-gallery-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.sb-gallery-main {
  width: 100%;
  height: 400px;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.sb-gallery-main .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f8f8;
}

.sb-gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sb-gallery-thumbs {
  width: 100%;
  height: 80px;
  margin: 10px 0 0 0;
  padding: 0;
}

.sb-gallery-thumbs .swiper-slide {
  width: 80px !important;
  height: 80px;
  opacity: 0.6;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.sb-gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1 !important;
  border-color: #111 !important;
  transform: scale(1.05);
}

.sb-gallery-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sb-gallery-main .swiper-button-next,
.sb-gallery-main .swiper-button-prev {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
}
.sb-gallery-main .swiper-button-next:after,
.sb-gallery-main .swiper-button-prev:after {
  font-size: 16px;
  font-weight: bold;
}
.sb-gallery-main .swiper-button-next:hover,
.sb-gallery-main .swiper-button-prev:hover {
  background: rgba(0, 0, 0, 0.8);
}
/* Responsive */
@media (max-width: 768px) {
  .sb-gallery-main {
    height: 300px;
  }
  .sb-gallery-thumbs {
    height: 60px;
  }
  .sb-gallery-thumbs .swiper-slide {
    width: 60px;
    height: 60px;
  }
  .sb-gallery-main .swiper-button-next,
  .sb-gallery-main .swiper-button-prev {
    width: 35px;
    height: 35px;
    margin-top: -17.5px;
  }
}
@media (max-width: 480px) {
  .sb-gallery-main {
    height: 250px;
  }
  
  .sb-gallery-main .swiper-button-next,
  .sb-gallery-main .swiper-button-prev {
    display: none;
  }
}
/* Cart container */
.sb-cart {
  max-width: max-content;
  margin: 0 auto;
  padding: 20px;
}

/* Cart items container */
.sb-cart-items {
  margin-bottom: 30px;
}

/* Individual cart item */
.sb-cart-item {
  display: grid;
  grid-template-columns: 201px 1fr 150px 120px 50px;
  gap: 20px;
  padding: 20px 0;
  align-items: center;
}

@media (max-width: 768px) {
  .sb-cart-item {
    grid-template-columns: 80px 1fr;
    gap: 15px;
  }
  
  .sb-cart-item-quantity,
  .sb-cart-item-total,
  .sb-cart-item-remove {
    grid-column: 2;
  }
}
/* Add to cart with quantity dropdown styles */
.sb-buy-advanced {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  margin: 20px 0;
}

.sb-qty-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sb-qty-wrapper label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.sb-qty-dropdown {
  width: 80px;
  height: 40px;
  padding: 0 10px;
  padding-right: 30px;
  border: none;  
  background: #f5f5f5;  
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}

.sb-qty-dropdown:hover {
  background-color: #e8e8e8;
}

.sb-qty-dropdown:focus {
  outline: none;
  background-color: #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sb-qty-label {
    display: none; 
  }
}

/* Responsive */
@media (max-width: 480px) {
  .sb-buy-advanced {
    flex-direction: column;
    align-items: stretch;
  }
  
  .sb-qty-dropdown {
    width: 100%;
  }
}
/* Item image */
.sb-cart-item-image img {
  width: 100%;
  height: auto;
}

/* Item details */
.sb-cart-item-details {
  flex: 1;
}

.sb-cart-item-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.sb-cart-item-title a {
  color: #333;
  text-decoration: none;
}

.sb-cart-item-title a:hover {
  color: #000;
  text-decoration: underline;
}

.sb-cart-item-price {
  color: #666;
  font-size: 14px;
}

/* Quantity controls */
.sb-cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sb-qty-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sb-qty-select:hover {
  background-color: #FFFBED;
}

.sb-qty-select:focus {
  outline: none;
  background-color: #FFFBED;
}

.sb-qty-decrease,
.sb-qty-increase {
  width: 30px;
  height: 30px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s;
}

.sb-qty-decrease:hover,
.sb-qty-increase:hover {
  background: #f5f5f5;
  border-color: #999;
}

.sb-qty-input {
  width: 50px;
  height: 30px;
  text-align: center;
  font-size: 14px;
}

/* Remove button */
.sb-remove-item {
  width: 22px;
  height: 22px;
  border: none;
  background: #d9d9d9;
  color: #4a3801 !important;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s;
}

.sb-remove-item:hover {
  background: #fcb900;
  color: #fff;
}

/* Item total */
.sb-cart-item-total {
  font-weight: 600;
  text-align: right;
}

/* Cart summary */
.sb-cart-summary {
  border-top: 1.5px solid #F5B400;
  padding-top: 20px;
  margin-bottom: 30px;
}

.sb-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin-bottom: 20px;
}

.sb-cart-subtotal strong {
  font-size: 24px;
  color: #333;
}

/* Cart actions */
.sb-cart-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .sb-cart-actions {
    flex-direction: column;
  }
}

/* Advanced buttons */
.sb-btn-primary,
.sb-checkout {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #333;
  color: #fff;
  text-decoration: none;
}

.sb-btn-primary:hover,
.sb-checkout:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sb-clear {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f5f5f5;
  color: #666;
  text-decoration: none;
}

.sb-clear:hover {
  background: #e0e0e0;
  border-color: #999;
}

/* Hide the fallback actions when cart is rendered */
.sb-cart[data-render="1"] + .sb-cart-fallback-actions {
  display: none;
}

/* Loading state */
.sb-cart-loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .sb-cart {
    padding: 10px;
  }
  
  .sb-cart-item {
    grid-template-columns: 60px 1fr;
    gap: 10px;
    padding: 15px 0;
  }
  
  .sb-cart-item-quantity {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
  }
  
  .sb-cart-item-total {
    margin-top: 5px;
    text-align: left;
  }
  
  .sb-cart-item-remove {
    position: absolute;
    right: 0;
    top: 15px;
  }
  
  .sb-btn,
  .sb-btn-primary,
  .sb-checkout,
  .sb-clear {
    width: 100%;
    padding: 15px;
  }
}