/* ============================================
   STYLES FOR PRESENTES PAGE
   ============================================ */

.presents-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 5%;
    background: transparent;
}

.back-link {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
    padding: 10px 20px;
    border: 1px solid var(--color-text-light);
    border-radius: 30px;
    transition: all var(--transition-base);
}

.back-link:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.presents-nav h2 {
    font-family: var(--font-couple);
    font-size: 2rem;
    color: var(--color-red);
    font-weight: normal;
}

.presents-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.presents-header h1 {
    font-family: var(--font-couple);
    font-size: clamp(2rem, 6vw, 4.5rem);
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: 20px;
}

.presents-header p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.gift-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

.gift-container.layout-grid {
    display: grid;
    grid-template-columns: 1fr 250px;
    grid-template-areas:
        "top sidebar"
        "grid sidebar";
    gap: 30px 40px;
    align-items: start;
}

.top-filters {
    grid-area: top;
}

.sidebar-right {
    grid-area: sidebar;
    position: sticky;
    top: 30px;
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.sidebar-right h3 {
    font-size: 1.1rem;
    font-family: var(--font-couple);
    color: var(--color-red);
    margin-bottom: 15px;
}

.room-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: grab;
}

.room-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 10px 14px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.room-btn:hover,
.room-btn.active {
    background: #FFF7ED;
    color: var(--color-text);
    font-weight: bold;
}

/* --- FILTERS --- */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: #fff;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: transparent;
    border: 1px solid #E8DDD4;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}

.search-bar {
    position: relative;
    flex-grow: 1;
    max-width: 350px;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border: 1px solid #E8DDD4;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--color-red);
}

.search-bar svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #B8A89E;
}


/* --- GRID --- */
.gift-grid {
    grid-area: grid;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gift-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.gift-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.gift-img-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: #f9f9f9;
}

.gift-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gift-card:hover .gift-img {
    transform: scale(1.08);
}

.gift-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-red);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
    z-index: 2;
}

.gift-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.gift-name {
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 48px;
}

.gift-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.gift-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 10px;
}

.gift-price {
    font-family: var(--font-body);
    font-size: 1.4rem;
    color: var(--color-red);
    font-weight: bold;
}

.gift-btn {
    background: linear-gradient(135deg, #FFD700, #D4AF37, #B8860B, #D4AF37, #FFD700);
    background-size: 300% 100%;
    color: #ffeded;
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    animation: shimmerBg 3s ease-in-out infinite;
}

@keyframes shimmerBg {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gift-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.gift-btn:hover::before {
    left: 120%;
}

.gift-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.3);
}

.gift-btn:active {
    transform: scale(0.97);
}

/* Mobile room dropdown */
.mobile-room-select {
    display: none;
}

/* Sparkle particles */
.sparkle-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFD700, #D4AF37);
    pointer-events: none;
    z-index: 99999;
    animation: sparkleFloat 0.6s ease-out forwards;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0);
    }
}


/* --- PAYMENT METHOD MODAL --- */
.payment-modal-content {
    padding: 30px 25px !important;
}

.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.payment-option-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #FFD700, #D4AF37, #B8860B, #D4AF37, #FFD700);
    background-size: 300% 100%;
    animation: shimmerBg 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #ffeded;
    font-family: var(--font-body);
    font-weight: bold;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.payment-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.payment-option-btn:hover::before {
    left: 120%;
}

.payment-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.3);
}

.payment-option-btn:active {
    transform: scale(0.97);
}

.payment-option-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.payment-option-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.payment-option-label {
    font-size: 1.05rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffeded;
}

.payment-option-deliver {
    width: 100%;
    margin-bottom: 0;
}

/* --- RECADO SECTION (inside payment modal) --- */
.recado-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recado-section-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--color-text);
    text-align: left;
    margin-bottom: 2px;
}

.recado-textarea {
    border-radius: 16px !important;
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

.recado-name-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recado-label {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-light);
    text-align: left;
}

.required-asterisk {
    color: var(--color-red);
    font-weight: bold;
}

.recado-error {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-red);
    text-align: left;
    display: none;
}

.recado-error.show {
    display: block;
}

.delivery-input.input-error {
    border-color: var(--color-red) !important;
    animation: shakeInput 0.4s ease;
}

