/* Premium UI Components para A Colegial Niterói */

/* Hero Section */
.hero-premium {
  position: relative;
  background-color: var(--color-primary-dark);
  padding: 120px 0 160px;
  overflow: hidden;
  color: var(--color-surface);
  text-align: center;
}

/* Visibilidade Padrão dos Carrosséis (Desktop first) */
.carousel-mobile {
  display: none;
}
.carousel-desktop {
  display: block;
}

/* Slides do Carrossel de Fundo (Desktop) */
.hero-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0;
  animation: bgCrossfade 30s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.slide-1 {
  animation-delay: 0s;
}

.hero-slide.slide-2 {
  animation-delay: 6s;
}

.hero-slide.slide-3 {
  animation-delay: 12s;
}

.hero-slide.slide-4 {
  animation-delay: 18s;
}

.hero-slide.slide-5 {
  animation-delay: 24s;
}

@keyframes bgCrossfade {
  0% { opacity: 0; transform: scale(1.05); }
  4% { opacity: 1; transform: scale(1); }
  20% { opacity: 1; transform: scale(1); }
  24% { opacity: 0; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.05); }
}

/* Slides do Carrossel de Fundo (Mobile) */
.hero-slide-mobile {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Centralizado no topo para focar nas crianças e dar espaço para o texto embaixo */
  background-position: center top; 
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0;
  animation: bgCrossfadeMobile 18s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide-mobile.mslide-1 { animation-delay: 0s; }
.hero-slide-mobile.mslide-2 { animation-delay: 6s; }
.hero-slide-mobile.mslide-3 { animation-delay: 12s; }

@keyframes bgCrossfadeMobile {
  0% { opacity: 0; transform: scale(1.05); }
  6.66% { opacity: 1; transform: scale(1); }
  33.33% { opacity: 1; transform: scale(1); }
  40% { opacity: 0; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.05); }
}

/* Camada de escurecimento (overlay) para o texto ficar legível em cima da foto */
.hero-bg-overlay {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Gradiente escuro para azul da marca, garantindo leitura */
  background: linear-gradient(135deg, rgba(0, 31, 58, 0.9) 0%, rgba(0, 59, 109, 0.75) 100%);
  z-index: 1;
}

.hero-premium::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(111, 168, 220, 0.15) 0%, transparent 50%);
  animation: rotateGlow 20s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--color-surface);
  margin-bottom: 24px;
  letter-spacing: -1px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-btn {
  box-shadow: 0 10px 20px -5px rgba(0,0,0,0.3);
}

/* Guided Journey Wrapper */
.guided-journey-wrapper {
  max-width: 900px;
  margin: -60px auto 100px;
  position: relative;
  z-index: 10;
}

/* Glassmorphism Card */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  padding: 40px;
  transition: var(--transition-smooth);
}

/* Steps Progress */
.gj-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.gj-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: #E5E7EB;
  z-index: 1;
  transform: translateY(-50%);
}

.gj-step-indicator {
  position: relative;
  z-index: 2;
  background: var(--color-surface);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-text-muted);
  border: 2px solid #E5E7EB;
  transition: var(--transition-smooth);
}

.gj-step-indicator.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-surface);
  box-shadow: 0 0 0 4px rgba(0, 59, 109, 0.1);
}

.gj-step-indicator.completed {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Option Cards (Série, Gênero) */
.gj-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.gj-option-card {
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--color-surface);
}

.gj-option-card:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.gj-option-card.selected {
  border-color: var(--color-primary);
  background: rgba(0, 59, 109, 0.03);
}

.gj-option-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

.gj-option-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Kit Configuration (Products List) */
.gj-kit-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gj-product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-sm);
  background: #FAFAFA;
}

