:root {
    --bg-dark: #0f172a;/* Navy slate */
    --bg-card: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --gold: #f59e0b;
    --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --green-success: #10b981;
    --orange-badge: #f97316;
    --container-max-width: 1200px;
    --border-radius: 12px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.main-header {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.amazon-logo {
    height: 28px;
    filter: invert(1) brightness(1.5);
    transition: transform var(--transition-fast);
}

.amazon-logo:hover {
    transform: scale(1.05);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--gold);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    transition: transform var(--transition-fast);
}

/* Hero Styles */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.selection-progress {
    max-width: 400px;
    margin: 0 auto 0.5rem;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gold-gradient);
    width: 0%;
    transition: width var(--transition-medium);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 2rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    padding-bottom: 6rem;
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Product Card */
.product-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    cursor: default;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.last-unit-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: var(--orange-badge);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    z-index: 1;
    text-transform: uppercase;
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 8px;
    background-color: #fff; /* White background for product images typical of Amazon */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.8s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name-container {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.amazon-mini-logo {
    height: 12px;
    filter: invert(1);
    opacity: 0.6;
    margin-top: 4px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rating {
    display: flex;
    gap: 2px;
    margin-bottom: 0.5rem;
}

.star {
    width: 14px;
    height: 14px;
    fill: var(--gold);
}

.shipping-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.shipping-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
}

/* Button Styles */
.btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #000;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-gold:active {
    transform: translateY(0);
}

.btn-success {
    background-color: var(--green-success);
    color: #fff;
    cursor: default;
}

/* Sticky Footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    padding: 1.25rem 0;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-footer.visible {
    transform: translateY(0);
}

.sticky-footer.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(0) translateX(-10px); }
    75% { transform: translateY(0) translateX(10px); }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.success-message {
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
}

.btn-large {
    padding: 1rem 2.5rem;
    width: auto;
    font-size: 1rem;
}

.hidden {
    display: none;
}

@media (max-width: 640px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .success-message {
        font-size: 1.1rem;
    }
}
