:root {
  --cream: #FAF7F2;
  --blush: #E8D5C4;
  --rose: #C4856A;
  --deep: #2C1810;
  --soft: #F0E9E1;
  --text: #3A2E28;
  --muted: #8A7E78;
  --white: #FFFFFF;
  --success: #6BAF92;
  --border: #E2D9D0;
  --gold: #B8975A;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
}

/* PAGES */
.page {
  display: none;
  min-height: 100vh;
}
.page.active {
  display: block;
}

/* TOP ANNOUNCEMENT BAR */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--soft);
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

/* NAVBAR */
nav {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--deep);
  cursor: pointer;
  letter-spacing: 3px;
}
nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1002;
  position: relative;
}
nav .nav-logo img {
  position: relative;
  height: 48px !important;
  width: 48px !important;
  border-radius: 50%;
  object-fit: cover !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 2px solid var(--cream);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
nav .nav-logo span {
  font-weight: 600 !important;
  text-shadow: 0 2px 4px rgba(255,255,255,0.8);
  position: relative;
  margin-left: 0;
  top: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.is-home nav .nav-logo img {
  position: absolute;
  top: -10px;
  left: 0;
  height: 150px !important;
  width: 150px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 3px solid var(--cream);
}
body.is-home nav .nav-logo span {
  margin-left: 155px; /* Dá espaço à imagem gigante na página inicial */
}
.nav-logo span {
  color: var(--rose);
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--deep);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--rose);
}
.nav-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: opacity 0.2s;
}
.nav-icon {
  width: 22px;
  height: 22px;
  color: var(--deep);
  transition: color 0.2s;
}
.nav-btn:hover .nav-icon {
  color: var(--rose);
}
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--rose);
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* HERO */
.hero {
  padding-top: 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background-color: var(--cream);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(250, 247, 242, 0.9) 0%, rgba(250, 247, 242, 0.5) 45%, rgba(250, 247, 242, 0) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px;
  background: transparent;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 700px;
}
.hero-tag {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 24px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  line-height: 1.1;
  color: var(--deep);
  margin-bottom: 24px;
}
.hero-title em {
  color: var(--rose);
  font-style: italic;
}
.hero-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 400px;
  margin-bottom: 40px;
}
.hero-cta {
  display: inline-flex;
  gap: 16px;
  align-items: center;
}
.btn-primary {
  background: var(--deep);
  color: white;
  padding: 16px 36px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--rose);
  transform: translateX(-101%);
  transition: transform 0.3s;
}
.btn-primary:hover::after {
  transform: translateX(0);
}
.btn-primary span {
  position: relative;
  z-index: 1;
}
.btn-rose {
  background: var(--rose);
  color: white;
  padding: 16px 36px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all 0.3s;
}
.btn-rose:hover {
  background: var(--deep);
}
.btn-outline-rose {
  background: transparent;
  color: var(--rose);
  padding: 16px 36px;
  border: 1.5px solid var(--rose);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all 0.3s;
}
.btn-outline-rose:hover {
  background: var(--rose);
  color: white;
}
.btn-outline {
  background: none;
  color: var(--deep);
  padding: 16px 36px;
  border: 1.5px solid var(--deep);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all 0.3s;
}
.btn-outline:hover {
  background: var(--deep);
  color: white;
}
.hero-right {
  background: #E8DDD5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  opacity: 0.4;
}
.hero-badge {
  position: absolute;
  bottom: 48px;
  right: 48px;
  background: white;
  padding: 20px 28px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}
.hero-badge p {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.hero-badge strong {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--rose);
}

/* FEATURES BAR */
.features-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream);
  padding: 32px 60px;
  border-bottom: 1px solid var(--border);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
  border-right: 1px solid var(--border);
  padding: 0 16px;
}
.feature-item:last-child {
  border-right: none;
}
.feature-icon {
  color: var(--rose);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-text {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--deep);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

/* CATEGORIES */
.section {
  padding: 80px 60px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--deep);
}
.section-link {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rose);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--blush);
}
.cat-card:hover .cat-overlay {
  opacity: 1;
}
.cat-card:hover .cat-img {
  transform: scale(1.05);
}
.cat-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  transition: transform 0.5s;
  background: var(--blush);
}
.cat-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.4);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 28px;
}
.cat-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: white;
  font-weight: 600;
}
.cat-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* PRODUCTS */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.product-card {
  cursor: pointer;
  position: relative;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(44, 24, 16, 0.08);
  transform: translateY(-4px);
}
.prod-img {
  aspect-ratio: 3/4;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  position: relative;
  overflow: hidden;
}
.prod-fav {
  position: absolute;
  top: 16px;
  right: 16px;
  background: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  z-index: 2;
}
.prod-fav:hover, .prod-fav.active {
  background: var(--rose);
  color: white;
}
.prod-add {
  width: 100%;
  background: var(--soft);
  color: var(--deep);
  border: none;
  padding: 12px 16px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  margin-top: 12px;
}
.prod-add:hover {
  background: var(--rose);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 133, 106, 0.2);
}
.prod-add .add-icon {
  width: 16px;
  height: 16px;
}
.prod-info {
  padding: 16px 16px;
}
.prod-tag {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 6px;
}
.prod-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--deep);
  margin-bottom: 8px;
}
.prod-price {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.prod-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 13px;
  margin-left: 8px;
}

