/* ═══════════════════════════════════════════════════════════════
   HP CALEIRAESTORE — Custom Styles
   Stack: Bootstrap 5 + CSS Custom Properties + Vanilla JS
   ═══════════════════════════════════════════════════════════════ */

/* ── Variáveis ─────────────────────────────────────────────────── */
:root {
  --hp-primary:       #C8B400;
  --hp-primary-dark:  #A09000;
  --hp-primary-light: #faf6d0;
  --hp-secondary:     #C8B400;
  --hp-dark:          #111111;
  --hp-gray-bg:       #f7f8fc;
  --hp-text:          #2c3345;
  --hp-muted:         #6c757d;
  --hp-border:        #e4e7ef;
  --hp-white:         #ffffff;
  --hp-transition:    .3s ease;
  --hp-radius:        8px;
  --hp-shadow:        0 4px 24px rgba(0,0,0,.08);
  --hp-shadow-hover:  0 8px 32px rgba(200,180,0,.22);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--hp-text);
  background: var(--hp-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--hp-primary); transition: color var(--hp-transition); }
a:hover { color: var(--hp-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--hp-dark);
}

/* ── Bootstrap overrides ───────────────────────────────────────── */
.btn-primary {
  background: var(--hp-primary);
  border-color: var(--hp-primary);
  font-weight: 600;
  letter-spacing: .02em;
  padding: .6rem 1.5rem;
  border-radius: var(--hp-radius);
  transition: all var(--hp-transition);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--hp-primary-dark);
  border-color: var(--hp-primary-dark);
  box-shadow: 0 4px 16px rgba(200,180,0,.4);
  transform: translateY(-1px);
}
.btn-outline-primary {
  border-color: var(--hp-primary);
  color: var(--hp-primary);
  font-weight: 600;
  border-radius: var(--hp-radius);
}
.btn-outline-primary:hover {
  background: var(--hp-primary);
  border-color: var(--hp-primary);
}
.btn-outline-light {
  border-width: 2px;
  font-weight: 600;
  border-radius: var(--hp-radius);
}

/* ── Header / Navbar ───────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
}
#mainNav {
  background: var(--nav-bg, #fff);
  transition: background var(--hp-transition), box-shadow var(--hp-transition);
}
#site-header.scrolled #mainNav {
  box-shadow: 0 2px 20px rgba(0,0,0,.12);
}

/* Páginas normais: espaço para o cabeçalho fixo (definido via JS) */
body:not(.page-home) #main-content {
  padding-top: var(--header-h, 80px);
}

/* Cabeçalho transparente na página inicial */
body.page-home #site-header:not(.scrolled) #mainNav {
  background: transparent;
}
body.page-home #site-header:not(.scrolled) #mainNav .nav-link {
  color: rgba(255,255,255,.9) !important;
}
body.page-home #site-header:not(.scrolled) #mainNav .nav-link:hover,
body.page-home #site-header:not(.scrolled) #mainNav .nav-link.active {
  color: #fff !important;
}
body.page-home #site-header:not(.scrolled) #mainNav .nav-link::after {
  background: #fff;
}
body.page-home #site-header:not(.scrolled) .brand-text {
  color: #fff;
}
body.page-home #site-header:not(.scrolled) .navbar-toggler {
  filter: invert(1) brightness(2);
  border-color: rgba(255,255,255,.4);
}
#mainNav .navbar-brand {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}
.brand-text {
  color: var(--hp-primary);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
#mainNav .nav-link {
  font-weight: 600;
  font-size: .9rem;
  color: var(--hp-text) !important;
  padding: .5rem .75rem;
  border-radius: 6px;
  position: relative;
  transition: color var(--hp-transition);
}
#mainNav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: .75rem; right: .75rem;
  height: 2px;
  background: var(--hp-primary);
  transform: scaleX(0);
  transition: transform var(--hp-transition);
  border-radius: 2px;
}
#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after { transform: scaleX(1); }
#mainNav .nav-link:hover { color: var(--hp-primary) !important; }
#mainNav .nav-link.active { color: var(--hp-primary) !important; }

/* ── Hero Slider ───────────────────────────────────────────────── */
#heroCarousel { min-height: 520px; }

