/*
Theme Name: Luxphone
Theme URI: https://luxphone.pt
Description: Tema oficial Luxphone — iPhones recondicionados.
Version: 1.2
Author: Luxphone
Text Domain: luxphone
*/

/* =============================================
   VARIÁVEIS (valores exatos do Shopify)
   ============================================= */
:root {
  --teal:         #10b981;
  --teal-dark:    #059669;
  --navy:         #0d1f2d;
  --navy-2:       #1b3a52;
  --navy-card:    #112436;
  --light-mint:   #f0fdf9;
  --white:        #ffffff;
  --text:         #374151;
  --text-heading: #0d1f2d;
  --text-muted:   #6b7280;
  --border:       #e5e7eb;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 20px rgba(0,0,0,0.08);
  --shadow-md:    0 8px 30px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 15px;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.site-logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-heading);
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--teal); }

.header-search { position: relative; flex-shrink: 0; }
.header-search input {
  background: #F3F4F6;
  border: none;
  border-radius: 24px;
  padding: 8px 16px 8px 36px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  width: 190px;
  outline: none;
  color: var(--text);
  transition: width 0.3s, background 0.2s;
}
.header-search input:focus { width: 220px; background: #E9EAEC; }
.header-search input::placeholder { color: var(--text-muted); }
.header-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.header-icons { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-icons a {
  color: var(--text-heading);
  display: flex;
  align-items: center;
  position: relative;
  transition: color 0.2s;
}
.header-icons a:hover { color: var(--teal); }
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--teal);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  background: linear-gradient(165deg, #10b981 0%, #0a7a57 45%, #0d1f2d 100%);
  padding: 96px 24px;
  text-align: center;
  color: var(--white);
}
.hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  margin-bottom: 32px;
  opacity: 0.95;
}
.hero-price { font-weight: 700; }
.hero-stars { color: #FFD700; letter-spacing: 1px; }
.hero-rating { font-size: 14px; opacity: 0.85; }

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}
.btn-hero:hover { background: var(--navy-2); transform: translateY(-1px); }

/* =============================================
   TRUST BAR
   ============================================= */
.trust-bar { background: var(--navy); padding: 14px 24px; }
.trust-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 24px;
}
.trust-item + .trust-item { border-left: 1px solid rgba(255,255,255,0.12); }
.trust-item svg { color: var(--teal); flex-shrink: 0; }

/* =============================================
   NOVIDADES
   ============================================= */
.section-novidades { padding: 60px 24px; background: var(--white); }
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}
.section-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.ver-tudo {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
  transition: opacity 0.2s;
}
.ver-tudo:hover { opacity: 0.75; }

/* WooCommerce product grid */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
}
.woocommerce ul.products li.product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  width: auto !important;
  margin: 0 !important;
  float: none !important;
}
.woocommerce ul.products li.product:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.woocommerce ul.products li.product img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px 4px;
  color: var(--text-heading);
}
.woocommerce ul.products li.product .price {
  padding: 0 16px 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
}
.woocommerce ul.products li.product .button { display: none; }/* overridden below */

/* =============================================
   TRANSPARÊNCIA TOTAL
   ============================================= */
.section-transparencia { background: var(--navy); padding: 80px 24px; text-align: center; }
.section-transparencia .section-title {
  color: var(--white);
  font-size: 34px;
  margin-bottom: 12px;
}
.section-transparencia .section-title .highlight { color: var(--teal); }
.section-transparencia .section-desc {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto 48px;
  line-height: 1.7;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px;
  text-align: left;
}
.feature-icon {
  width: 42px; height: 42px;
  background: rgba(16,185,129,0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--teal);
}
.feature-card h3 { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.65; }

/* =============================================
   REVIEWS
   ============================================= */
.section-reviews { background: var(--light-mint); padding: 80px 24px; text-align: center; }
.section-reviews .section-title { font-size: 32px; margin-bottom: 8px; }
.section-reviews .stars-summary { color: #FFD700; font-size: 17px; margin-bottom: 48px; }
.section-reviews .stars-summary span { color: var(--text-muted); font-size: 14px; margin-left: 6px; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
  box-shadow: var(--shadow);
}
.review-stars { color: #10b981; font-size: 15px; margin-bottom: 12px; }
.review-text { font-size: 14px; color: var(--text); line-height: 1.65; margin-bottom: 16px; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.review-author-info .name { font-size: 13px; font-weight: 600; color: var(--text-heading); }
.review-author-info .product { font-size: 12px; color: var(--text-muted); }

/* =============================================
   COMO FUNCIONA
   ============================================= */
.section-como-funciona { background: var(--white); padding: 80px 24px; text-align: center; }
.section-como-funciona .section-title { font-size: 32px; margin-bottom: 48px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
}
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 15px; font-weight: 700; color: var(--text-heading); margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--navy); padding: 56px 24px 0; color: rgba(255,255,255,0.65); }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-brand .site-logo { color: var(--white); font-size: 19px; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 13px; line-height: 1.7; max-width: 210px; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
}
.social-links a:hover { border-color: var(--teal); color: var(--teal); }
.footer-col h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 18px 0;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 12px; }
.payment-icons { display: flex; align-items: center; gap: 6px; }
.payment-icon {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
}

