/* ---- VARIÁVEIS GLOBAIS E RESET ---- */
:root {
    /* Padrão de cores simplificado para vermelho e branco */
    --red-primary: #C40018;
    --white-primary: #FFFFFF;
    --text-color: #333333;
    --bg-light: #F8F8F8;
    --red-dark: #A90015;
    --gold-color: #DAA520; /* Dourado para as bordas */

    --font-title: 'Playfair Display', serif;
    --font-text: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-color);
    font-family: var(--font-text);
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- CLASSES UTILITÁRIAS ---- */
.hidden {
    display: none !important;
}


/* ---- ANIMAÇÕES ---- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
@keyframes glow {
    from {
        box-shadow: 0 0 5px var(--red-primary), 0 0 10px var(--red-primary);
    }
    to {
        box-shadow: 0 0 15px var(--red-primary), 0 0 25px var(--red-primary);
    }
}

/* ---- HEADER ---- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: top;
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo img {
    height: 50px;
    width: auto;
}
.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}
.main-nav a:hover {
    color: var(--red-primary);
}
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--red-primary);
    transition: width 0.3s ease;
}
.main-nav a:hover::after {
    width: 100%;
}

/* ---- HERO SECTION ---- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Fundo escurecido e imagem original */
    background: linear-gradient(45deg, rgba(196, 0, 24, 0.35), rgba(220, 150, 150, 0.25)), url('https://images.unsplash.com/photo-1594935213699-317926cbd580?q=80&w=1887&auto=format&fit=crop');
    background-size: cover;
    background-position: center 30%;
}
.hero-content {
    max-width: 800px;
}
.hero-content h1 {
    font-family: var(--font-title);
    font-size: 4.5rem;
    /* Texto vermelho com borda dourada */
    color: var(--red-primary);
    text-shadow: 0 0 5px var(--gold-color), 0 0 8px var(--gold-color), 0 2px 4px rgba(0,0,0,0.5);
}
.hero-content p {
    font-size: 1.25rem;
    /* Texto vermelho com borda dourada */
    color: var(--red-primary);
    margin: 1rem 0 2rem;
    text-shadow: 0 0 3px var(--gold-color), 0 1px 3px rgba(0,0,0,0.5);
    font-weight: 500;
}
.cta-button {
    background-color: var(--red-primary);
    color: var(--white-primary);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
    background-color: var(--red-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(196, 0, 24, 0.3);
    animation: glow 1.5s infinite alternate;
}

/* ---- SECTIONS GERAIS ---- */
section {
    padding: 6rem 0;
}
.section-title {
    text-align: center;
    font-family: var(--font-title);
    font-size: 3rem;
    margin-bottom: 1rem;
}
.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 4rem;
}

/* ---- GRADE DE PRODUTOS ---- */
#products {
     background-color: var(--white-primary);
}
.product-grid {
    display: grid;
    /* Padrão para desktop: 5 colunas */
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}
.product-card {
    background-color: var(--white-primary);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
    border-color: var(--red-primary);
}
.product-card img {
    width: 100%;
    height: 400px;
    /* ALTERADO: A imagem agora se ajusta ao contêiner sem ser cortada */
    object-fit: contain;
    display: block;
}
.card-content {
    padding: 1.5rem;
}
.card-content h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
}
.card-content .price {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--red-primary);
    margin: 0.5rem 0;
}
.card-content p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}
.card-variants {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.variant-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.variant-selector select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.variant-selector select:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(196, 0, 24, 0.2);
}
.print-options {
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.print-options p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.print-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.print-badge {
    background-color: var(--red-primary);
    color: var(--white-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.print-empty {
    color: #999;
    font-size: 0.9rem;
}
.connection-error {
    background-color: #fff5f5;
    border: 1px solid #f4c7c7;
    border-radius: 8px;
    color: var(--red-primary);
    padding: 1.5rem;
    text-align: center;
    line-height: 1.5;
}
.card-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    background-color: rgba(255,255,255,0.8);
    padding: 0.5rem;
    border-radius: 50px;
}
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.action-btn:hover {
    background-color: var(--red-primary);
    color: var(--white-primary);
}

/* ---- FORMULÁRIO ADMIN ---- */
#admin-panel {
    background-color: var(--white-primary);
}
.admin-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background-color: var(--white-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 8px;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-text);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(196, 0, 24, 0.2);
}
.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

/* ---- SEÇÃO DEPOIMENTOS ---- */
#testimonials {
    background-color: var(--red-primary);
    color: var(--white-primary);
    position: relative;
}
#testimonials::before {
    content: '“';
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8rem;
    font-family: var(--font-title);
    color: rgba(255, 255, 255, 0.1);
    z-index: 1;
}
.testimonial-carousel {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    height: 150px; /* Altura fixa para evitar pulos de layout */
    display: flex;
    align-items: center;
    justify-content: center;
}
.testimonial-slide {
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    width: 100%;
}
.testimonial-slide.active {
    opacity: 1;
}
.testimonial-slide blockquote {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.6;
}
.testimonial-slide footer {
    margin-top: 1.5rem;
    font-weight: 500;
    font-size: 1rem;
}

/* ---- FOOTER ---- */
.main-footer {
    background-color: var(--red-dark);
    color: var(--white-primary);
    padding: 4rem 0;
    text-align: center;
}
.social-links {
    margin-bottom: 1.5rem;
}
.social-links a {
    color: var(--white-primary);
    margin: 0 1rem;
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.social-links a:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

/* ---- MODAIS (EDIÇÃO E AUTENTICAÇÃO) ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--white-primary);
    padding: 2.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}
.modal-content h2 {
    font-family: var(--font-title);
    margin-bottom: 2rem;
    text-align: center;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}
.btn-cancel {
    background-color: #eee;
    color: #333;
}
.btn-cancel:hover {
    background-color: #ddd;
    box-shadow: none;
    animation: none;
}

/* NOVO: Estilos do Modal de Autenticação ok*/
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}
.tab-link {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #999;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}
.tab-link:hover {
    color: var(--text-color);
}
.tab-link.active {
    color: var(--red-primary);
    border-bottom-color: var(--red-primary);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.auth-error-message {
    color: var(--red-primary);
    text-align: center;
    margin-top: 1rem;
}


/* ---- RESPONSIVIDADE ---- */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .main-nav a { font-size: 0.9rem; margin-left: 1rem; }
    .hero-content h1 { font-size: 3rem; }
    .section-title { font-size: 2.2rem; }
    section { padding: 4rem 0; }
    .admin-form-container { padding: 1.5rem; }
    .testimonial-slide blockquote { font-size: 1.2rem; }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* === NOVO PAINEL DE PRODUTO === */
.sizes-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1rem;
}

.size-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #aaa;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
  transition: all 0.2s ease;
}

.size-btn.active {
  background: #9b1b30;
  color: #fff;
  border-color: #9b1b30;
}

.sizes-blocks {
  margin-top: 10px;
}

.sizes-blocks .block {
  border: 1px dashed #bbb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.sizes-blocks input[type="file"] {
  margin-top: 0.5rem;
}

.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.thumbs img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.status-msg {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: #555;
}

#admin-produtos input,
#admin-produtos textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

#admin-produtos label {
    font-weight: 600;
    margin-top: 1rem;
    display: block;
}