/* FILTER BAR */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--deep);
  background: var(--deep);
  color: white;
}
.search-bar {
  flex: 1;
  max-width: 320px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid var(--border);
  background: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.search-bar input:focus {
  border-color: var(--rose);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
}

/* CART PANEL */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.4);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.overlay.open {
  opacity: 1;
  pointer-events: all;
}
.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: white;
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.panel.open {
  transform: translateX(0);
}
.panel-header {
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--deep);
}
.panel-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
}
.panel-close:hover {
  color: var(--rose);
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}
.cart-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 80px;
  height: 100px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}
.cart-item-info {
  flex: 1;
}
.cart-item-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: var(--deep);
  margin-bottom: 4px;
}
.cart-item-price {
  font-size: 14px;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 12px;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover {
  border-color: var(--rose);
  color: var(--rose);
}
.qty-num {
  font-size: 14px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}
.cart-item-del {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}
.cart-item-del:hover {
  color: var(--rose);
}
.panel-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.cart-total-label {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.cart-total-val {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--deep);
}
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 14px;
  margin-bottom: 8px;
}

/* AUTH FORMS */
.auth-page {
  padding-top: 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
}
.auth-card {
  background: white;
  padding: 56px 64px;
  width: 480px;
  box-shadow: 0 4px 60px rgba(0, 0, 0, 0.06);
}
.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 8px;
}
.auth-logo span {
  color: var(--rose);
}
.auth-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 40px;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  background: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: var(--rose);
}
.form-error {
  font-size: 12px;
  color: #E05555;
  margin-top: 6px;
}
.auth-submit {
  width: 100%;
  background: var(--deep);
  color: white;
  padding: 16px;
  border: none;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  margin-top: 8px;
  transition: background 0.2s;
}
.auth-submit:hover {
  background: var(--rose);
}
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}
.auth-switch a {
  color: var(--rose);
  cursor: pointer;
  font-weight: 500;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ACCOUNT */
.account-page {
  padding-top: 100px;
  min-height: 100vh;
  background: var(--soft);
}
.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 68px);
}
.account-sidebar {
  background: white;
  padding: 48px 32px;
  border-right: 1px solid var(--border);
}
.account-avatar {
  width: 72px;
  height: 72px;
  background: var(--blush);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 16px;
}
.account-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--deep);
  margin-bottom: 4px;
}
.account-email {
  font-size: 12px;
  color: var(--muted);
}
.account-nav {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.account-nav-item {
  padding: 12px 16px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.account-nav-item:hover, .account-nav-item.active {
  color: var(--rose);
  border-left-color: var(--rose);
  background: var(--soft);
}
.account-content {
  padding: 48px 56px;
}
.account-section {
  display: none;
}
.account-section.active {
  display: block;
}
.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--deep);
  margin-bottom: 32px;
}

/* Orders */
.order-card {
  background: white;
  padding: 28px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.order-id {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.order-date {
  font-size: 12px;
  color: var(--muted);
}
.order-status {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  font-weight: 500;
}
.status-delivered {
  background: #E8F5EF;
  color: #6BAF92;
}
.status-processing {
  background: #FFF3E0;
  color: #E09050;
}
.status-shipped {
  background: #E3F0FF;
  color: #5090D0;
}
.order-items {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.order-item-thumb {
  width: 60px;
  height: 75px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.order-total {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--deep);
}

/* Wishlist */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* CHECKOUT */
.checkout-page {
  padding-top: 100px;
  min-height: 100vh;
  background: var(--soft);
}
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 0;
  min-height: calc(100vh - 68px);
}
.checkout-form-side {
  padding: 56px 60px;
  background: white;
}
.checkout-summary-side {
  padding: 56px 48px;
  background: var(--cream);
  border-left: 1px solid var(--border);
}
.checkout-step {
  margin-bottom: 40px;
}
.checkout-step-title {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkout-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.checkout-item-img {
  width: 64px;
  height: 80px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.checkout-item-name {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--deep);
  flex: 1;
}
.checkout-item-price {
  font-size: 14px;
  color: var(--rose);
  font-weight: 500;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--deep);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1.5px solid var(--border);
}
.checkout-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--deep);
  margin-bottom: 48px;
}

