/**
 * Guadalupe Template - Home Page Styles
 * "Santuário Digital" - Editorial, contemplativo, devocional
 *
 * Inclui: hero, products grid, product-card, historia, animations
 */

/* ==================== */
/* TEXTURA DE FUNDO     */
/* ==================== */
.main-content {
    background: var(--cream);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ==================== */
/* SECTION LABEL        */
/* Ultra-minimal divider*/
/* ==================== */
.section-label-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px 4px;
    max-width: 500px;
    margin: 0 auto;
    animation: labelReveal 0.6s ease-out forwards;
}

@keyframes labelReveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section-label-divider::before,
.section-label-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gold);
    opacity: 0.35;
}

.section-label-divider span {
    font-family: 'DM Serif Display', serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--green-dark);
    padding: 0 20px;
}

/* ==================== */
/* PRODUCTS GRID        */
/* ==================== */
.products {
    padding: 24px 16px 50px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
    align-items: stretch;
}

/* ==================== */
/* PRODUCT CARD         */
/* ==================== */
.product-card {
    background: var(--white);
    border-radius: 16px;
    padding: 0;
    box-shadow:
        0 2px 8px rgba(45, 74, 62, 0.06),
        0 8px 24px rgba(45, 74, 62, 0.08);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 4px 12px rgba(45, 74, 62, 0.08),
        0 16px 40px rgba(45, 74, 62, 0.12);
}

.product-card:hover::before {
    border-color: rgba(196, 136, 58, 0.2);
}

/* Link do produto */
.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Imagem do produto - Full width, canto a canto */
.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
    border-radius: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Conteúdo do card - área de texto com padding */
.product-content {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
}

/* Nome do produto - flexível para acomodar diferentes tamanhos */
.product-name {
    font-family: 'DM Serif Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--green-dark);
    text-align: center;
    margin-bottom: 0;
    line-height: 1.3;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
}

/* Preços - posição fixa via margin-top auto */
.product-prices {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 10px;
    padding-top: 8px;
}

.price-old {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.6;
}

.price-new {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
}

/* ==================== */
/* QTY SELECTOR (HOME)  */
/* Premium style        */
/* ==================== */
.products .qty-selector {
    background: var(--cream);
    border: 1px solid var(--gold);
    border-radius: 24px;
    padding: 3px 4px;
    box-shadow: 0 2px 8px rgba(196, 136, 58, 0.08);
    width: 100%;
    max-width: 120px;
    justify-content: space-between;
}

.products .qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.products .qty-btn:hover {
    background: var(--gold);
    color: var(--white);
}

.products .qty-btn:active {
    transform: scale(0.92);
}

.products .qty-value {
    width: 28px;
    text-align: center;
    font-family: 'DM Serif Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-dark);
}

/* ==================== */
/* HISTORIA SECTION     */
/* ==================== */
.historia-section {
    padding: 70px 24px 30px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.historia-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.guadalupe-image {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    filter: drop-shadow(0 8px 30px rgba(45, 74, 62, 0.15));
}

.historia-content {
    text-align: left;
}

.section-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green-dark);
    margin-bottom: 12px;
    opacity: 0.8;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.9rem;
    font-weight: 400;
    color: var(--gold);
    line-height: 1.2;
    margin-bottom: 24px;
}

.section-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* Divisor ornamental */
.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 36px 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-divider .star {
    color: var(--gold);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Botão outline refinado */
.historia-section .btn-outline {
    margin-top: 8px;
    padding: 14px 28px;
    border: 1.5px solid var(--gold);
    border-radius: 30px;
    background: transparent;
    color: var(--gold);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.historia-section .btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.historia-section .btn-outline:hover {
    color: var(--white);
    border-color: var(--gold);
}

.historia-section .btn-outline:hover::before {
    left: 0;
}

/* ==================== */
/* QUARESMA SECTION     */
/* Full-width, centered */
/* ==================== */
.quaresma-section {
    padding: 0 24px 70px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.quaresma-section .section-divider {
    margin: 0 auto 30px;
    max-width: 300px;
}

.quaresma-section .section-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green-dark);
    margin-bottom: 12px;
    opacity: 0.8;
}

.quaresma-section .section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--gold);
    line-height: 1.2;
    margin-bottom: 24px;
}

.quaresma-section .section-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.quaresma-section .btn-outline {
    margin-top: 24px;
    padding: 14px 28px;
    border: 1.5px solid var(--gold);
    border-radius: 30px;
    background: transparent;
    color: var(--gold);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quaresma-section .btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.quaresma-section .btn-outline:hover {
    color: var(--white);
    border-color: var(--gold);
}

.quaresma-section .btn-outline:hover::before {
    left: 0;
}

/* ==================== */
/* ANIMATIONS           */
/* ==================== */
@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.product-card {
    animation: cardReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Historia animation */
.historia-section {
    animation: sectionReveal 0.8s ease-out 0.5s both;
}

@keyframes sectionReveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==================== */
/* DESKTOP STYLES       */
/* ==================== */
@media (min-width: 768px) {
    .hero {
        padding: 50px 40px 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-title .hero-year {
        font-size: 4rem;
        display: inline;
        margin-left: 12px;
    }

    .products {
        max-width: 600px;
        gap: 24px;
        padding: 32px 24px 60px;
    }

    .product-card {
        padding: 0;
        border-radius: 20px;
    }

    .product-content {
        padding: 14px 14px 16px;
    }

    .product-name {
        font-size: 1rem;
    }

    .price-new {
        font-size: 1.25rem;
    }

    .products .qty-selector {
        max-width: 130px;
    }

    .products .qty-btn {
        width: 30px;
        height: 30px;
    }

    .historia-section {
        flex-direction: row;
        align-items: center;
        padding: 100px 50px 40px;
        max-width: 1100px;
        margin: 0 auto;
        gap: 80px;
    }

    .historia-image-container {
        flex: 0 0 42%;
    }

    .historia-content {
        flex: 1;
    }

    .section-title {
        font-size: 2.4rem;
    }

    .section-text {
        font-size: 1.1rem;
    }

    .quaresma-section {
        padding: 0 50px 70px;
        max-width: 800px;
    }

    .quaresma-section .section-title {
        font-size: 2.6rem;
    }

    .quaresma-section .section-text {
        font-size: 1.15rem;
    }
}

@media (min-width: 1024px) {
    .products {
        max-width: 950px;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .product-card {
        border-radius: 16px;
    }

    .product-content {
        padding: 12px 12px 14px;
    }

    .product-name {
        font-size: 0.92rem;
    }

    .price-new {
        font-size: 1.15rem;
    }

    .products .qty-selector {
        max-width: 115px;
        padding: 2px 3px;
    }

    .products .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }

    .products .qty-value {
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-title .hero-year {
        font-size: 4.5rem;
    }
}