/* =============================================
   WOOCOMMERCE GLOBAL
   ============================================= */
.woocommerce .woocommerce-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.woocommerce .woocommerce-breadcrumb a { color: var(--teal); }

.woocommerce div.product .product_title {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-size: 26px;
  font-weight: 800;
  color: var(--teal);
}
.woocommerce .single_add_to_cart_button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--teal) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 13px 26px !important;
  transition: background 0.2s !important;
  cursor: pointer !important;
}
.woocommerce .single_add_to_cart_button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { background: var(--teal-dark) !important; }

.woocommerce div.product .variations select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
}
.woocommerce div.product .variations select:focus { border-color: var(--teal); }

.woocommerce-page-wrapper { max-width: 1100px; margin: 48px auto; padding: 0 24px; }
.page-content { max-width: 1100px; margin: 48px auto; padding: 0 24px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .header-search input { width: 130px; }
  .trust-item + .trust-item { border-left: none; }
  .trust-bar-inner { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}


/* =============================================
   SHOP PAGE — MELHORIAS
   ============================================= */

/* Esconder título padrão "Loja" */
.woocommerce-shop .page-title,
.woocommerce-shop h1.entry-title,
.woocommerce-products-header__title { display: none !important; }

/* Banner da loja */
.shop-banner {
  background: linear-gradient(135deg, #0d1f2d 0%, #1b3a52 100%);
  padding: 44px 24px 40px;
  text-align: center;
  color: var(--white);
}
.shop-banner h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 32px; font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.shop-banner p { font-size: 15px; color: rgba(255,255,255,0.6); }

/* Ordenação */
.woocommerce-ordering select {
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  color: var(--text-heading) !important;
  background: var(--white) !important;
  outline: none !important;
}
.woocommerce-result-count { font-size: 13px; color: var(--text-muted); margin-bottom: 20px !important; }

/* Product cards — corrigir width fixo do WooCommerce JS */
.woocommerce ul.products li.product { width: auto !important; float: none !important; }

/* Imagem */
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
  display: block; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.woocommerce ul.products li.product a img {
  width: 100% !important; aspect-ratio: 1/1; object-fit: cover;
  transition: transform 0.3s;
}
.woocommerce ul.products li.product:hover a img { transform: scale(1.04); }

/* Nome e preço */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px !important; font-weight: 700 !important;
  padding: 14px 16px 4px !important; color: var(--text-heading) !important;
}
.woocommerce ul.products li.product .price {
  display: block; padding: 0 16px 10px !important;
  font-size: 14px !important; font-weight: 600 !important; color: var(--teal) !important;
}

/* Botão */
.woocommerce ul.products li.product .button {
  display: block !important;
  margin: 0 16px 16px !important;
  width: calc(100% - 32px) !important;
  text-align: center !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  background: var(--navy) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.woocommerce ul.products li.product .button:hover { background: var(--teal) !important; }

/* Paginação */
.woocommerce-pagination { margin-top: 40px; text-align: center; }
.woocommerce-pagination ul { display: inline-flex !important; gap: 6px; list-style: none !important; padding: 0 !important; }
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--text-heading); transition: all 0.2s;
}
.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li span.current {
  background: var(--teal); border-color: var(--teal); color: var(--white);
}

/* Produto singular */
.woocommerce div.product .woocommerce-product-gallery img { border-radius: var(--radius); }
.woocommerce div.product form.cart .variations label { font-size: 13px; font-weight: 600; color: var(--text-heading); }
.woocommerce div.product .woocommerce-product-details__short-description { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* Carrinho / Checkout */
.woocommerce table.shop_table { border: 1px solid var(--border) !important; border-radius: var(--radius) !important; overflow: hidden; }
.woocommerce table.shop_table th { background: var(--light-mint) !important; color: var(--text-heading) !important; font-size: 13px !important; font-weight: 600 !important; padding: 12px 16px !important; }
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
  background: var(--teal) !important; border-radius: 10px !important;
  font-size: 16px !important; font-weight: 700 !important; padding: 16px !important;
}

/* ─── CRITICAL OVERRIDES ─────────────────────────────────────────────── */

/* Banner: fundo navy, quebra fora do container */
.shop-banner {
  background: linear-gradient(135deg, #0d1f2d 0%, #1b3a52 100%) !important;
  margin: -48px -24px 32px !important;
  padding: 44px 24px !important;
}

/* Produto sem stock: mostrar botão "Ver produto" na mesma */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product.outofstock .button,
.woocommerce ul.products li.outofstock a.button {
  display: block !important;
  margin: 0 16px 16px !important;
  width: calc(100% - 32px) !important;
  text-align: center !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  background: #0d1f2d !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
  box-sizing: border-box !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product.outofstock .button:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}

/* Corrigir width fixo imposto pelo WooCommerce JS */
.woocommerce ul.products li.product[style*="width"] {
  width: auto !important;
}
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
}
@media (max-width: 900px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 500px) {
  .woocommerce ul.products { grid-template-columns: 1fr !important; }
}
