:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --bg-color: #f9fafb;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Navbar */
.navbar {
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon-container {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: var(--white);
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: var(--transition);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1rem;
}

.cart-close {
    cursor: pointer;
    font-size: 1.5rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-info p {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
}

.cart-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
}

.cart-overlay.active {
    display: block;
}

/* Enhanced Detail Page */
.detail-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.add-cart-btn.active-filter {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.add-cart-btn {
    background-color: var(--gray-100);
    color: var(--text-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.add-cart-btn:hover {
    background-color: var(--gray-200);
}

.product-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* Review Section */
.reviews-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--gray-200);
}

.review-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stars { color: #fbbf24; }

/* FAQ Section */
.faq-section {
    margin-top: 4rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 1rem;
}

.faq-item h4 { margin-bottom: 0.5rem; }

/* Related Products */
.related-products {
    margin-top: 4rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    z-index: 3000;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
}

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

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

.nav-links a {
    font-weight: 500;
    color: var(--gray-500);
    transition: var(--transition);
}

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

.contact-btn {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    transition: var(--transition);
}

.contact-btn:hover {
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #111827;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: -2rem auto 3rem;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: var(--shadow);
    outline: none;
}

/* Product Section */
.products-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 180px;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    position: relative;
}

.product-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.view-btn {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background-color: #111827;
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9ca3af;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Product Detail Page */
.detail-container {
    padding: 4rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.detail-image {
    width: 100%;
    height: 400px;
    background-color: var(--gray-200);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.buy-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.buy-btn:hover {
    background-color: var(--secondary-color);
}

.detail-tabs {
    margin-top: 3rem;
}

.tab-buttons {
    display: flex;
    gap: 2rem;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Policy & Contact Pages */
.policy-page {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.policy-page h1 {
    margin-bottom: 2rem;
    text-align: center;
}

.policy-page h2 {
    margin: 2rem 0 1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-item {
    margin-bottom: 2rem;
}

.contact-info-item h3 {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .detail-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
}