/* PRODUCT DETAIL */
.detail-page {
  padding-top: 100px;
  min-height: 100vh;
  background: var(--cream);
}
.detail-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: calc(100vh - 68px);
}
.detail-imgs {
  padding: 56px 32px 56px 60px;
  background: var(--soft);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}
.detail-main-img {
  background: var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 140px;
  width: 100%;
  max-width: 550px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(44, 24, 16, 0.08);
}
.detail-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-thumb {
  width: 80px;
  height: 100px;
  background: var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  border-radius: 8px;
  overflow: hidden;
}
.detail-thumb.active {
  border-color: var(--rose);
}
.detail-info {
  padding: 56px 60px 56px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.detail-category {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 16px;
}
.detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  line-height: 1.2;
  color: var(--deep);
  margin-bottom: 20px;
}
.detail-price {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--text);
  margin-bottom: 28px;
}
.detail-desc {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 440px;
}
.size-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 12px;
}
.sizes {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.size-btn {
  min-width: 56px;
  min-height: 48px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s ease;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  color: var(--text);
  font-weight: 500;
}
.size-btn:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--cream);
  transform: translateY(-2px);
}
.size-btn.active {
  border-color: var(--deep);
  background: var(--deep);
  color: white;
}
.color-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 12px;
}
.color-btn-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.color-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 0;
}
.color-btn:hover {
  transform: scale(1.1);
}
.color-btn.active {
  border-color: var(--deep);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.color-btn-name {
  font-size: 10px;
  color: var(--muted);
  text-transform: capitalize;
}
.detail-actions {
  display: flex;
  gap: 16px;
}
.detail-fav {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.detail-fav:hover, .detail-fav.active {
  border-color: var(--rose);
  background: var(--rose);
  color: white;
}

/* ADMIN */
.admin-page {
  padding-top: 100px;
  min-height: 100vh;
  background: #F5F0EB;
}
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 68px);
}
.admin-sidebar {
  background: var(--deep);
  padding: 40px 0;
}
.admin-brand {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: white;
  letter-spacing: 2px;
  padding: 0 32px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-brand span {
  color: var(--rose);
}
.admin-nav {
  margin-top: 32px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.admin-nav-item:hover, .admin-nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--rose);
}
.admin-content {
  padding: 48px 56px;
}
.admin-section {
  display: none;
}
.admin-section.active {
  display: block;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.admin-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--deep);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.stat-card {
  background: white;
  padding: 28px;
  border: 1px solid var(--border);
}
.stat-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--deep);
}
.stat-change {
  font-size: 12px;
  color: var(--success);
  margin-top: 4px;
}

/* Admin table */
.admin-table-wrap {
  background: white;
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  text-align: left;
  padding: 16px 20px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  background: var(--soft);
}
.admin-table td {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td {
  background: var(--cream);
}
.table-img {
  width: 48px;
  height: 60px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.tag-pill {
  display: inline-block;
  padding: 4px 10px;
  background: var(--blush);
  font-size: 11px;
  color: var(--rose);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 2px;
}
.tbl-btn {
  padding: 8px 16px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all 0.2s;
}
.tbl-edit {
  background: var(--deep);
  color: white;
}
.tbl-edit:hover {
  background: var(--rose);
}
.tbl-del {
  background: var(--border);
  color: var(--muted);
  margin-left: 8px;
}
.tbl-del:hover {
  background: #E05555;
  color: white;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: white;
  width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--deep);
  margin-bottom: 32px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* Footer */
footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 60px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: white;
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.footer-brand span {
  color: var(--rose);
}
.footer-desc {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.5);
  max-width: 280px;
}
.footer-col h4 {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 10px;
  cursor: pointer;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--rose);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

/* Success */
.success-page {
  padding-top: 100px;
  min-height: 100vh;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-card {
  background: white;
  padding: 80px;
  text-align: center;
  max-width: 560px;
}
.success-icon {
  font-size: 64px;
  margin-bottom: 24px;
}
.success-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--deep);
  margin-bottom: 16px;
}
.success-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 40px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--soft);
}
::-webkit-scrollbar-thumb {
  background: var(--blush);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rose);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}
/* Image preview styles */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--soft);
}

.image-upload-area:hover {
  border-color: var(--rose);
  background: var(--cream);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--soft);
}

.table-product-img {
  width: 60px;
  height: 75px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
}