@media (max-width: 900px) {
  .carousel-desktop {
    display: none;
  }
  .carousel-mobile {
    display: block;
  }
  
  .hero-premium {
    padding: 240px 0 80px; /* Mais espaço no topo para não cobrir o rosto das crianças nas fotos quadradas */
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
    padding-top: 20px;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
}

@media (max-width: 600px) {
  .gj-product-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.gj-product-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gj-product-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: #EEE;
  object-fit: cover;
}

.gj-product-name {
  font-weight: 600;
  color: var(--color-text-main);
}

.gj-product-price {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Size Selectors */
.gj-size-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gj-size-btn {
  min-width: 40px;
  width: auto;
  padding: 0 12px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid #D1D5DB;
  background: var(--color-surface);
  color: var(--color-text-main);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.gj-size-btn.selected {
  background: var(--color-primary);
  color: var(--color-surface);
  border-color: var(--color-primary);
}

/* Actions */
.gj-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #E5E7EB;
}

.btn {
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid #D1D5DB;
}

.btn-secondary:hover {
  background: #F3F4F6;
  color: var(--color-text-main);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-surface);
  box-shadow: 0 4px 14px rgba(0, 59, 109, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 59, 109, 0.4);
}

.btn-accent {
  background: var(--color-secondary);
  color: var(--color-primary-dark);
  box-shadow: 0 4px 14px rgba(111, 168, 220, 0.4);
}

.btn-accent:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Formulário da Etapa 4 */
.gj-form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 15px;
  text-align: left;
}
.gj-col-12 { grid-column: span 12; }
.gj-col-8 { grid-column: span 8; }
.gj-col-6 { grid-column: span 6; }
.gj-col-4 { grid-column: span 4; }

.gj-form-group {
  display: flex;
  flex-direction: column;
}
.gj-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-main);
}
.gj-form-group input, .gj-form-group textarea {
  padding: 12px 14px;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: var(--transition-fast);
  background: #fff;
}
.gj-form-group input:focus, .gj-form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 59, 109, 0.1);
}
@media (max-width: 600px) {
  .gj-col-8, .gj-col-6, .gj-col-4 { grid-column: span 12; }
}

/* Barra de Frete Grátis */
.gj-shipping-bar-wrapper {
  background: #F8F9FF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.gj-shipping-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--color-text-main);
}

.gj-shipping-value-tag {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  white-space: nowrap;
}

.gj-shipping-bar-track {
  width: 100%;
  height: 10px;
  background: #E5E7EB;
  border-radius: 99px;
  overflow: hidden;
}

.gj-shipping-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-secondary));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
}

/* Seletor de Quantidade */
.gj-qty-wrapper {
  animation: fadeIn 0.3s ease;
}

.gj-qty-btn {
  background: #F3F4F6;
  border: none;
  color: #4B5563;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.gj-qty-btn:hover {
  background: #E5E7EB;
  color: var(--color-primary);
}

.gj-qty-input {
  width: 40px;
  height: 32px;
  border: none;
  border-left: 1px solid #E5E7EB;
  border-right: 1px solid #E5E7EB;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-main);
  background: transparent;
  padding: 0;
}

/* Remover setas do input number */
.gj-qty-input::-webkit-outer-spin-button,
.gj-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.gj-qty-input[type=number] {
  -moz-appearance: textfield;
}

/* Loader */

