/* --- Global Styles & Variables --- */
:root {
    --primary-color: #2563eb; /* Blue 600 */
    --primary-hover: #1d4ed8; /* Blue 700 */
    --secondary-color: #111827; /* Gray 900 */
    --text-color: #374151; /* Gray 700 */
    --light-gray: #f9fafb; /* Gray 50 */
    --border-color: #e5e7eb; /* Gray 200 */
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 20px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(45deg, rgba(29, 78, 216, 0.9), rgba(37, 99, 235, 0.9)), url('https://images.unsplash.com/photo-1554224155-1696413565d3?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.cta-button {
    background-color: #fff;
    color: var(--primary-color);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- Product Grid --- */
.product-grid-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.product-grid-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.product-card .img-container {
    width: 100%;
    padding: 20px; /* Add padding around the image */
    background-color: #fff;
    aspect-ratio: 1/1; /* Ensure a square container */
}

.product-card .img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from 'cover' to 'contain' */
}

.product-card .card-content {
    padding: 0 20px 20px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary-color);
    min-height: 3.5em; /* Ensures titles align by giving space for 2 lines */
    line-height: 1.4;
    margin-bottom: 15px;
}

.product-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* This is the key change to push footer to the bottom */
}

.product-card .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-card .details-button {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.product-card .details-button:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* --- Product Detail Page --- */
.product-detail-page {
    padding: 60px 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.product-gallery .main-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    aspect-ratio: 1/1;
    object-fit: cover;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.thumbnail-images .thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    object-fit: cover;
}

.thumbnail-images .thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail-images .thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
}

.product-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
}

.product-info .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
}

.product-info .description {
    margin-bottom: 30px;
}

.product-info .description p {
    margin-bottom: 15px;
}

.product-info .description ul {
    list-style-position: inside;
    padding-left: 5px;
}

.product-info .description ul li {
    margin-bottom: 8px;
}

.buy-now-button {
    display: inline-block;
    width: 100%;
    padding: 18px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    color: #fff;
}

.buy-now-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}


/* --- Footer --- */
footer {
    background-color: var(--secondary-color);
    color: #fff;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-icon {
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon svg {
    width: 28px;
    height: 28px;
}

.social-icon:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}


/* --- Scroll Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Simple hiding for mobile, can be replaced with a hamburger menu */
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .product-layout {
        grid-template-columns: 1fr;
    }
    .product-info h1 {
        font-size: 2rem;
    }
}