.table-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-img img,
.checkout-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.prod-img {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   RESPONSIVO / MOBILE & SPLIT-SCREEN (Proteção Anti-Overflow e Dinâmica)
   ========================================================================== */

/* 1. Trava global de largura para garantir que NADA sai do ecrã */
html, body {
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
}

img { max-width: 100%; }

/* Corrigir elementos que tinham larguras fixas perigosas */
.modal { max-width: 90vw; width: 600px; margin: 5vh auto; }
.auth-card { max-width: 90vw; width: 440px; padding: 40px 24px; margin: 0 auto; }
.panel { max-width: 100vw; width: 400px; }
.search-bar { max-width: 100%; width: 100%; }
.success-card { max-width: 90vw; width: 560px; padding: 40px 24px; }

/* Garantir que todos os cartões possam encolher o necessário */
.product-card, .cat-card, .stat-card, .order-card, .checkout-item, .cart-item { 
  min-width: 0; 
  overflow: hidden; 
}
.prod-name, .cart-item-name, .checkout-item-name {
  white-space: normal;
  word-wrap: break-word;
}

/* 2. Modo Split-Screen / Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
  .section { padding: 40px 20px; }
  
  /* Navegação Adaptável (1ª linha Logo e Ícones, 2ª linha Categorias) */
  nav { 
    padding: 12px 20px; 
    height: auto; 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: space-between; 
    gap: 16px; 
  }
  nav .nav-logo { order: 1; font-size: 20px; flex: 1; position: relative !important; top: 0 !important; left: 0 !important; }
  nav .nav-logo img, body.is-home nav .nav-logo img { position: static !important; height: 56px !important; width: 56px !important; border: none !important; box-shadow: none !important; }
  nav .nav-logo span, body.is-home nav .nav-logo span { margin-left: 0 !important; font-size: 22px !important; text-shadow: none !important; }
  .nav-actions { order: 2; display: flex; gap: 16px; }
  .nav-links { 
    order: 3; 
    width: 100%; 
    margin-left: 0;
    display: flex; 
    overflow-x: auto; 
    gap: 20px; 
    padding: 12px 0 4px 0; 
    border-top: 1px solid var(--border); 
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  
  /* Hero Imagem e Texto */
  .hero { min-height: 60vh; padding-top: 120px; }
  .hero-left { max-width: 100%; padding: 40px 20px; text-align: center; }
  .hero::before { background: linear-gradient(to right, rgba(250, 247, 242, 0.9) 0%, rgba(250, 247, 242, 0.7) 100%); }
  .hero-title { font-size: 42px; line-height: 1.2; word-wrap: break-word; }
  .hero-cta { justify-content: center; flex-wrap: wrap; }
  
  /* Grelhas da Loja - Convertidas para 2 colunas para os cartões terem espaço */
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .products-grid, .wishlist-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Layouts (Conta, Admin, Checkout, Detail) - Tudo em 1 Coluna */
  .account-layout, .admin-layout, .checkout-layout, .detail-layout { grid-template-columns: 1fr; min-height: auto; gap: 0; min-width: 0; }
  
  /* Transformar Barras Laterais em Menus Superiores */
  .account-sidebar, .admin-sidebar, .checkout-summary-side { 
    border-right: none; 
    border-bottom: 1px solid var(--border); 
    padding: 24px 20px; 
    width: 100%;
    min-width: 0;
  }
  .admin-sidebar { padding: 24px 0 0 0; }
  .admin-brand { padding: 0 20px 24px; border-bottom: none; text-align: center; width: 100%; }
  .account-name, .account-email { text-align: center; }
  .account-avatar { margin: 0 auto 16px auto; }
  
  .account-nav, .admin-nav { 
    margin-top: 16px; 
    display: flex; 
    flex-direction: row; 
    overflow-x: auto; 
    white-space: nowrap; 
    gap: 16px; 
    padding: 0 20px 12px 20px; 
    -webkit-overflow-scrolling: touch;
  }
  .account-nav::-webkit-scrollbar, .admin-nav::-webkit-scrollbar { display: none; }
  .account-nav-item, .admin-nav-item { 
    border-left: none; 
    border-bottom: 2px solid transparent; 
    padding: 8px 12px; 
    margin: 0 !important;
  }
  .account-nav-item.active, .admin-nav-item.active,
  .account-nav-item:hover, .admin-nav-item:hover { 
    border-left-color: transparent; 
    border-bottom-color: var(--deep); 
    background: transparent;
    color: var(--deep);
  }
  
  .checkout-summary-side { border-left: none; border-top: 1px solid var(--border); padding-top: 32px; }
  .checkout-form-side { padding: 32px 20px; }
  .admin-content, .account-content { padding: 32px 20px; width: 100%; overflow: hidden; min-width: 0; }
  
  /* Proteger Tabelas de Admin contra overflow */
  .admin-table-wrap { 
    width: 100%; 
    max-width: 100%;
    overflow-x: auto; 
    border: 1px solid var(--border);
    border-radius: 8px; 
    -webkit-overflow-scrolling: touch; 
  }
  .admin-table { min-width: 600px; }
  
  /* Detail Page */
  .detail-imgs, .detail-info { padding: 32px 20px; }
  .detail-imgs { flex-direction: column-reverse; align-items: center; }
  .detail-thumbs { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .detail-name { font-size: 32px; }
  .detail-price { font-size: 24px; }
}

/* 3. Ajustes Específicos para Telemóveis (max-width: 768px) */
@media (max-width: 768px) {
  /* Hero Image - Telemóvel */
  .hero { display: flex; align-items: flex-end; padding-top: 140px; padding-bottom: 40px; min-height: 85vh; }
  .hero::before {
    background: linear-gradient(to top, rgba(250, 247, 242, 0.95) 0%, rgba(250, 247, 242, 0.7) 50%, rgba(250, 247, 242, 0) 100%);
  }
  .hero-left { width: 100%; padding: 32px 20px; text-align: center; }
  .hero-title { font-size: 32px; }
  .hero-badge { bottom: 16px; right: 16px; padding: 12px 16px; }
  .hero-badge p { font-size: 10px; }
  .hero-badge strong { font-size: 20px; }
 
   .features-bar { grid-template-columns: 1fr; gap: 0; padding: 24px 20px; }
   .feature-item { justify-content: flex-start; padding: 0 0 20px 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
   .feature-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 24px; }
  .section-title { font-size: 28px; }

  /* Categorias Deslizantes (Swipe Magnético) */
  .cats-grid { 
    display: flex; 
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    gap: 12px; 
    padding-bottom: 20px; 
    margin: 0 -20px; /* Expande até à borda do vidro */
    padding-left: 20px;
    padding-right: 20px;
    -webkit-overflow-scrolling: touch;
  }
  .cat-card { flex: 0 0 75%; scroll-snap-align: center; aspect-ratio: 3/4; }

  /* Produtos */
  .prod-img { font-size: 40px; }
  .prod-info { padding: 12px 8px; }
  .prod-name { font-size: 13px; line-height: 1.4; white-space: normal; } /* Removemos o nowrap para o texto caber sem empurrar */
  .prod-price { font-size: 14px; }
  
  /* Filtros com Scroll */
  .filter-bar { 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    padding-bottom: 12px; 
    margin-bottom: 20px; 
    -webkit-overflow-scrolling: touch;
  }
  .filter-btn { flex-shrink: 0; }
  .search-bar { min-width: 200px; flex-shrink: 0; }

  .detail-imgs { padding: 0 20px 0 20px; }
  .sizes { gap: 8px; }
  .size-btn { width: auto; min-width: 44px; min-height: 44px; padding: 6px 12px; font-size: 12px; }
  
  /* Forçar as áreas de conteúdo a respeitar o limite no telemóvel e colar tabela às bordas */
  .admin-content, .account-content, .checkout-form-side { padding: 24px 16px; }
  .admin-table-wrap { margin: 0 -16px; width: calc(100% + 32px); max-width: none; border-left: none; border-right: none; border-radius: 0; }

  .stat-val { font-size: 24px; }
  
  /* Formulários / Autenticação */
  .auth-page { padding-top: 110px; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; gap: 16px; }
  
  /* Carrinho */
  .cart-item { padding: 16px 0; }
  
  /* Rodapé */
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 32px; padding-bottom: 0; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-desc { margin: 0 auto; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 12px; }
  
  /* Encomendas */
  .order-card { padding: 16px; margin-bottom: 12px; }
  .order-header { flex-direction: column; gap: 12px; }
  .order-header > div:last-child { align-items: flex-start; width: 100%; }
}

/* 4. Mini-Ajustes para Ecrãs Extra Pequenos (iPhone SE, etc) */
@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
  .nav-links { font-size: 11px; gap: 12px; }
  .filter-btn { padding: 8px 12px; font-size: 11px; }
  .cart-item { flex-direction: column; position: relative; }
  .cart-item-img { width: 100%; height: auto; aspect-ratio: 3/4; margin-bottom: 12px; }
  .cart-item-del { position: absolute; top: 16px; right: 0; background: white; padding: 6px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
  .products-grid { gap: 8px; }
  .prod-info { padding: 8px 4px; }
}