:root {
    --dsw-primary: #ff4d6d;
    --dsw-secondary: #ff8fa3;
    --dsw-accent: #fff0f3;
    --dsw-gold: #ffd700;
    --dsw-text-main: #590d22;
    --dsw-white: #ffffff;
}

/* --- Global & Utilities --- */
body.dsw-valentine-mode {
    background: radial-gradient(circle at center, #fff0f3, #ffccd5) !important;
}

/* --- Gift Box Wrapper (Homepage) --- */
#dsw-gift-box-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    /* Explicit height */
    width: 100%;
    margin: 50px 0;
    cursor: pointer;
    perspective: 1000px;
    z-index: 10;
}

#dsw-gift-box {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ff4d6d, #c9184a);
    position: relative;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 77, 109, 0.6);
    animation: dsw-float 3s ease-in-out infinite;
    transform-style: preserve-3d;
    transition: transform 0.3s;
    /* Ensure visibility */
    display: block !important;
    opacity: 1 !important;
}

#dsw-gift-box:hover {
    transform: scale(1.05);
}

.box-lid {
    position: absolute;
    top: -20px;
    left: -5px;
    width: 130px;
    /* Slightly wider than box */
    height: 30px;
    background: #a4133c;
    border-radius: 5px;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.box-body {
    position: absolute;
    inset: 0;
    background: inherit;
    border-radius: inherit;
    z-index: 1;
}

.box-body::before {
    /* Ribbon Vertical */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background: var(--dsw-gold);
    z-index: 3;
}

.box-lid::before {
    /* Ribbon Horizontal on Lid */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background: var(--dsw-gold);
    z-index: 3;
}

.dsw-invite-text {
    margin-top: 50px;
    /* Space from box */
    font-size: 1.5rem;
    color: var(--dsw-text-main);
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(255, 192, 203, 0.8);
    animation: dsw-pulse 2s infinite;
    text-align: center;
}

/* --- Animations --- */
@keyframes dsw-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes dsw-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

/* --- Popup Overlay --- */
#dsw-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 99999;
    /* Topmost */
    display: flex;
    justify-content: center;
    align-items: center;
}

.dsw-popup-content {
    background: linear-gradient(135deg, #fff, #fff0f3);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(255, 77, 109, 0.5);
    border: 3px solid var(--dsw-primary);
    position: relative;
    animation: dsw-popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dsw-close-popup {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.dsw-decor-hearts {
    font-size: 2.5rem;
    margin-bottom: 20px;
    letter-spacing: 15px;
    animation: dsw-pulse 1s infinite alternate;
}

#dsw-message {
    font-size: 1.3rem;
    color: var(--dsw-text-main);
    margin-bottom: 35px;
    line-height: 1.6;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-weight: 500;
}

#dsw-gift-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(45deg, var(--dsw-primary), #d90429);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(255, 77, 109, 0.5);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#dsw-gift-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 77, 109, 0.7);
    background: linear-gradient(45deg, #d90429, var(--dsw-primary));
}

@keyframes dsw-popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Gift Grid (Fixed Side-by-Side) --- */
.dsw-gift-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.dsw-gift-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
}

.dsw-filter-btn {
    background: #fff;
    border: 2px solid var(--dsw-secondary);
    color: var(--dsw-text-main);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dsw-filter-btn:hover,
.dsw-filter-btn.active {
    background: var(--dsw-primary);
    color: #fff;
    border-color: var(--dsw-primary);
    box-shadow: 0 5px 15px rgba(255, 77, 109, 0.4);
    transform: translateY(-2px);
}

.dsw-gift-grid {
    display: grid;
    /* Force 3 columns on desktop */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 900px) {
    .dsw-gift-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 on Tablet */
    }
}

@media (max-width: 600px) {
    .dsw-gift-grid {
        grid-template-columns: 1fr;
        /* 1 on Mobile */
    }
}

/* --- Gift Card Styling (Premium) --- */
.dsw-gift-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(217, 4, 41, 0.1);
    /* Subtle pink shadow */
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 143, 163, 0.2);
    display: flex;
    flex-direction: column;
}

.dsw-gift-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(217, 4, 41, 0.2);
    border-color: var(--dsw-secondary);
}

.dsw-gift-image {
    height: 280px;
    width: 100%;
    background: #fdf0f2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.dsw-gift-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dsw-gift-card:hover .dsw-gift-image img {
    transform: scale(1.1);
}

.placeholder-heart {
    font-size: 80px;
    animation: dsw-pulse 2s infinite;
}

.dsw-gift-content {
    padding: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dsw-gift-content h3 {
    margin: 0 0 10px;
    color: var(--dsw-text-main);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.dsw-caption {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 15px;
    font-style: italic;
}

.dsw-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #e63946;
    margin-bottom: 20px;
}

.dsw-buy-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #ff4757, #ff6b81);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.dsw-buy-btn:hover {
    background: linear-gradient(to right, #ff6b81, #ff4757);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.5);
}

/* --- Particles --- */
.dsw-particle {
    position: fixed;
    pointer-events: none;
    animation: rise 3s ease-in forwards;
    z-index: 999999;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}