﻿/* ===== CABEÇALHO ===== */
.gift-header {
    background: #fff7f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 1000;
}

/* ===== BOTÃO VOLTAR ===== */
.back-home-btn {
    display: inline-block;
    background-color: #b44e6d;
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

    .back-home-btn:hover {
        background-color: #942c50;
        transform: translateY(-1px);
    }

.gift-list {
    text-align: center;
    padding: 2rem;
    background: #fff7f9;
}

.gift-list h1 {
    font-size: 2rem;
    color: #9D0759;
    margin-bottom: 1rem;
}

.gift-card {
    perspective: 1000px;
    height: 450px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.gift-card.flip .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    backface-visibility: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

.card-front {
    background: #fff;
}

.card-front img {
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.card-back {
    background: #fdf2f5;
    color: #333;
    transform: rotateY(180deg);
}

.pix-key {
    font-weight: bold;
    font-size: 0.9rem;
    color: #9D0759;
}

.copy-btn, .back-btn {
    background-color: #9D0759 !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
    text-decoration: none;
}

.copy-btn:hover, .back-btn:hover {
    background-color: #942c50 !important;
    color: white !important;
}

.flip-btn {
    margin-top: auto;
}

/* Better text handling for cards */
.gift-text-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.gift-title {
    line-height: 1.0 !important;
    height: 3.5rem !important;
    overflow: hidden !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.gift-description {
    min-height: 4.5rem;
    max-height: 4.5rem;
    overflow: hidden;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.gift-price-section {
    margin-top: auto;
}

.gift-price {
    margin-bottom: 0.5rem !important;
}

.copy-success {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF00FF;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    10%,90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Responsive title handling */
@media (max-width: 1200px) {
    .gift-title {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 992px) {
    .gift-title {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 768px) {
    .gift-title {
        font-size: 1.1rem !important;
        line-height: 1.1 !important;
        height: 2.5rem !important;
    }
    
    .gift-description {
        font-size: 0.85rem !important;
        min-height: 4rem !important;
        max-height: 4rem !important;
    }
}

/* ===== FIXO NO DESKTOP ===== */
@media (min-width: 601px) {
    .gift-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        backdrop-filter: blur(10px);
        background: rgba(255, 247, 249, 0.85); /* fundo semitransparente */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .gift-list {
        padding-top: 10rem; /* evita sobreposição */
    }
}

/* ===== FIXO APENAS O BOTÃO NO MOBILE ===== */
@media (max-width: 600px) {
    .gift-header {
        position: static;
    }

    .back-home-btn {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1100;
        margin: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
}