/* ==========================================================================
   Emma Colchoes - Main Stylesheet
   Complete rewrite with exact HTML class names
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Google Fonts Import
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #ffa236;
  --color-primary-hover: #e88f2a;
  --color-text-primary: #403833;
  --color-text-secondary: #58524e;
  --color-blue: #3c4196;
  --color-green: #287d54;
  --color-green-light: #e8f5e9;
  --color-red: #da1f00;
  --color-bg-light: #f9f7f6;
  --color-bg-white: #ffffff;
  --color-border-light: #e8e5e2;
  --color-border-medium: #d0cbc6;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--color-text-secondary);
}

.section-cta {
  text-align: center;
  margin-top: 30px;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  text-decoration: none;
  border: none;
  line-height: 1.4;
  gap: 8px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-block {
  width: 100%;
  display: flex;
}

/* --------------------------------------------------------------------------
   5. Promo Bar
   -------------------------------------------------------------------------- */
.promo-bar {
  background-color: var(--color-text-primary);
  color: #ffffff;
  padding: 8px 0;
  font-size: 13px;
}

.promo-bar-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.promo-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-main {
  padding: 12px 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-primary);
}

.logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-emma {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 2px;
  text-transform: lowercase;
  font-family: var(--font-serif);
  line-height: 1;
}

.logo-sub {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--color-text-primary);
  text-transform: uppercase;
  font-weight: 600;
}

/* Nav Desktop */
.nav-desktop {
  display: flex;
  gap: 24px;
}

.nav-desktop a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-desktop a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-primary);
  position: relative;
  transition: color 0.2s;
}

.header-btn:hover {
  color: var(--color-primary);
}

.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 11px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-primary);
  position: relative;
  transition: color 0.2s;
}

.search-toggle:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   7. Search Bar
   -------------------------------------------------------------------------- */
.search-bar {
  display: none;
  background: #ffffff;
  padding: 15px 0;
  border-top: 1px solid var(--color-border-light);
}

.search-bar.open {
  display: block;
}

.search-form {
  display: flex;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-primary);
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--color-primary);
}

.search-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   8. Mobile Nav
   -------------------------------------------------------------------------- */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.nav-mobile-content {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: #ffffff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  z-index: 1;
}

.nav-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.nav-mobile-header button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-content a {
  color: var(--color-text-primary);
  text-decoration: none;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid #f0ede9;
  display: block;
  transition: color 0.2s;
}

.nav-mobile-content a:hover {
  color: var(--color-primary);
}

.nav-mobile-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 10px 0;
}

/* --------------------------------------------------------------------------
   9. Cart Drawer
   -------------------------------------------------------------------------- */
.cart-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.cart-drawer.open {
  display: block;
}

.cart-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cart-drawer-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  z-index: 1;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--color-border-light);
}

.cart-drawer-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-text-secondary);
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 40px 20px;
  color: var(--color-text-secondary);
}

.cart-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Cart Drawer Items (rendered by JS) */
.cart-drawer-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.cart-drawer-item:last-child {
  border-bottom: none;
}

.cart-drawer-item img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-drawer-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-drawer-item-info .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.cart-drawer-item-info .variant {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
}

.qty-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.qty-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.qty {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.cart-drawer-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-drawer-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #999;
  padding: 0;
  line-height: 1;
}

.remove-btn:hover {
  color: var(--color-red);
}

/* Success & Error Pages */
.success-page,
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.success-icon {
  margin-bottom: 24px;
}

.success-page h1,
.error-page h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.error-page h1 {
  font-size: 64px;
  color: var(--color-primary);
}

