@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f8fafc;
    color: #1e293b;
    display: grid;
    grid-template-columns: 3fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
    gap: 24px;
    padding: 24px;
}

/* Header */
header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    padding: 48px 24px;
    text-align: center;
    border-radius: 24px;
    grid-column: 1 / span 2;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Nav */
nav {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 16px 32px;
    border-radius: 16px;
    grid-column: 1 / span 2;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 1px 3px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

nav ul li a {
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.3s, transform 0.2s;
    display: inline-block;
}

nav ul li a:hover {
    color: #6366f1;
    transform: translateY(-2px);
}

/* Product List */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    grid-column: 1;
}

.product-card {
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 1px 3px -1px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #e0e7ff;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #f1f5f9;
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h2 {
    font-size: 1.25rem;
    margin: 20px 20px 8px;
    color: #0f172a;
    font-weight: 600;
}

.product-card p {
    margin: 0 20px;
    color: #64748b;
    font-size: 0.95rem;
    flex-grow: 1;
    line-height: 1.5;
}

.product-card p:nth-of-type(2) {
    font-size: 1.35rem;
    font-weight: 700;
    color: #6366f1;
    margin: 16px 20px;
}

/* Sidebar */
.sidebar {
    background-color: #fff;
    padding: 24px;
    border-radius: 20px;
    grid-column: 2;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #f1f5f9;
}

.social-icons {
    width: 100%;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    color: #6366f1;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.social-icons a:hover {
    background-color: #6366f1;
    color: #fff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 48px;
    border-radius: 24px;
    grid-column: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.footer-item h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
    color: #cbd5e1;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-item p {
    color: #94a3b8;
    line-height: 1.7;
}

/* Buttons */
.button {
    background-color: #6366f1;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.button:hover {
    background-color: #4f46e5;
    box-shadow: 0 6px 12px -2px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0) scale(0.98);
}

.product-card .button {
    margin: 16px 20px 20px;
    width: calc(100% - 40px);
}

.back-button {
    background-color: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    margin: 0 0 24px 0;
    display: inline-flex;
    align-items: center;
}

.back-button:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Product Detail */
.product-detail {
    grid-column: 1;
}

.product-detail-card {
    background-color: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.product-detail-content {
    display: flex;
    gap: 48px;
    align-items: center;
}

.product-detail-content img {
    width: 45%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.product-detail-content img:hover {
    transform: scale(1.02);
}

.product-info {
    flex: 1;
}

.product-info h2 {
    font-size: 2.75rem;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.2;
    font-weight: 700;
}

.product-info .desc {
    font-size: 1.15rem;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 32px;
}

.product-info .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 40px;
    display: inline-block;
    padding: 8px 16px;
    background: #e0e7ff;
    border-radius: 12px;
}

.product-info .button {
    margin: 0;
    width: 100%;
    padding: 18px;
    font-size: 1.15rem;
    border-radius: 16px;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    body {
        grid-template-columns: 1fr;
    }
    .sidebar {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    header {
        padding: 32px 16px;
    }
    header h1 {
        font-size: 2rem;
    }
    nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .product-detail-card {
        padding: 24px;
    }
    .product-detail-content {
        flex-direction: column;
        gap: 32px;
    }
    .product-detail-content img {
        width: 100%;
    }
    .product-info h2 {
        font-size: 2rem;
    }
    .product-info .price {
        font-size: 2rem;
    }
}