.hero-slide {
  position: relative;
  min-height: 520px;
  background: var(--hp-dark) center/cover no-repeat;
  display: flex;
  align-items: center;
}
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,.85) 0%, rgba(200,180,0,.25) 100%);
}
.hero-slide .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero-badge {
  display: inline-block;
  background: rgba(200,180,0,.2);
  border: 1px solid rgba(200,180,0,.55);
  color: var(--hp-primary);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
  margin-bottom: .75rem;
}
.hero-content .hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 2rem;
}
.carousel-indicators [data-bs-target] {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: none;
  margin: 0 4px;
  transition: background var(--hp-transition), transform var(--hp-transition);
}
.carousel-indicators [data-bs-target].active {
  background: var(--hp-secondary);
  transform: scale(1.3);
}
.carousel-control-prev, .carousel-control-next {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  top: 50%; transform: translateY(-50%);
  opacity: 1;
  transition: background var(--hp-transition);
  border: 2px solid rgba(255,255,255,.3);
}
.carousel-control-prev { margin-left: 1.5rem; }
.carousel-control-next { margin-right: 1.5rem; }
.carousel-control-prev:hover,
.carousel-control-next:hover { background: rgba(255,255,255,.3); }
.carousel-control-prev-icon,
.carousel-control-next-icon { width: 18px; height: 18px; }

/* ── Page Banner (interior pages) ─────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, var(--hp-dark) 0%, var(--hp-primary) 100%);
  padding: 3.5rem 0;
  text-align: center;
  color: #fff;
}
.page-banner h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: .5rem;
}
.page-banner .breadcrumb {
  justify-content: center;
  margin: 0;
}
.page-banner .breadcrumb-item,
.page-banner .breadcrumb-item a,
.page-banner .breadcrumb-item.active {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
}
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ── Section helpers ───────────────────────────────────────────── */
.section-py { padding: 4.5rem 0; }
.section-py-sm { padding: 3rem 0; }
.section-bg { background: var(--hp-gray-bg); }

.section-label {
  display: inline-block;
  color: var(--hp-primary);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: .75rem;
  color: var(--hp-dark);
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--hp-muted);
  max-width: 600px;
}
.section-divider {
  width: 48px; height: 4px;
  background: var(--hp-primary);
  border-radius: 2px;
  margin: .75rem 0 1.5rem;
}
.section-divider.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Service Cards ─────────────────────────────────────────────── */
.service-card {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: all var(--hp-transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--hp-primary);
  transform: scaleX(0);
  transition: transform var(--hp-transition);
  transform-origin: left;
}
.service-card:hover { box-shadow: var(--hp-shadow-hover); transform: translateY(-4px); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px;
  background: var(--hp-primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background var(--hp-transition);
}
.service-card:hover .service-icon { background: var(--hp-primary); }
.service-icon svg { color: var(--hp-primary); width: 28px; height: 28px; transition: color var(--hp-transition); }
.service-card:hover .service-icon svg { color: #fff; }
.service-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.service-card p  { color: var(--hp-muted); font-size: .9rem; margin-bottom: 1.25rem; }
.service-card .btn-link {
  color: var(--hp-primary);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.service-card .btn-link:hover { color: var(--hp-primary-dark); gap: .55rem; }

/* ── Stats Section ─────────────────────────────────────────────── */
.stats-section {
  background: linear-gradient(135deg, #111111 0%, #222222 100%);
  padding: 3.5rem 0;
}
.stat-item { text-align: center; padding: 1rem; }
.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--hp-secondary);
  line-height: 1;
  margin-bottom: .4rem;
}
.stat-label {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  background: rgba(255,255,255,.15);
  margin: auto;
}

/* ── About Section ─────────────────────────────────────────────── */
.about-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--hp-shadow);
}
.about-img-wrap img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-badge {
  position: absolute;
  bottom: 1.5rem; left: 1.5rem;
  background: var(--hp-dark);
  color: var(--hp-primary);
  padding: .75rem 1.25rem;
  border-radius: var(--hp-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.3;
}
.about-badge span { display: block; font-size: .75rem; font-weight: 400; opacity: .85; }
.check-list { list-style: none; padding: 0; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .4rem 0;
  font-size: .95rem;
}
.check-list li::before {
  content: '';
  flex-shrink: 0;
  width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23C8B400'/%3E%3Cpath d='M3.5 8l3 3 6-6' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  margin-top: .15rem;
}

/* ── CTA Section ───────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
  padding: 4rem 0;
  text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: .75rem; }
.cta-section p  { color: rgba(255,255,255,.85); margin-bottom: 1.75rem; font-size: 1.05rem; }

/* ── Feature / Detail Blocks ───────────────────────────────────── */
.feature-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  transition: all var(--hp-transition);
  height: 100%;
}
.feature-block:hover { box-shadow: var(--hp-shadow); border-color: var(--hp-primary); }
.feature-block-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--hp-primary-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.feature-block-icon svg { color: var(--hp-primary); }
.feature-block h5 { font-size: .95rem; margin-bottom: .25rem; }
.feature-block p  { font-size: .85rem; color: var(--hp-muted); margin: 0; }

