/* ============================================
   BENTO GRID LAYOUT — AllTech 2026
   Modern Asymmetrical Grid System
   ============================================ */

.catalog-section {
  max-width: var(--container-xl);
  margin: var(--space-20) auto var(--space-32);
  padding-inline: var(--space-6);
}

.catalog-header {
  text-align: center;
  margin-bottom: var(--space-16);
  max-width: 600px;
  margin-inline: auto;
}

.catalog-header h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-weight-black);
  color: var(--brand-dark);
  margin-bottom: var(--space-4);
  line-height: 1;
  letter-spacing: -0.04em;
}

.catalog-header p {
  font-size: var(--font-size-lg);
  color: var(--color-secondary);
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--space-6);
}

/* Bento Item Base */
.bento-item {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(51,59,62,0.06);
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
}

.bento-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255,140,0,0.2);
}

.bento-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Image Wrapper */
.bento-image {
  position: relative;
  width: 100%;
  flex-grow: 1;
  overflow: hidden;
  background: var(--color-neutral-50);
  min-height: 140px;
}

.bento-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.bento-item:hover .bento-image img {
  transform: scale(1.08);
}

/* Content Area */
.bento-content {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--color-surface);
  z-index: 2;
}

.bento-content h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--brand-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.bento-content p {
  font-size: var(--font-size-sm);
  color: var(--color-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  color: var(--brand-dark);
}

/* ===== GRID SIZING ===== */

/* Large Item (takes 2x2 on desktop) */
.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-large .bento-content h3 {
  font-size: var(--font-size-3xl);
}

.bento-large .bento-image {
  min-height: 220px;
}

/* Square Item (takes 1x1 on desktop) */
.bento-square {
  grid-column: span 1;
  grid-row: span 1;
}

.bento-square .bento-content h3 {
  font-size: var(--font-size-xl);
}

/* Wide Item (takes 2x1 on desktop) */
.bento-wide {
  grid-column: span 2;
  grid-row: span 1;
  justify-content: center;
  padding: var(--space-8);
}

/* Full Item (takes 4x1 on desktop) */
.bento-full {
  grid-column: span 4;
  grid-row: span 1;
  justify-content: center;
  padding: var(--space-8);
}

/* Info Item (takes 1x1) */
.bento-info {
  grid-column: span 1;
  grid-row: span 1;
  padding: var(--space-8);
  justify-content: center;
  text-align: center;
  gap: var(--space-4);
}

/* ===== SPECIFIC BENTO STYLES ===== */

.bento-dark {
  background: var(--brand-dark);
  color: var(--brand-cream);
  border: none;
}

.bento-dark h3 { color: var(--brand-cream); font-size: var(--font-size-xl); margin-top: var(--space-4); }
.bento-dark p { color: rgba(253,246,227,0.6); font-size: var(--font-size-sm); }
.bento-dark .info-icon {
  width: 64px; height: 64px;
  background: rgba(255,140,0,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-inline: auto;
  color: var(--brand-orange);
}
.bento-dark .info-icon svg { width: 32px; height: 32px; }

.bento-accent {
  background: var(--brand-orange);
  color: var(--brand-dark-deep);
  border: none;
  overflow: hidden;
}

.bento-wide-content h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.bento-wide-content p {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-6);
  opacity: 0.9;
}

.bento-features {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.bento-features span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.1);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sold Out Ribbon */
.sold-out-ribbon {
  position: absolute;
  top: 32px; right: -40px;
  background: var(--brand-dark);
  color: var(--brand-cream);
  padding: 8px 48px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(45deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10;
}

/* ===== RESPONSIVE BENTO ===== */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-info { grid-column: span 2; }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-large, .bento-square, .bento-wide, .bento-info, .bento-full {
    grid-column: span 1;
    grid-row: auto;
  }
  .bento-large .bento-image { min-height: 280px; }
  .bento-features { flex-direction: column; gap: var(--space-2); }
}
