/* Delivery New Main - Set Menu Thumbnails */

.set-menu-thumbnails {
    padding: 40px 0;
    min-height: 70vh;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.thumbnail-button {
    display: block;
    text-decoration: none;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    aspect-ratio: 2/1;
}

.thumbnail-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(123, 97, 255, 0.9) 0%,
        rgba(123, 97, 255, 0.7) 30%,
        rgba(123, 97, 255, 0.4) 60%,
        rgba(123, 97, 255, 0.1) 90%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.product-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Show All Button Styles */
.show-all-button {
    aspect-ratio: 3/1; /* 더 작은 크기로 만들기 */
}

.show-all-button .thumbnail-image {
    background: linear-gradient(135deg, #7b61ff 0%, #9c7fff 100%);
}

.show-all-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.show-all-button .gradient-overlay {
    background: rgba(255, 255, 255, 0.1);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.show-all-button .product-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .thumbnail-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 0 15px;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .show-all-button .product-title {
        font-size: 1.1rem;
    }
    
    .gradient-overlay {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .set-menu-thumbnails {
        padding: 20px 0;
    }
    
    .thumbnail-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 10px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .show-all-button .product-title {
        font-size: 1rem;
    }
    
    .gradient-overlay {
        padding: 12px;
    }
}

/* Loading State */
.thumbnail-button.loading .thumbnail-image {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

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

/* Discount Badge - Modern Flag Design */
.discount-badge {
    position: absolute;
    top: 16px;
    right: 110px;
    z-index: 10;
}

.discount-badge span {
    display: inline-block;
    background: #fbbf24;
    color: #78350f;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 8px 16px 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    box-shadow: 0 3px 12px rgba(251, 191, 36, 0.5);
    border-radius: 4px 0 0 4px;
}

.discount-badge span::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid #fbbf24;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
}

.discount-badge span::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    width: 6px;
    height: 6px;
    background: #78350f;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 1px #fbbf24;
}

/* Genie's Pick Badge - Modern Flag Design */
.genies-pick-badge {
    position: absolute;
    top: 16px;
    right: -8px;
    z-index: 10;
}

.genies-pick-badge span {
    display: inline-block;
    background: #ff6b35;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 8px 16px 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.4);
    border-radius: 4px 0 0 4px;
}

.genies-pick-badge span::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid #ff6b35;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
}

.genies-pick-badge span::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 1px #ff6b35;
}

/* Hover effect for badges */
.thumbnail-button:hover .discount-badge span {
    background: #f59e0b;
    transform: translateX(-2px);
    transition: all 0.3s ease;
}

.thumbnail-button:hover .discount-badge span::before {
    border-left-color: #f59e0b;
}

.thumbnail-button:hover .genies-pick-badge span {
    background: #e55a2b;
    transform: translateX(-2px);
    transition: all 0.3s ease;
}

.thumbnail-button:hover .genies-pick-badge span::before {
    border-left-color: #e55a2b;
}

/* Hover Effects for Touch Devices */
@media (hover: none) {
    .thumbnail-button:active {
        transform: scale(0.98);
    }
    
    .thumbnail-button:hover {
        transform: none;
    }
}

/* Responsive Badge Styles */
@media (max-width: 768px) {
    .discount-badge {
        top: 12px;
        right: 80px;
    }

    .discount-badge span {
        font-size: 0.65rem;
        padding: 6px 12px 6px 8px;
    }

    .discount-badge span::before {
        border-left: 6px solid #fbbf24;
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        right: -6px;
    }

    .discount-badge span::after {
        width: 4px;
        height: 4px;
    }

    .genies-pick-badge {
        top: 12px;
        right: -6px;
    }

    .genies-pick-badge span {
        font-size: 0.65rem;
        padding: 6px 12px 6px 8px;
    }

    .genies-pick-badge span::before {
        border-left: 6px solid #ff6b35;
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        right: -6px;
    }

    .genies-pick-badge span::after {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 480px) {
    .discount-badge {
        top: 8px;
        right: 90px;
    }

    .discount-badge span {
        font-size: 0.6rem;
        padding: 4px 10px 4px 6px;
    }

    .discount-badge span::before {
        border-left: 4px solid #fbbf24;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        right: -4px;
    }

    .discount-badge span::after {
        width: 3px;
        height: 3px;
        left: -2px;
    }

    .genies-pick-badge {
        top: 8px;
        right: -4px;
    }

    .genies-pick-badge span {
        font-size: 0.6rem;
        padding: 4px 10px 4px 6px;
    }

    .genies-pick-badge span::before {
        border-left: 4px solid #ff6b35;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        right: -4px;
    }

    .genies-pick-badge span::after {
        width: 3px;
        height: 3px;
        left: -2px;
    }
}