.gj-loader {
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top: 3px solid #FFF;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: none;
}
.loading .gj-loader {
  display: inline-block;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Fade transitions for JS views */
.gj-view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.gj-view.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal de Produto */
.gj-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gj-modal-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.gj-modal-content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.gj-modal-close {
  position: absolute;
  top: 15px; right: 15px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #F3F4F6;
  border: none;
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: 0.2s;
  color: #4B5563;
}
.gj-modal-close:hover {
  background: #E5E7EB; color: #ef4444;
}
.gj-modal-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}
@media (min-width: 768px) {
  .gj-modal-body { flex-direction: row; overflow: hidden; }
}
/* Wrapper do carrossel (carrossel + dots) */
.gj-modal-carousel-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #F9FAFB;
}
@media (min-width: 768px) {
  .gj-modal-carousel-wrapper { width: 50%; flex-shrink: 0; max-height: 600px; }
}
.gj-modal-carousel {
  width: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.gj-modal-carousel::-webkit-scrollbar { display: none; }

/* Dots indicadores */
.gj-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  background: #F9FAFB;
}
.gj-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #D1D5DB;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s;
}
.gj-dot.active {
  background: var(--color-primary);
  width: 22px;
  border-radius: 4px;
}
.gj-modal-carousel img {
  min-width: 100%;
  width: 100%;
  height: 320px;
  object-fit: cover;
  scroll-snap-align: start;
  flex-shrink: 0;
  display: block;
}
@media (min-width: 768px) {
  .gj-modal-carousel img { height: 400px; }
}
.gj-modal-info {
  padding: 30px;
  display: flex;
  flex-direction: column;
  width: 100%;
}
@media (min-width: 768px) {
  .gj-modal-info { width: 50%; overflow-y: auto; max-height: 600px; }
}
.gj-modal-info h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--color-text-main);
  font-weight: 700;
  line-height: 1.2;
}
.gj-modal-price {
  font-size: 1.2rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E5E7EB;
}
.gj-modal-desc-scroll {
  color: var(--color-text-main);
  font-size: 0.95rem;
  line-height: 1.6;
}
.gj-modal-desc-scroll p { margin-bottom: 12px; }
.gj-modal-desc-scroll ul { padding-left: 20px; margin-bottom: 12px; }

/* ─────────────────────────────────────────────
   SHOP PAGE (Vitrine)
──────────────────────────────────────────── */
.ac-shop-wrapper {
  background: var(--color-background);
  min-height: 80vh;
  padding-bottom: 80px;
}

.ac-shop-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ac-shop-hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(111, 168, 220, 0.08) 0%, transparent 60%);
  animation: rotateGlow 25s linear infinite;
  pointer-events: none;
}
.ac-shop-hero-inner {
  position: relative;
  z-index: 10;
}
.ac-shop-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -1px;
}
.ac-shop-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
}

.ac-shop-container {
  max-width: 1200px;
  margin: -40px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 20;
}

/* Remover bullets da ul de produtos do WC e forçar Grid */
.woocommerce ul.products, 
ul.products {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 24px !important;
}

/* Resetar o LI (card do produto) para não usar a largura/float padrão do WooCommerce */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .woocommerce ul.products, 
  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
  .ac-shop-container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .woocommerce ul.products, 
  ul.products {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}

/* Barra do topo da loja (Filtros e contagem) */
.woocommerce-notices-wrapper { width: 100%; margin-bottom: 20px; }
.woocommerce-result-count {
  float: left;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: 20px;
  background: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}
.woocommerce-ordering {
  float: right;
  margin-bottom: 20px;
}
.woocommerce-ordering select {
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--color-primary);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
}

/* Limpar floats */
.ac-shop-container::after {
  content: "";
  display: table;
  clear: both;
}

/* Card de Produto Premium */
.ac-product-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  border: 1px solid rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
}
.ac-product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.ac-product-image-wrap {
  width: 100%;
  height: 240px;
  background: #F3F4F6;
  overflow: hidden;
}
.ac-product-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.ac-product-card:hover .ac-product-img {
  transform: scale(1.05);
}

.ac-product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ac-product-title {
  font-size: 1.1rem;
  color: var(--color-text-main);
  margin-bottom: 12px;
  font-weight: 600;
}

.ac-product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
}
.ac-product-price del {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-right: 8px;
}
.ac-product-price ins {
  text-decoration: none;
}

.ac-btn-shop {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(0, 59, 109, 0.05);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-fast);
}
.ac-btn-shop:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Paginação da Loja */
.woocommerce-pagination {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.woocommerce-pagination ul {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-main);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s;
}
.woocommerce-pagination ul li a:hover {
  background: rgba(0,59,109,0.05);
  color: var(--color-primary);
}
.woocommerce-pagination ul li span.current {
  background: var(--color-primary);
  color: #fff;
}