/* ── Product Tabs (Estores) ────────────────────────────────────── */
.product-tab {
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  padding: 2rem;
  background: var(--hp-white);
  height: 100%;
}
.product-tab h3 {
  font-size: 1.25rem;
  color: var(--hp-primary);
  border-bottom: 2px solid var(--hp-primary-light);
  padding-bottom: .75rem;
  margin-bottom: 1.25rem;
}
.product-tab ul { list-style: none; padding: 0; }
.product-tab ul li {
  padding: .5rem 0;
  border-bottom: 1px solid var(--hp-border);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.product-tab ul li:last-child { border-bottom: none; }
.product-tab ul li::before {
  content: '✓';
  color: var(--hp-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Gallery Grid ──────────────────────────────────────────────── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.gallery-filter-btn {
  padding: .4rem 1rem;
  border: 1px solid var(--hp-border);
  background: var(--hp-white);
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--hp-muted);
  cursor: pointer;
  transition: all var(--hp-transition);
}
.gallery-filter-btn:hover,
.gallery-filter-btn.active {
  background: var(--hp-primary);
  border-color: var(--hp-primary);
  color: #fff;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--hp-radius);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--hp-border);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--hp-transition);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span {
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
}

/* ── Lightbox ──────────────────────────────────────────────────── */
#hp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#hp-lightbox.open { display: flex; }
#hp-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background var(--hp-transition);
}
.lb-close {
  top: 1rem; right: 1rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.lb-prev, .lb-next {
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 60px;
  border-radius: 4px;
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.28); }

/* ── Contact ───────────────────────────────────────────────────── */
.contact-info-card {
  background: var(--hp-primary);
  border-radius: 16px;
  padding: 2.5rem;
  color: #fff;
  height: 100%;
}
.contact-info-card h3 { color: #fff; margin-bottom: 1.75rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-item-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.contact-item-icon svg { color: var(--hp-secondary); }
.contact-item a { color: rgba(255,255,255,.9); text-decoration: none; }
.contact-item a:hover { color: var(--hp-secondary); }
.contact-item p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.85); }
.contact-item strong { display: block; color: #fff; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .2rem; }

.contact-form-card {
  background: var(--hp-white);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--hp-shadow);
}
.form-control, .form-select {
  border-color: var(--hp-border);
  border-radius: var(--hp-radius);
  padding: .65rem 1rem;
  font-size: .92rem;
  color: var(--hp-text);
  transition: border-color var(--hp-transition), box-shadow var(--hp-transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--hp-primary);
  box-shadow: 0 0 0 .2rem rgba(200,180,0,.2);
}
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .4rem; }
.invalid-feedback { font-size: .82rem; }
.form-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: var(--hp-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ── Legal Pages ───────────────────────────────────────────────── */
.legal-content h3 { font-size: 1.15rem; margin-top: 1.75rem; margin-bottom: .6rem; }
.legal-content p, .legal-content li { color: var(--hp-muted); font-size: .95rem; }
.legal-content a { color: var(--hp-primary); }

/* ── 404 ───────────────────────────────────────────────────────── */
.page-404-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
}
.error-number {
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 900;
  color: var(--hp-primary-light);
  line-height: 1;
}

/* ── Footer ────────────────────────────────────────────────────── */
.footer-heading {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-content {
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  line-height: 1.7;
}
.footer-content a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color var(--hp-transition);
}
.footer-content a:hover { color: var(--hp-secondary); }
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .88rem;
  transition: color var(--hp-transition);
}
.footer-links a:hover { color: var(--hp-secondary); }
.reclamacoes-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  padding: .6rem 1rem;
  border-radius: var(--hp-radius);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--hp-transition);
}
.reclamacoes-btn:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}
.footer-note {
  color: rgba(255,255,255,.4);
  font-size: .75rem;
}
.footer-bar {
  background: rgba(0,0,0,.2);
  padding: 1rem 0;
  margin-top: 2rem;
  text-align: center;
}
.footer-bar p { color: rgba(255,255,255,.45); font-size: .82rem; }

/* ── Lazy loading fade-in ──────────────────────────────────────── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity .4s ease;
}
img[loading="lazy"].loaded { opacity: 1; }

/* ── Scroll top button ─────────────────────────────────────────── */
#scrollTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  background: var(--hp-dark);
  color: var(--hp-primary);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--hp-transition);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
}
#scrollTop.visible { opacity: 1; transform: translateY(0); }
#scrollTop:hover { background: #222; transform: translateY(-2px); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .hero-slide { min-height: 380px; }
  #heroCarousel { min-height: 380px; }
  .hero-content h1 { font-size: 1.75rem; }
  .section-py { padding: 3rem 0; }
  .contact-info-card, .contact-form-card { padding: 1.75rem; }
  .stats-section { text-align: center; }
  .stat-divider { display: none; }
  .carousel-control-prev, .carousel-control-next { display: none; }
}
