:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0f172a;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --accent: #f43f5e;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

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

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn-primary) {
    font-weight: 500;
    color: var(--text-main);
}

.nav-links a:not(.btn-primary):hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
    /* Modern curve */
    margin-bottom: 3rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f1f5f9;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed to contain to show full product */
    padding: 1rem;
    transition: transform 0.5s ease;
}

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

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

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Auth Cards */
.auth-card {
    background: white;
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

.form-group label {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    display: block;
}

input {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    font-size: 1rem;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Footer */
footer {
    background: #1e1b4b;
    color: white;
    padding: 4rem 1rem 2rem;
    margin-top: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        gap: 1rem;
        align-items: stretch;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .mobile-menu-btn {
        display: block;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 items per row on mobile */
        gap: 1rem;
    }

    .product-card {
        border-radius: 0.5rem;
    }

    .product-info {
        padding: 1rem;
    }

    .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem !important;
    }

    .container {
        padding: 0 1rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Product Detail Page */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
}

.product-detail-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-description {
    padding: 1.5rem;
    background: var(--bg-main);
    border-radius: var(--radius);
}

.product-description h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.description-content {
    color: var(--text-muted);
    line-height: 1.8;
}

.product-features {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    width: 100%;
    justify-content: center;
}

.product-meta {
    padding: 1.5rem;
    background: var(--bg-main);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meta-item {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-item strong {
    color: var(--text-main);
}

/* Enhanced Product Cards */
.product-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-card .add-to-cart {
    margin: 0 1rem 1rem;
}

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

/* Responsive for Product Detail */
@media (max-width: 900px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-images {
        position: static;
    }

    .product-detail-title {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 2rem;
    }

    .product-features {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Modern Product Card Enhancements */
.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border-color: var(--primary);
}

.product-card-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card .product-img-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.product-card .product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-card .product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.product-card .product-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.product-card .product-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
    padding-top: 0.5rem;
}

.product-card .add-to-cart {
    margin: 0 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
}

.product-card .add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(79 70 229 / 0.3);
}

/* Category Link Hover */
.category-link:hover {
    background: var(--bg-main);
    color: var(--primary) !important;
    transform: translateX(4px);
}

.category-link:hover i {
    color: var(--primary);
}
