/* ============================================================
   assets/css/style.css
   Catálogo de Roupas Plus Size — Dark Theme Mobile First
   ============================================================ */

/* ─── Variáveis (override via PHP inline style) ─────────── */
:root {
  --primary:       #e91e8c;
  --primary-dark:  #c2185b;
  --secondary:     #1a1a2e;
  --bg:            #0f0f1a;
  --card-bg:       #16213e;
  --card-border:   #2a2a4a;
  --text:          #f0f0f0;
  --text-muted:    #8a8aaa;
  --input-bg:      #1e1e3a;
  --input-border:  #3a3a5c;
  --radius:        14px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
}

/* ─── Reset / Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.dark-theme {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ─── Navbar Desktop ────────────────────────────────────── */
#mainNavbar {
  background: var(--secondary) !important;
  border-bottom: 1px solid var(--card-border);
  padding: 12px 0;
}

.text-primary-custom { color: var(--primary) !important; }

.nav-link-custom {
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.nav-link-custom:hover { color: var(--primary); }

.search-form { gap: 0; }
.search-input {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text);
  border-radius: var(--radius-sm) !important;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  background: var(--input-bg);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.2);
}

/* ─── Topbar Mobile ─────────────────────────────────────── */
.mobile-topbar {
  background: var(--secondary);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand-mobile {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}
.brand-mobile i { color: var(--primary); }
.icon-btn {
  color: var(--text);
  font-size: 1.2rem;
  position: relative;
}
.icon-btn:hover { color: var(--primary); }

/* ─── Carrinho — badge ──────────────────────────────────── */
.cart-icon { position: relative; }
.cart-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
.cart-badge-bottom {
  position: absolute;
  top: 2px; right: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Botões ────────────────────────────────────────────── */
.btn-primary-custom {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.2s;
}
.btn-primary-custom:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline-primary-custom {
  border-color: var(--primary);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.btn-outline-primary-custom:hover {
  background: var(--primary);
  color: #fff;
}
.btn-whatsapp {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.btn-whatsapp:hover {
  background: #128C7E;
  border-color: #128C7E;
  color: #fff;
}

/* ─── Categorias scroll ─────────────────────────────────── */
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  white-space: nowrap;
  font-size: 0.85rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Section title ─────────────────────────────────────── */
.section-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  position: relative;
  padding-left: 12px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

/* ─── Grade de produtos ─────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(5, 1fr); } }

/* ─── Card de produto ───────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.product-card-link {
  display: block;
  color: inherit;
}
.product-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.product-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .product-card-img { transform: scale(1.05); }

.product-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.badge-sale { background: #e91e8c; color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge-new  { background: #00bcd4; color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge-sold-out { background: #333; color: #fff; font-size: 0.65rem; padding: 2px 8px; border-radius: 999px; }

.product-card-body { padding: 10px; }
.product-name {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-old {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: line-through;
  display: block;
}
.price-new {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}
.product-price-wrap { display: flex; flex-direction: column; }

/* Botão adicionar rápido */
.btn-add-cart-quick {
  position: absolute;
  bottom: 52px; right: 8px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(233,30,140,0.4);
  transition: transform 0.2s;
  cursor: pointer;
}
.btn-add-cart-quick:hover { transform: scale(1.1); background: var(--primary-dark); }

/* ─── Filtro tags ───────────────────────────────────────── */
.filter-tag {
  padding: 4px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.filter-tag.active, .filter-tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Banner ────────────────────────────────────────────── */
.banner-img {
  height: 200px;
  object-fit: cover;
}
@media (min-width: 768px) { .banner-img { height: 380px; } }
.banner-caption {
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  text-align: left;
  padding: 30px;
}
.banner-title { font-size: 1.8rem; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.banner-subtitle { font-size: 1rem; opacity: 0.9; }

/* ─── Página de produto ─────────────────────────────────── */
.product-title { color: var(--text); font-weight: 800; }
.price-block { padding: 12px 0; }
.price-original { font-size: 0.95rem; }
.price-sale { color: var(--primary); }
.discount-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
.main-product-img {
  aspect-ratio: 3/4;
  object-fit: cover;
  max-height: 500px;
  width: 100%;
}
.thumb-img {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--card-border);
  cursor: pointer;
  transition: border-color 0.2s;
}
.thumb-img.active, .thumb-img:hover { border-color: var(--primary); }

.size-options { flex-wrap: wrap; }
.size-label { cursor: pointer; }
.size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s;
}
.size-label input:checked + .size-btn {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.color-options { flex-wrap: wrap; }
.color-label { cursor: pointer; text-align: center; }
.color-dot {
  display: block;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 3px solid var(--card-border);
  margin: 0 auto 2px;
  transition: border-color 0.15s, transform 0.15s;
}
.color-label input:checked + .color-dot {
  border-color: var(--primary);
  transform: scale(1.2);
}
.color-name-label { font-size: 0.7rem; color: var(--text-muted); }

.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-input {
  width: 56px !important;
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text);
  text-align: center;
}
.qty-input:focus { background: var(--input-bg); color: var(--text); border-color: var(--primary); box-shadow: none; }

/* ─── Carrinho ──────────────────────────────────────────── */
.cart-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}
.cart-item-img { width: 80px; height: 80px; object-fit: cover; }
.qty-btn-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-display { min-width: 24px; text-align: center; font-weight: 600; }
.coupon-box { background: var(--card-bg); border: 1px solid var(--card-border); }
.order-summary {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  position: sticky;
  top: 80px;
}

/* ─── Auth ──────────────────────────────────────────────── */
.auth-box, .checkout-auth-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}
.form-control-dark {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text);
  border-radius: var(--radius-sm);
}
.form-control-dark:focus {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.2);
}
.form-select-dark {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text);
}
.form-select-dark:focus {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.2);
}
.nav-tabs-dark { border-color: var(--card-border); }
.nav-tabs-dark .nav-link { color: var(--text-muted); border: none; padding: 10px 20px; }
.nav-tabs-dark .nav-link.active {
  color: var(--primary);
  background: none;
  border-bottom: 2px solid var(--primary);
}

