/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-pink: #FF6B9D;
    --primary-purple: #C44569;
    --primary-blue: #667EEA;
    --primary-cyan: #00D4FF;
    --dark-bg: #0F0F1E;
    --card-bg: #1A1A2E;
    --text-light: #FFFFFF;
    --text-gray: #B4B4C5;
    --gradient-1: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    --gradient-2: linear-gradient(135deg, #FF6B9D 0%, #FEC163 100%);
    --gradient-3: linear-gradient(135deg, #00D4FF 0%, #667EEA 100%);
    --shadow-glow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

body {
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
    zoom: 85%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.float-icon {
    position: absolute;
    font-size: 24px;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.float-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.float-icon:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.float-icon:nth-child(3) {
    top: 30%;
    right: 20%;
    animation-delay: 2s;
}

.float-icon:nth-child(4) {
    bottom: 20%;
    left: 15%;
    animation-delay: 3s;
}

.float-icon:nth-child(5) {
    top: 70%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Header */
.header {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 36px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    background: var(--gradient-1);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 107, 157, 0.2);
    border: 1px solid var(--primary-pink);
    border-radius: 20px;
    color: var(--primary-pink);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.cute-emoji {
    display: inline-block;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-gray);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 5px;
}

/* Search Section */
.search-section {
    padding: 40px 0;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 20px;
    color: var(--text-gray);
    font-size: 18px;
}

.search-box input {
    width: 100%;
    padding: 18px 50px;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

.search-box input::placeholder {
    color: var(--text-gray);
}

/* Products Section */
.products-section {
    padding: 60px 0 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 10px;
}

.pulse-dot {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-gray);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 10;
}

.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    border-color: var(--primary-pink);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    background: var(--gradient-2);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Product Image Wrapper - Support Landscape & Portrait */
.product-image-wrapper {
    width: 100%;
    padding-bottom: 100%; /* This creates 1:1 aspect ratio */
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    height: 0; /* Important for padding-bottom trick */
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(255, 107, 157, 0.1) 100%);
    transition: opacity 1s ease, transform 0.4s ease;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-image.active {
    opacity: 1;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-content {
    padding: 20px;
}

.product-category {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary-cyan);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-description {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-price {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-price-contact {
    font-size: 16px;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-btn {
    padding: 10px 20px;
    background: var(--gradient-1);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.product-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Skeleton Loading */
.skeleton-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.skeleton-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-content {
    padding: 20px;
}

.skeleton-category {
    width: 100px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 10px;
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
}

.skeleton-title {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
}

.skeleton-title.short {
    width: 70%;
}

.skeleton-description {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    margin-bottom: 6px;
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
}

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.skeleton-price {
    width: 120px;
    height: 28px;
    background: rgba(255, 107, 157, 0.2);
    border-radius: 8px;
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, 
        rgba(255, 107, 157, 0.1) 0%, 
        rgba(255, 107, 157, 0.2) 50%, 
        rgba(255, 107, 157, 0.1) 100%);
}

.skeleton-button {
    width: 100px;
    height: 40px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(102, 126, 234, 0.2) 50%, 
        rgba(102, 126, 234, 0.1) 100%);
}

/* Product Image Loading State */
.product-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image.loaded {
    opacity: 1;
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.no-results-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-light);
}

.no-results p {
    color: var(--text-gray);
    font-size: 16px;
}

/* Footer */
.footer {
    background: var(--card-bg);
    padding: 50px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.footer-main h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.footer-main p {
    color: var(--text-gray);
    margin-bottom: 8px;
    font-size: 15px;
}

.footer-period {
    color: var(--primary-pink) !important;
    font-weight: 600;
}

.footer-contact h4,
.footer-social h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-pink);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 107, 157, 0.1);
    border: 1px solid rgba(255, 107, 157, 0.3);
    border-radius: 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.contact-item:hover {
    background: var(--gradient-2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.contact-item i {
    font-size: 16px;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .nav {
        width: 100%;
        margin-top: 15px;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .footer-content-simple {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--text-gray);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 80px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-gray);
}

/* Image Popup Modal */
.image-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.popup-close:hover {
    color: var(--primary-pink);
    transform: rotate(90deg) scale(1.2);
}

.popup-image-container {
    max-width: 800px;
    width: 100%;
    max-height: 70vh;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(255, 107, 157, 0.05) 100%);
    border-radius: 20px;
    padding: 10px;
    position: relative;
}

.popup-loader {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 1;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.popup-loader p {
    color: var(--text-gray);
    font-size: 14px;
}

.popup-content {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain; /* Changed to contain untuk support semua aspect ratio */
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.6);
    animation: zoomIn 0.3s ease;
    border: 2px solid rgba(255, 107, 157, 0.3);
    display: block;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-info {
    max-width: 600px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 107, 157, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-light);
}

.popup-description {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-price {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-order-btn {
    padding: 12px 30px;
    background: var(--gradient-1);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-order-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

/* Popup Navigation Buttons */
.popup-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(102, 126, 234, 0.8);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.popup-nav:hover {
    background: rgba(255, 107, 157, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.popup-prev {
    left: 20px;
}

.popup-next {
    right: 20px;
}

/* Mobile optimization for popup */
@media (max-width: 768px) {
    /* Skeleton Loading Mobile */
    .skeleton-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skeleton-image {
        height: 250px;
    }
    
    .image-popup {
        padding: 10px;
    }
    
    .popup-close {
        top: 15px;
        right: 15px;
        font-size: 35px;
    }
    
    .popup-nav {
        font-size: 24px;
        padding: 10px 15px;
    }
    
    .popup-prev {
        left: 10px;
    }
    
    .popup-next {
        right: 10px;
    }
    
    .popup-image-container {
        max-width: 100%;
    }
    
    .popup-content {
        max-height: 40vh;
        border-radius: 15px;
    }
    
    .popup-info {
        padding: 20px;
    }
    
    .popup-title {
        font-size: 20px;
    }
    
    .popup-description {
        font-size: 14px;
    }
    
    .popup-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .popup-price {
        font-size: 24px;
    }
    
    .popup-order-btn {
        width: 100%;
        justify-content: center;
    }
}
