:root {
    --gift-green: #0E3D2F;
    --gift-red: #C62828;
    --gift-cream: #F8F4E3;
    --gift-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gift-ideas-container {
    background: var(--gift-cream);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem auto;
    max-width: 100%;
    box-sizing: border-box;
}

.gift-ideas-header {
    text-align: center;
    margin-bottom: 1rem;
}

.gift-ideas-header h3 {
    color: var(--gift-green);
    font-size: 1.25rem;
    margin: 0 0 0.35rem 0;
    font-weight: 600;
}

.gift-ideas-header p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

.gift-recommended-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.gift-recommended-header {
    text-align: center;
    font-weight: 600;
    color: var(--gift-green);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.recommended-star {
    color: #FFD700;
}

.gift-grid-recommended {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (max-width: 500px) {
    .gift-grid-recommended {
        grid-template-columns: repeat(2, 1fr);
    }
    .gift-grid-recommended .gift-card:nth-child(3) {
        grid-column: span 2;
        max-width: 60%;
        margin: 0 auto;
    }
}

.gift-card-recommended {
    border: 2px solid var(--gift-green);
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .gift-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .gift-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gift-card {
    background: white;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: var(--gift-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 140px;
}

.gift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.gift-icon {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.gift-title {
    color: var(--gift-green);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.gift-benefit {
    color: #666;
    font-size: 0.7rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

.gift-btn {
    display: inline-block;
    background: #FF9900;
    color: #111;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.gift-btn:hover {
    background: #e68a00;
    color: #111;
    text-decoration: none;
}

.gift-disclosure {
    text-align: center;
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gift-footer-btn {
    position: fixed;
    bottom: 50px;
    right: 20px;
    background: var(--gift-green);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(14, 61, 47, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.gift-footer-btn:hover {
    background: #0a2d22;
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

.gift-footer-btn .icon {
    font-size: 1rem;
}

.gift-loading {
    text-align: center;
    padding: 1.5rem;
    color: #666;
}

.gift-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 10px;
    height: 140px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gift-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gift-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gift-modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gift-modal-overlay.active .gift-modal {
    transform: translateY(0);
}

.gift-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 20px 20px 0 0;
}

.gift-modal-header h3 {
    margin: 0;
    color: var(--gift-green);
    font-size: 1rem;
}

.gift-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.gift-modal-body {
    padding: 1rem;
}

.noscript-gift-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.noscript-gift-list a {
    display: block;
    background: white;
    padding: 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--gift-green);
    font-weight: 500;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 0.85rem;
}

.noscript-gift-list a:hover {
    background: var(--gift-cream);
}

.personalized-badge {
    display: inline-block;
    background: var(--gift-red);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.35rem;
    font-weight: 600;
}

.gift-section-inline {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px dashed #ddd;
    width: 100%;
    box-sizing: border-box;
}

.main-card .gift-ideas-container,
.card .gift-ideas-container {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

@media (max-width: 400px) {
    .gift-ideas-container {
        padding: 1rem;
    }
    
    .gift-card {
        padding: 0.6rem;
        min-height: 130px;
    }
    
    .gift-icon {
        font-size: 1.5rem;
    }
    
    .gift-title {
        font-size: 0.8rem;
    }
    
    .gift-benefit {
        font-size: 0.65rem;
    }
    
    .gift-btn {
        font-size: 0.65rem;
        padding: 0.35rem 0.5rem;
    }
    
    .gift-footer-btn {
        bottom: 40px;
        right: 15px;
        padding: 0.5rem 0.85rem;
        font-size: 0.8rem;
    }
}
