/* --- General Setup & Variables --- */
:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --yellow-accent: #fcd34d; /* Bright yellow for titles */
    --pink-accent: #ec4899;   /* Bright pink for buttons */
    --pink-hover: #f472b6;    /* Lighter pink for hover */
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    padding: 20px;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header Styling --- */
.main-header {
    text-align: center;
    padding: 4rem 1rem;
    border-bottom: 1px solid var(--card-bg);
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.main-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.youtube-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--card-bg);
    border-radius: var(--border-radius-sm);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.youtube-link:hover {
    background-color: var(--card-bg);
}

/* --- Section Styling --- */
.product-section {
    padding: 4rem 0;
}

.product-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* --- Product Grid & Card Styling --- */
.product-grid {
    display: grid;
    gap: 2rem;
}

/* Specific grids for different layouts */
.video-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.midjourney-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.card-image-wrapper {
    position: relative;
}

.card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.image-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows content to fill space */
}

.product-title {
    color: var(--yellow-accent);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    flex-grow: 1; /* Pushes rating and button down */
}

.rating {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.purchase-button {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    margin-top: 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    background-color: var(--pink-accent);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.purchase-button:hover {
    background-color: var(--pink-hover);
}

/* --- Footer Styling --- */
.main-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--card-bg);
    color: var(--text-secondary);
}

.main-footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .main-header h1 {
        font-size: 1.8rem;
    }

    .main-header p, .youtube-link {
        font-size: 1rem;
    }
    
    .product-section h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 640px) {
    .video-grid {
        /* On screens > 640px, ensure it's always 2 columns */
        grid-template-columns: 1fr 1fr;
    }
}