/**
 * THEME_ENGINE_V3.1 — Isolated V3 Structural CSS
 */

:root {
  --v3-container: 1200px;
  --v3-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --v3-color-primary: #2563eb;
  --v3-color-text: #1e293b;
  --v3-color-muted: #64748b;
  --v3-color-bg: #ffffff;
  --v3-color-card-bg: #ffffff;
  --v3-color-border: #e2e8f0;
  --v3-radius: 8px;
}

.v3-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.v3-container {
  width: min(var(--v3-container), calc(100% - 32px));
  margin-inline: auto;
}

.v3-section {
  padding-block: 40px;
}

.v3-section-header {
  margin-bottom: 24px;
}

.v3-section-header--flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.v3-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--v3-color-text);
  margin: 0;
}

.v3-section-subtitle {
  font-size: 0.95rem;
  color: var(--v3-color-muted);
  margin-top: 4px;
}

/* Grid System */
.v3-grid {
  display: grid;
  gap: 24px;
}
.v3-grid--cols-1 { grid-template-columns: 1fr; }
.v3-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.v3-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.v3-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.v3-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
  .v3-grid--cols-4, .v3-grid--cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .v3-grid--cols-3, .v3-grid--cols-4, .v3-grid--cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .v3-grid--cols-2, .v3-grid--cols-3, .v3-grid--cols-4, .v3-grid--cols-6 { grid-template-columns: 1fr; }
}

/* Product Card */
.v3-product-card {
  display: flex;
  flex-direction: column;
  background: var(--v3-color-card-bg);
  border: 1px solid var(--v3-color-border);
  border-radius: var(--v3-radius);
  overflow: hidden;
  position: relative;
}

.v3-product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
}

.v3-product-card__image {
  width: 100%; height: 100%; object-fit: cover;
}

.v3-product-card__content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.v3-product-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.v3-product-card__price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.v3-price-current {
  font-weight: 700; font-size: 1.1rem; color: var(--v3-color-primary);
}
.v3-price-compare {
  text-decoration: line-through; color: var(--v3-color-muted); font-size: 0.9rem;
}

/* Product Carousel */
.v3-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 12px;
}

.v3-carousel-item {
  flex: 0 0 calc(25% - 15px);
  scroll-snap-align: start;
}

@media (max-width: 900px) {
  .v3-carousel-item { flex: 0 0 calc(33.333% - 14px); }
}
@media (max-width: 600px) {
  .v3-carousel-item { flex: 0 0 calc(50% - 10px); }
}

/* Buttons */
.v3-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--v3-radius); font-weight: 600;
  cursor: pointer; text-decoration: none; border: none;
}
.v3-btn--primary { background: var(--v3-color-primary); color: #ffffff; }
.v3-btn--outline { border: 1px solid var(--v3-color-primary); color: var(--v3-color-primary); background: transparent; }

/* Hero Slider */
.v3-section--hero-slider {
  padding-block: 0;
  position: relative;
  overflow: hidden;
}
.v3-hero-slide {
  position: relative; min-height: 420px; display: none; align-items: center;
}
.v3-hero-slide.is-active {
  display: flex;
}
.v3-hero-slide__bg {
  position: absolute; inset: 0; z-index: 0;
}
.v3-hero-slide__img {
  width: 100%; height: 100%; object-fit: cover;
}
.v3-hero-slide__overlay {
  position: absolute; inset: 0; background: #000000;
}
.v3-hero-slide__container {
  position: relative; z-index: 1; padding-block: 60px;
}
.v3-hero-slide--tone-light { color: #ffffff; }
.v3-hero-slide--tone-dark { color: #0f172a; }

/* Category Icons */
.v3-category-icons-row {
  display: flex; gap: 24px; overflow-x: auto; padding-block: 12px; justify-content: flex-start;
}
.v3-category-icon-item {
  display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--v3-color-text); min-width: 80px;
}
.v3-category-icon-bubble {
  width: 64px; height: 64px; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