.success-page p,
.error-page p {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.success-details {
  background: var(--color-bg-light);
  border-radius: 12px;
  padding: 24px;
  margin: 24px auto;
  max-width: 500px;
}

.success-details p {
  margin-bottom: 8px;
}

.error-page h2 {
  font-size: 24px;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   10. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  background-color: var(--color-bg-light);
  padding: 48px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-promo-tag {
  display: inline-block;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 50px;
  align-self: flex-start;
}

.hero-text h1 {
  font-size: 2.8rem;
  color: var(--color-text-primary);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.hero-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   10b. Proteste Bar
   -------------------------------------------------------------------------- */
.proteste-bar {
  background-color: var(--color-bg-light);
  border-bottom: 1px solid #e5e0db;
  padding: 16px 0;
}

.proteste-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.proteste-bar-inner span {
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.proteste-sub {
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   10c. Trust Bar (horizontal)
   -------------------------------------------------------------------------- */
.trust-bar {
  padding: 20px 0;
  border-bottom: 1px solid #e5e0db;
}

.trust-bar-items {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.trust-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trust-bar-item span {
  font-size: 0.9rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   11. Product Cards
   -------------------------------------------------------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.products-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.badge-sale {
  background-color: var(--color-green);
  color: #ffffff;
  font-weight: 700;
}

.badge-label {
  background-color: #403833;
  color: #ffffff;
}

.badge-mais-vendido {
  background-color: var(--color-primary);
  color: #ffffff;
}

.badge-premium {
  background-color: var(--color-blue);
  color: #ffffff;
}

.product-card-info {
  padding: 16px;
}

.product-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-card-title a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.product-card-title a:hover {
  color: var(--color-primary);
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.stars {
  display: flex;
  gap: 1px;
  color: var(--color-primary);
}

.rating-count {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.product-card-pricing {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
}

.price-current {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.price-installment {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.price-pix-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--color-green);
  font-weight: 600;
}

.product-card-btn {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   12. New Product Card Styles & Section Title Left
   -------------------------------------------------------------------------- */
.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card-desc {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  margin: 4px 0 8px;
  line-height: 1.4;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-prefix {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.price-line .price-current {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.price-line .price-old {
  font-size: 0.9rem;
  color: #999;
  text-decoration: line-through;
}

.price-pix-line {
  font-size: 0.85rem;
  color: var(--color-green);
  display: block;
  margin-top: 4px;
}

.price-highlight {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   12b. Category Header Centered
   -------------------------------------------------------------------------- */
.category-header-centered {
  text-align: center;
  margin-bottom: 32px;
}

.category-header-centered .category-title {
  font-size: 2rem;
  font-style: italic;
  font-weight: 700;
}

.category-header-centered .category-desc {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 8px auto 0;
}

.category-header-centered .category-count {
  display: none;
}

/* --------------------------------------------------------------------------
   12c. Mattress Product Card (Features + Performance Bars)
   -------------------------------------------------------------------------- */
.product-card-mattress .product-card-info {
  padding: 16px 16px 20px;
}

/* Feature List */
.product-features {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

.feature-icon {
  flex-shrink: 0;
  color: var(--color-text-secondary);
}

/* Performance Bars */
.product-performance {
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perf-bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perf-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perf-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.perf-info {
  flex-shrink: 0;
  opacity: 0.5;
}

.perf-bar-track {
  height: 6px;
  background-color: #e8e5e2;
  border-radius: 3px;
  overflow: hidden;
}

.perf-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #e88f2a);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.perf-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #aaa;
}

/* --------------------------------------------------------------------------
   12d. Category Below-Grid Sections
   -------------------------------------------------------------------------- */
.category-trust-bar {
  padding: 32px 0;
  margin-top: 48px;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.category-materials-section {
  margin-top: 48px;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.material-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.material-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.material-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 16px 20px 8px;
}

.material-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 20px 20px;
}

.category-accordion-section {
  margin-top: 48px;
  padding-bottom: 32px;
}

.section-title-left {
  text-align: left;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 24px;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   13. Content Grid (Lifestyle Cards)
   -------------------------------------------------------------------------- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 300px 250px;
  gap: 16px;
}

.content-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.content-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-card-tall {
  grid-row: span 2;
}

.content-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.content-card-overlay h3 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.content-card-overlay p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   13b. Categories Grid
   -------------------------------------------------------------------------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: block;
  text-decoration: none;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.category-card-overlay h3 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.category-card-overlay p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   14. Reviews Section
   -------------------------------------------------------------------------- */
.reviews-section {
  background: #ffffff;
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.reviews-summary span {
  color: var(--color-text-secondary);
  font-size: 15px;
}

.reviews-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.reviews-carousel::-webkit-scrollbar {
  display: none;
}

.review-card {
  min-width: 300px;
  max-width: 350px;
  background: var(--color-bg-light);
  border-radius: 12px;
  padding: 24px;
  flex-shrink: 0;
}

.review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.review-text {
  font-size: 15px;
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: 16px;
  font-style: italic;
}

.review-author {
  font-size: 14px;
  color: var(--color-text-primary);
}

.review-author strong {
  font-weight: 600;
}

.review-author span {
  color: var(--color-text-secondary);
}

.review-product {
  font-size: 13px;
  color: var(--color-primary);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   15. FAQ Section
   -------------------------------------------------------------------------- */
.faq-section {
  background: var(--color-bg-light);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #ffffff;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-primary);
  line-height: 1.4;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 20px 18px;
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

/* --------------------------------------------------------------------------
   16. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 20px 0;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #999;
}

/* --------------------------------------------------------------------------
   17. Product Page
   -------------------------------------------------------------------------- */
.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 20px 0;
}

/* Product Gallery */
.product-gallery {
  position: relative;
}

.gallery-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.gallery-main img {
  width: 100%;
  display: block;
}

.gallery-badge {
  position: absolute;
  top: 16px;
  left: 16px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  background: none;
  transition: border-color 0.2s;
}

.gallery-thumb.active {
  border-color: var(--color-primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Details */
.product-details {
  padding-top: 0;
}

.product-page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.rating-text {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* Product Sizes */
.product-sizes {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 10px;
}

.size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-option {
  position: relative;
  border: 2px solid var(--color-border-light);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: center;
  min-width: 100px;
  transition: border-color 0.2s, background-color 0.2s;
}

.size-option.active {
  border-color: var(--color-primary);
  background: #fff8f0;
}

.size-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.size-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.size-dimensions {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* Product Price Box */
.product-price-box {
  background: var(--color-bg-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.price-discount-badge {
  background-color: var(--color-red);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.price-main {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.price-pix {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--color-green-light);
  border-radius: 6px;
}

.price-pix-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-green);
}

.price-pix-label {
  font-size: 13px;
  color: var(--color-green);
}

/* Product Form */
.product-form {
  margin-bottom: 20px;
}

.add-to-cart-btn {
  font-size: 18px;
  padding: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Product Trust */
.product-trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.product-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   18. Product Tabs
   -------------------------------------------------------------------------- */
.product-tabs {
  margin-top: 24px;
}

.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border-light);
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font-primary);
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: var(--color-text-primary);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.tab-content {
  display: none;
  padding: 24px 0;
}

.tab-content.active {
  display: block;
}

.description-content {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.description-content p {
  margin-bottom: 12px;
}

.description-content ul,
.description-content ol {
  margin: 12px 0;
  padding-left: 24px;
}

.description-content li {
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   19. Specs Table
   -------------------------------------------------------------------------- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid #f0ede9;
}

.specs-table td {
  padding: 12px 0;
  font-size: 15px;
}

.spec-label {
  font-weight: 600;
  color: var(--color-text-primary);
  width: 40%;
}

.spec-value {
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   20. Related Products
   -------------------------------------------------------------------------- */
.related-products {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border-light);
}

/* --------------------------------------------------------------------------
   21. Category Page
   -------------------------------------------------------------------------- */
.category-header {
  margin-bottom: 30px;
}

.category-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.category-desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.category-count {
  font-size: 14px;
  color: #999;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   22. Cart Page
   -------------------------------------------------------------------------- */
.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--color-text-primary);
}

.cart-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  gap: 16px;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.cart-item-variant {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.cart-item-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  overflow: hidden;
}

.quantity-selector button {
  width: 32px;
  height: 32px;
  background: var(--color-bg-light);
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  transition: background-color 0.2s;
}

.quantity-selector button:hover {
  background: var(--color-border-light);
}

.quantity-selector span {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 4px;
  transition: color 0.2s;
}

.cart-item-remove:hover {
  color: var(--color-red);
}

/* Cart Summary */
.cart-summary {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  color: var(--color-text-secondary);
}

.cart-pix-discount {
  color: var(--color-green);
}

.cart-total {
  border-top: 2px solid var(--color-border-light);
  padding-top: 16px;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  justify-content: space-between;
}

.cart-summary .btn {
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   23. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--color-text-primary);
  color: #ffffff;
  padding: 60px 0 20px;
}

.footer-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-icon {
  flex-shrink: 0;
}

.trust-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.trust-text {
  display: flex;
  flex-direction: column;
}

.trust-text strong {
  font-size: 14px;
}

.trust-text span {
  font-size: 12px;
  opacity: 0.7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #ffffff;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-col p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-logo {
  font-size: 28px;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-primary);
}

.footer-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* --------------------------------------------------------------------------
   24. Mobile Bottom Bar
   -------------------------------------------------------------------------- */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--color-border-light);
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 11px;
  transition: color 0.2s;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
  color: var(--color-primary);
}

.mobile-bottom-nav svg {
  width: 22px;
  height: 22px;
}

.cart-indicator {
  position: relative;
}

.mobile-cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   25. Responsive - Tablet (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-page {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-content {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }

  .materials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   26. Responsive - Mobile (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding-bottom: 64px;
  }

  .main-content {
    margin-bottom: 0;
  }

  /* Promo bar */
  .promo-bar-inner {
    gap: 12px;
    font-size: 11px;
  }

  .promo-item-mobile-hide {
    display: none;
  }

  /* Header */
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mobile bottom bar visible */
  .mobile-bottom-bar {
    display: block;
  }

  /* Hero Section */
  .hero-section {
    padding: 32px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-image {
    order: 2;
  }

  .hero-text {
    order: 1;
  }

  /* Products */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .products-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Product page */
  .product-page-title {
    font-size: 22px;
  }

  .price-main {
    font-size: 26px;
  }

  /* Content Grid */
  .content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .content-card-tall {
    grid-row: auto;
  }

  .content-card {
    height: 200px;
  }

  /* Categories Grid */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-card {
    aspect-ratio: 1 / 1;
  }

  /* Section Title Left */
  .section-title-left {
    font-size: 1.5rem;
  }

  /* Trust Bar */
  .trust-bar-items {
    justify-content: center;
    gap: 12px;
  }

  /* Footer */
  .footer-trust {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Section spacing */
  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 24px;
  }

  /* Mattress card mobile */
  .product-features {
    gap: 4px;
  }

  .product-feature {
    font-size: 12px;
  }

  .perf-bar-labels {
    font-size: 9px;
  }

  .perf-label {
    font-size: 11px;
  }

  .materials-grid {
    grid-template-columns: 1fr;
  }

  .material-card img {
    height: 160px;
  }

  .category-header-centered .category-title {
    font-size: 1.6rem;
  }

  .category-trust-bar .trust-bar-items {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

/* --------------------------------------------------------------------------
   27. Responsive - Small Mobile (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .products-grid-4 {
    grid-template-columns: 1fr;
  }

  .product-card-pricing {
    font-size: 14px;
  }

  .price-current {
    font-size: 20px;
  }

  .product-trust {
    grid-template-columns: 1fr;
  }

  .header-container {
    gap: 8px;
  }

  .logo-emma {
    font-size: 26px;
  }

  .logo-sub {
    font-size: 9px;
    letter-spacing: 3px;
  }

  .hero-text h1 {
    font-size: 1.7rem;
  }

  .hero-promo-tag {
    font-size: 0.95rem;
    padding: 6px 16px;
  }

  .page-title {
    font-size: 24px;
  }

  .cart-item {
    flex-direction: column;
  }

  .cart-item-image {
    width: 100%;
    height: 180px;
  }

  .cart-item-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .content-card {
    height: 180px;
  }

  .content-card-overlay {
    padding: 16px;
  }

  .content-card-overlay h3 {
    font-size: 1rem;
  }

  .product-features {
    margin: 8px 0;
    gap: 5px;
  }

  .product-feature {
    font-size: 11px;
  }

  .product-performance {
    margin: 10px 0;
    gap: 6px;
  }

  .perf-label {
    font-size: 10px;
  }

  .perf-bar-labels {
    font-size: 9px;
  }

  .materials-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .material-card h3 {
    font-size: 1rem;
  }

  .material-card p {
    font-size: 13px;
  }

  .category-trust-bar .trust-bar-items {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
