/**
 * RedBangla Custom WooCommerce & Product Card Styling
 */

.rb-shop-container {
  padding: 30px 20px;
}

/* ==========================================================================
   Product Grid & Product Cards (Etsy + Daraz blend)
   ========================================================================== */
.rb-product-grid {
  display: grid;
  gap: 16px;
}

.rb-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.rb-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.rb-product-card {
  background: var(--rb-card-bg);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.rb-product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rb-shadow-md);
  border-color: #CBD5E1;
}

.rb-card-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect ratio */
  background-color: #F8FAFC;
  overflow: hidden;
}

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

.rb-product-card:hover .rb-card-thumb {
  transform: scale(1.04);
}

.rb-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.rb-wishlist-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.15s, background 0.15s;
  color: #94A3B8;
  font-size: 16px;
}

.rb-wishlist-toggle:hover {
  transform: scale(1.1);
  background: #FFFFFF;
  color: #EF4444;
}

.rb-wishlist-toggle.is-active {
  color: #EF4444;
}

.rb-card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.rb-card-vendor {
  font-size: 11px;
  color: var(--rb-text-muted);
  margin-bottom: 4px;
  display: inline-block;
}

.rb-card-vendor:hover {
  color: var(--rb-secondary);
}

.rb-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rb-text);
  margin: 0 0 6px 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.rb-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #F59E0B;
  margin-bottom: 8px;
}

.rb-rating-count {
  color: var(--rb-text-muted);
  font-size: 11px;
}

.rb-card-price-wrap {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.rb-current-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--rb-primary);
  text-decoration: none;
}

.rb-old-price {
  font-size: 12px;
  color: var(--rb-text-light);
  margin-right: 4px;
}

.rb-currency-sub {
  font-size: 11px;
  color: var(--rb-text-muted);
  font-weight: normal;
}

.rb-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.rb-btn-card-cart {
  flex-grow: 1;
  background: var(--rb-primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--rb-radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.rb-btn-card-cart:hover {
  background: var(--rb-primary-dark);
}

/* ==========================================================================
   Single Product Layout
   ========================================================================== */
.rb-single-product-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: #FFFFFF;
  padding: 30px;
  border-radius: var(--rb-radius-lg);
  border: 1px solid var(--rb-border);
  box-shadow: var(--rb-shadow-sm);
}

.rb-single-gallery-main {
  border-radius: var(--rb-radius-md);
  overflow: hidden;
  border: 1px solid var(--rb-border);
}

.rb-single-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--rb-primary);
  margin: 0 0 12px 0;
}

.rb-single-price-box {
  background: #F8FAFC;
  padding: 16px;
  border-radius: var(--rb-radius-md);
  margin: 16px 0;
  border: 1px solid var(--rb-border);
}

.rb-single-price-box .rb-current-price {
  font-size: 28px;
}

.rb-btn-buy-now {
  background-color: var(--rb-secondary) !important;
  color: #FFFFFF !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 12px 24px !important;
  border-radius: var(--rb-radius-md) !important;
  width: 100%;
  margin-top: 10px;
  display: block;
  text-align: center;
}

.rb-btn-buy-now:hover {
  background-color: var(--rb-secondary-hover) !important;
}

/* Digital & Physical Specs Cards */
.rb-digital-specs-card,
.rb-physical-specs-card {
  background: #F8FAFC;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-md);
  padding: 16px;
  margin: 20px 0;
}

.rb-specs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rb-border);
}

.rb-instant-badge,
.rb-stock-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--rb-secondary);
}

.rb-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
}

.rb-spec-label {
  color: var(--rb-text-muted);
}

.rb-spec-val {
  font-weight: 600;
  color: var(--rb-text);
}

.rb-included-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--rb-border);
  font-size: 13px;
}

/* ==========================================================================
   Checkout & Cart Layouts
   ========================================================================== */
.rb-checkout-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 30px;
}

.rb-checkout-card {
  background: #FFFFFF;
  padding: 25px;
  border-radius: var(--rb-radius-md);
  border: 1px solid var(--rb-border);
  box-shadow: var(--rb-shadow-sm);
}

.rb-checkout-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--rb-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--rb-secondary-light);
}
