/* ============================================================
   NutriGenie Products Page — products.css
   Premium product showcase styling
   ============================================================ */

/* ---------- Products Hero ---------- */
.products-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.products-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 40%, #388E3C 70%, #43A047 100%);
    z-index: 0;
}

.products-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.products-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 32px;
}

.products-hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.products-hero-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- Products Section ---------- */
.products-section {
    background: var(--bg-white);
}

/* ---------- Product Detail Card ---------- */
.product-detail-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.product-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), #43A047, #66BB6A);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-detail-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.product-detail-card:hover::before {
    opacity: 1;
}

.product-detail-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    transition: transform 0.6s ease;
}

.product-detail-card:hover .product-detail-image img {
    transform: scale(1.03);
}

.product-detail-image {
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.product-detail-card.reverse {
    grid-template-columns: 1fr 400px;
}

.product-detail-card.reverse .product-detail-image {
    order: 2;
}

.product-detail-card.reverse .product-detail-info {
    order: 1;
}

.product-detail-card:last-child {
    margin-bottom: 0;
}

/* ---------- Product Placeholder Image ---------- */
.product-placeholder {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-sm);
    background: linear-gradient(145deg,
            color-mix(in srgb, var(--accent) 8%, #fff),
            color-mix(in srgb, var(--accent) 15%, #f5f5f5));
    border: 2px dashed color-mix(in srgb, var(--accent) 30%, #ccc);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.product-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}

.product-placeholder-icon {
    font-size: 4rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.product-placeholder-label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent, var(--secondary));
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.product-detail-card:hover .product-placeholder {
    border-color: color-mix(in srgb, var(--accent) 50%, #ccc);
    box-shadow: 0 8px 32px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* ---------- Product Info ---------- */
.product-detail-info {
    padding: 12px 0;
}

.product-number {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--secondary);
    background: rgba(46, 125, 50, 0.08);
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.product-detail-info h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.product-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 24px;
    font-style: italic;
}

.product-detail-block {
    margin-bottom: 20px;
}

.product-detail-block h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.product-detail-block p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ---------- Dosage Badge ---------- */
.dosage-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.06), rgba(46, 125, 50, 0.12));
    border: 1px solid rgba(46, 125, 50, 0.2);
    border-radius: var(--radius-pill);
    margin-top: 8px;
}

.dosage-icon {
    font-size: 1.1rem;
}

.dosage-badge span:last-child {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary);
}

/* ---------- Products CTA ---------- */
.products-cta {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    padding: 80px 0;
}

.products-cta h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.products-cta p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .product-detail-card {
        grid-template-columns: 320px 1fr;
        gap: 40px;
        padding: 32px;
    }

    .product-detail-card.reverse {
        grid-template-columns: 1fr 320px;
    }

    .product-placeholder {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .products-hero {
        min-height: 40vh;
        padding-top: 60px;
    }

    .product-detail-card,
    .product-detail-card.reverse {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
        margin-bottom: 40px;
    }

    .product-detail-card.reverse .product-detail-image {
        order: 0;
    }

    .product-detail-card.reverse .product-detail-info {
        order: 0;
    }

    .product-placeholder {
        height: 260px;
    }

    .product-detail-info h2 {
        font-size: 1.375rem;
    }

    .products-cta {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .product-placeholder {
        height: 220px;
    }

    .product-detail-card {
        padding: 16px;
    }

    .dosage-badge {
        padding: 8px 14px;
    }
}