/* Custom CSS for Rubet Atelier */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500&display=swap');

body {
    box-sizing: border-box;
    font-family: 'Oswald', sans-serif; /* Fonte minimalista e alongada */
}

/* ===== ANIMAÇÕES BASE ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== DELAYS ESCALONADOS ===== */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ===== ANIMAÇÕES DE NAVEGAÇÃO ===== */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
    transform: translateY(0);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Banner Home */
.home-banner {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    
    background-image:
        linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)),
        url('/img/banner-16x9.jpg');
    background-size: 100% 100%, cover;
    background-position: 0 0, 50% 0%;
    background-repeat: no-repeat, no-repeat;

    position: relative;
    overflow: hidden;
}

@media (max-width: 1024px) { .home-banner { background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('/img/banner-4x5.jpg'); } }
@media (max-width: 640px)  { .home-banner { background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('/img/banner-9x16.jpg'); } }

/* Fundo escuro semi-transparente atrás do texto */
.banner-content {
    padding: 2rem 1.5rem;
    border-radius: 0.5rem;
    max-width: 800px;
}

@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@500;700&family=Saira:wght@400;500&display=swap');
/* Texto */
.banner-content p {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.4;
    margin-bottom: 1.5rem;
    font-family: 'Saira Condensed', sans-serif;
    font-weight: 200;
}

/* Botão */
.banner-content button {
    background-color: #000;
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.banner-content button:hover {
    background-color: #333;
}

/* Nota inferior */
.banner-note {
    margin-top: 2rem;
    font-size: 1rem;
    font-style: italic;
    color: #e0d8d0;
}

/* ===== ANIMAÇÕES DOS CARDS DE PRODUTOS ===== */
.product-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card img {
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* ===== ANIMAÇÕES DOS BOTÕES ===== */
button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Oswald', sans-serif;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* COR DO BOTÃO PAGBANK ADICIONADA AQUI */
.bg-pagbank {
    background-color: #9cd32c; /* Verde PagBank */
    color: #000000;
}
.bg-pagbank:hover {
    background-color: #8bc34a; /* Um pouco mais escuro no hover */
}

/* ===== ANIMAÇÕES DOS FORMULÁRIOS ===== */
input, textarea, select {
    font-family: 'Oswald', sans-serif;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ===== ANIMAÇÃO DO MOBILE MENU ===== */
#mobile-menu {
    transition: all 0.3s ease;
    transform: translateY(-100%);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

/* ===== ANIMAÇÕES ESPECIAIS ===== */
.hero-text {
    opacity: 0;
    transform: translateY(50px);
    animation: heroSlideIn 1.2s ease forwards;
}

@keyframes heroSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ===== ANIMAÇÃO DE CARREGAMENTO ===== */
.loading-animation {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MODAL DE PRODUTOS ===== */
#productModal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#productModal:not(.hidden) {
    opacity: 1;
}

#productModal .bg-white {
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

#productModal:not(.hidden) .bg-white {
    transform: scale(1) translateY(0);
}

/* Cores dos produtos */
.color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.05);
    border-color: #000;
}

.color-option.selected {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-option.selected::after {
    opacity: 1;
}

/* Preços */
.price-option {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-option:hover {
    border-color: #000;
    transform: translateY(-2px);
}

.price-option.selected {
    border-color: #000;
    background-color: #f9fafb;
}

/* Especificações */
.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.spec-item:last-child {
    border-bottom: none;
}

/* Animação do modal */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-animate-in {
    animation: modalSlideIn 0.3s ease forwards;
}


/* AJUSTE: modal mais largo/alto em desktop */
#productModal > .bg-white {
    width: min(95vw, 80rem); 
    max-width: 80rem;
    max-height: 92vh;
}

/* AJUSTE: imagem em destaque */
#modalProductImage {
    width: 100%;
    height: min(60vh, 720px); 
    object-fit: contain; /* CORREÇÃO: alterado de cover para contain */
    background-color: #fff; /* Adicionado fundo branco para preencher áreas vazias */
}

/* Responsividade do modal */
@media (max-width: 1024px) {
  #productModal > .bg-white {
    width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
  }
  #modalProductImage {
    height: 40vh; /* CORREÇÃO: Altura reduzida para caber melhor em telemóveis */
  }
}

/* ===== RESPONSIVIDADE DAS ANIMAÇÕES ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ===== GRID DE PRODUTOS COM ESPAÇAMENTO AJUSTADO ===== */
.product-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0px;       
  width: 100%;    
}

@media (min-width: 640px) {              /* sm */
  .product-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {             /* lg */
  .product-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {             /* xl - máximo 4 colunas */
  .product-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.product-card .product-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3; 
  object-position: 50% 50%;
  object-fit: cover;
  display: block;
}

/* Controles de navegação do card */
.card-overlay {
  opacity: 0;
  pointer-events: none;
  transition: none;
  z-index: 0;
}

/* Setas */
.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  z-index: 10;
  font-size: 26px;
  line-height: 1;
  transition: none;       
  outline: none;
  box-shadow: none;
}

.card-arrow-left { left: 10px; }
.card-arrow-right { right: 10px; }

/* Override: impedir que o button:hover global mova a seta */
button.card-arrow,
button.card-arrow:hover,
button.card-arrow:focus,
button.card-arrow:active {
  transform: translateY(-50%) !important; 
  box-shadow: none !important;            
}

button.card-arrow::before,
button.card-arrow:hover::before,
button.card-arrow:focus::before {
  content: none !important;
}

/* Thumbnails do modal: mais espaço e sem scroll */
#modalThumbnails {
  min-height: 112px;
  overflow: visible;
}

#modalThumbnails img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  flex: 0 0 auto;
  border-radius: 6px;
}

/* Fundo que repete verticalmente e ocupa toda a largura da secção */
.bg-vertical-cover {
  background-image: url('img/background.png');
  background-repeat: repeat-y; 
  background-size: 100% auto;
  background-position: center top;
  background-color: transparent; 
}