@keyframes shakeInput {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* Delivery input (reused for recado fields) */
.delivery-input {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid #E8DDD4;
    border-radius: 99px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.delivery-input:focus {
    border-color: var(--color-red);
}

.delivery-input::placeholder {
    color: #B8A89E;
}

/* --- PIX MODAL --- */
.pix-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 24, 16, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.pix-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.pix-modal-content {
    background: #fff;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 30px;
    padding: 30px 25px;
    text-align: center;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pix-modal-content::-webkit-scrollbar {
    display: none;
}

.pix-modal.show .pix-modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.pix-modal-content h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

#modalGiftName {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 5px;
    line-height: 1.3;
}

#modalGiftPrice {
    font-family: var(--font-body);
    font-size: 2.8rem;
    color: var(--color-red);
    margin-bottom: 25px;
}

.qrcode-container {
    background: #fff;
    padding: 15px;
    border-radius: 20px;
    border: 2px solid #E8DDD4;
    display: inline-block;
    margin-bottom: 25px;
}

.qrcode-container img,
.qrcode-container canvas {
    margin: 0 auto;
    border-radius: 8px;
}

.pix-copy-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

#pixPayload {
    width: 100%;
    padding: 14px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
    outline: none;
    text-align: center;
}

.copy-btn {
    background: #32A071;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(50, 160, 113, 0.3);
}

.copy-btn:hover {
    background: #25835b;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(50, 160, 113, 0.4);
}

.copy-btn.copied {
    background: var(--color-text);
    box-shadow: none;
}

.pix-instructions {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-align: left;
    background: #FFF7ED;
    padding: 15px 20px;
    border-radius: 12px;
    line-height: 1.6;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .gift-container.layout-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "top"
            "grid";
        gap: 15px;
        padding: 0 15px 80px;
        overflow-x: hidden;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .presents-header {
        padding: 40px 15px 20px;
    }

    .sidebar-right {
        display: none;
    }

    .mobile-room-select {
        display: block;
        width: 100%;
        padding: 12px 16px;
        border: 1px solid #E8DDD4;
        border-radius: 30px;
        font-family: var(--font-body);
        font-size: 0.9rem;
        color: var(--color-text);
        background: #fff;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        cursor: pointer;
        outline: none;
    }

    .mobile-room-select:focus {
        border-color: var(--color-red);
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .search-bar {
        max-width: 100%;
        width: 100%;
    }

    .tabs {
        padding-bottom: 10px;
    }

    .tab-btn {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 0.75rem;
    }

    .presents-nav {
        padding: 20px 5%;
        gap: 10px;
    }

    .presents-nav h2 {
        font-size: 1.2rem;
        text-align: right;
    }

    .back-link {
        font-size: 0.8rem;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .gift-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .gift-card {
        min-width: 0;
        overflow: visible;
    }

    .gift-info {
        padding: 12px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .gift-name {
        font-size: 1rem;
        min-height: auto;
        margin-bottom: 6px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .gift-category {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .gift-footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
        width: 100%;
    }

    .gift-price {
        font-size: 1.3rem;
    }

    .gift-btn {
        padding: 8px 14px;
        font-size: 1rem;
        width: 100%;
    }

    .gift-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
        top: 10px;
        right: 10px;
    }

    /* Payment modal mobile */
    .payment-options {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .payment-option-btn {
        flex-direction: column;
        text-align: center;
        padding: 14px 8px;
        gap: 6px;
    }

    .payment-option-icon {
        font-size: 1.6rem;
    }

    .payment-option-label {
        font-size: 0.9rem;
    }

    /* PIX Modal mobile */
    .pix-modal-content {
        width: 92%;
        padding: 24px 20px;
        border-radius: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .pix-modal-content h3 {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    #modalGiftName {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    #modalGiftPrice {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .qrcode-container {
        padding: 10px;
        margin-bottom: 15px;
        border-radius: 14px;
    }

    .pix-copy-container {
        gap: 10px;
        margin-bottom: 15px;
    }

    #pixPayload {
        padding: 10px;
        font-size: 0.75rem;
    }

    .copy-btn {
        padding: 12px;
        font-size: 0.95rem;
    }

    .pix-instructions {
        font-size: 0.78rem;
        padding: 10px 14px;
        line-height: 1.5;
    }

    .close-modal {
        top: 12px;
        right: 12px;
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
}