/* ─── Pedidos ───────────────────────────────────────────── */
.order-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

/* ─── Offcanvas dark ────────────────────────────────────── */
.dark-offcanvas {
  background: var(--secondary);
  color: var(--text);
}
.size-filter-label { cursor: pointer; }
.size-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 32px;
  padding: 0 8px;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.8rem;
}
.size-filter-label input:checked + .size-pill {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ─── Rodapé ────────────────────────────────────────────── */
.site-footer {
  background: var(--secondary);
  border-top: 1px solid var(--card-border);
  margin-top: 32px;
}
.footer-link { color: var(--text-muted); font-size: 0.85rem; }
.footer-link:hover { color: var(--primary); }

/* ─── Barra navegação mobile ────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--secondary);
  border-top: 1px solid var(--card-border);
  z-index: 1000;
  padding: 6px 0 2px;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.65rem;
  padding: 4px 0;
  gap: 2px;
  text-decoration: none;
  position: relative;
}
.bottom-nav-item i { font-size: 1.3rem; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item:hover  { color: var(--primary); }

/* ─── WhatsApp float ────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 24px;
  width: 56px; height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  font-size: 1.6rem;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  z-index: 999;
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }

/* ─── Breadcrumb ────────────────────────────────────────── */
.breadcrumb-dark { background: none; }
.breadcrumb-dark .breadcrumb-item a { color: var(--text-muted); font-size: 0.82rem; }
.breadcrumb-dark .breadcrumb-item.active { color: var(--text); font-size: 0.82rem; }
.breadcrumb-dark .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ─── Empty state ───────────────────────────────────────── */
.empty-state { color: var(--text-muted); }

/* ─── Toast feedback ────────────────────────────────────── */
#cartToast {
  position: fixed;
  bottom: 80px; right: 16px;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600;
  box-shadow: var(--shadow);
  display: none;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ─── Padding bottom mobile ─────────────────────────────── */
@media (max-width: 767px) {
  .main-content { padding-bottom: 70px; }
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
