/* PSU Runner - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* ========== BASE STYLES ========== */
html {
    margin: 0;
    padding: 0;
    height: 100%;
    scroll-behavior: smooth;
}

body { 
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.product-code {
    font-family: 'DM Mono', monospace;
    font-weight: 500;
}

/* ========== GRADIENTS & BACKGROUNDS ========== */
.gradient-bg {
    background: linear-gradient(135deg, #001E44 0%, #004080 100%);
}

.hero-gradient {
    background: linear-gradient(135deg, #111827 0%, #1F2937 50%, #374151 100%);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.1) 35px, rgba(255,255,255,.1) 70px);
}

/* ========== STORE STATUS BANNER ========== */
.store-status-banner {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 0.875rem;
    animation: slide-down 0.3s ease;
}

.store-status-banner.open {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.store-status-banner.closed {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

@keyframes slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========== MASONRY GRID ========== */
.masonry-grid {
    column-count: 1;
    column-gap: 20px;
}

@media (min-width: 640px) {
    .masonry-grid {
        column-count: 2;
        column-gap: 24px;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
        column-gap: 24px;
    }
}

@media (min-width: 1536px) {
    .masonry-grid {
        column-count: 4;
        column-gap: 28px;
    }
}

/* Featured products section */
#featuredGrid {
    column-count: 1;
    column-gap: 20px;
    width: 100%;
}

@media (min-width: 640px) {
    #featuredGrid {
        column-count: 2;
        column-gap: 24px;
    }
}

@media (min-width: 1024px) {
    #featuredGrid {
        column-count: 3;
        column-gap: 24px;
        max-width: 100%;
    }
}

/* ========== PRODUCT CARDS ========== */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 4px solid transparent;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
    page-break-inside: avoid;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@media (min-width: 640px) {
    .product-card {
        margin-bottom: 24px;
    }
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #3B82F6;
}

.product-card:active {
    transform: scale(0.98);
}

.product-card.in-cart {
    border-color: #10B981;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}

.product-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.product-image {
    width: 100%;
    height: auto;
    min-height: 180px;
    max-height: 600px;
    object-fit: cover;
    object-position: center;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    display: block;
    border-radius: 16px 16px 0 0;
}

.emoji-placeholder {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 16px 16px 0 0;
}

/* Product card content */
.product-info {
    padding: 20px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.3;
    text-transform: uppercase;
}

.product-description {
    font-size: 0.875rem;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 12px;
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-main {
    font-size: 1.75rem;
    font-weight: 900;
    color: #111827;
    line-height: 1;
}

.price-original {
    font-size: 0.875rem;
    color: #9CA3AF;
    text-decoration: line-through;
    margin-top: 4px;
}

/* Subtle card accent */
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3B82F6, #60A5FA, #3B82F6);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px 20px 0 0;
}

.product-card:hover::after {
    opacity: 1;
}

/* ========== BUNDLE STYLING ========== */
.bundle-card {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 4px solid #F59E0B !important;
    position: relative;
}

.bundle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 20px;
}

.bundle-card:hover {
    border-color: #D97706 !important;
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.4) !important;
}

.bundle-card::after {
    background: linear-gradient(90deg, #F59E0B, #FBBF24, #F59E0B) !important;
}

.bundle-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
    z-index: 5;
    animation: float 3s ease-in-out infinite;
}

.bundle-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 5;
    text-transform: uppercase;
}

.bundle-savings {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 8px;
}

/* ========== FEATURED STYLING ========== */
.featured-card {
    background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
    border: 4px solid #8B5CF6 !important;
}

.featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* ========== BADGES ========== */
.quantity-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #10B981;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    animation: pop 0.3s ease;
    border: 3px solid white;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #EF4444;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    animation: pulse 1s infinite;
}

/* ========== CART BUTTON ========== */
.cart-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    transition: transform 0.3s ease;
}

/* Only animate when item is added */
.cart-button.bump {
    animation: bump 0.5s ease;
}

/* ========== CATEGORY CHIPS ========== */
.category-chip {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-chip:hover {
    transform: translateY(-2px);
}

.category-chip.active {
    background: #3B82F6;
    color: white;
}

/* ========== SEARCH ========== */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

/* ========== TOAST NOTIFICATIONS ========== */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    display: none;
    animation: slideInRight 0.3s ease;
}

.success-toast.show {
    display: block;
}

/* ========== ANIMATIONS ========== */
@keyframes pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes bump {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}