﻿/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --accent: #f59e0b;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}
body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    background: var(--primary);
    color: var(--white);
    font-weight: 800;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
}
.logo-text { font-size: 20px; font-weight: 700; color: var(--dark); }
.nav { display: flex; gap: 28px; }
.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.search-box { display: flex; gap: 6px; }
.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    width: 180px;
}
.search-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.search-btn:hover { background: var(--primary-dark); }
.cart-link { display: flex; align-items: center; gap: 6px; position: relative; }
.cart-icon {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    padding: 8px 12px;
    background: var(--light-gray);
    border-radius: 6px;
}
.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30,58,95,0.85), rgba(37,99,235,0.7));
}
.hero-content { position: relative; z-index: 1; text-align: center; color: var(--white); }
.hero-title { font-size: 52px; font-weight: 800; margin-bottom: 16px; }
.hero-subtitle { font-size: 20px; margin-bottom: 32px; opacity: 0.9; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }
.btn-full { width: 100%; margin-top: 16px; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { opacity: 0.85; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-gray { background: var(--light-gray); }
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
}

/* ===== Categories ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.category-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}
.category-card h3 { font-size: 18px; margin-bottom: 8px; }
.category-card p { font-size: 14px; color: var(--gray); }

/* ===== Products Grid ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray);
}
.product-info { padding: 16px; }
.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}
.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}
.product-rating { margin-bottom: 12px; font-size: 14px; color: var(--accent); }
.product-actions { display: flex; gap: 8px; }
.btn-add-cart {
    flex: 1;
    padding: 10px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.btn-add-cart:hover { background: var(--primary-dark); }
.btn-view {
    padding: 10px 16px;
    background: var(--light-gray);
    color: var(--dark);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.btn-view:hover { background: var(--border); }

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.feature-card { text-align: center; padding: 24px; }
.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--gray); }

/* ===== Newsletter ===== */
.newsletter {
    background: var(--dark);
    color: var(--white);
    padding: 64px 0;
    text-align: center;
}
.newsletter h2 { font-size: 28px; margin-bottom: 12px; }
.newsletter p { font-size: 16px; margin-bottom: 24px; opacity: 0.8; }
.newsletter-form { display: flex; gap: 12px; max-width: 500px; margin: 0 auto; }
.newsletter-input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
}

/* ===== Footer ===== */
.footer { background: #0f172a; color: #cbd5e1; padding: 48px 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-bottom: 32px;
}
.footer-col h4 { color: var(--white); font-size: 16px; margin-bottom: 16px; }
.footer-col p { font-size: 14px; line-height: 1.7; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 14px; color: #94a3b8; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

/* ===== Page Banner ===== */
.page-banner {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.page-banner h1 { font-size: 36px; margin-bottom: 8px; }
.page-banner p { font-size: 16px; opacity: 0.85; }

/* ===== Products Page Layout ===== */
.products-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.sidebar { position: sticky; top: 90px; align-self: start; }
.filter-section { margin-bottom: 28px; }
.filter-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.filter-list li { margin-bottom: 6px; }
.filter-link {
    font-size: 14px;
    color: var(--gray);
    display: block;
    padding: 6px 12px;
    border-radius: 6px;
    transition: var(--transition);
}
.filter-link:hover, .filter-link.active { background: var(--light-gray); color: var(--primary); font-weight: 600; }
.sort-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.products-main .products-grid { grid-template-columns: repeat(3, 1fr); }

/* ===== Product Detail ===== */
.breadcrumb { font-size: 14px; color: var(--gray); margin-bottom: 24px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product-detail-image {
    height: 450px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray);
}
.product-detail-info h1 { font-size: 28px; margin-bottom: 12px; }
.product-detail-price { font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.product-detail-rating { margin-bottom: 16px; color: var(--accent); font-size: 16px; }
.product-detail-desc { font-size: 15px; color: var(--gray); line-height: 1.8; margin-bottom: 24px; }
.product-detail-features { margin-bottom: 24px; }
.product-detail-features li { padding: 4px 0; font-size: 14px; }
.product-detail-features li:before { content: "\2713 "; color: var(--success); font-weight: 700; }
.qty-selector { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
}
.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
}
.product-detail-actions { display: flex; gap: 12px; }

/* ===== Cart ===== */
.page-title { font-size: 32px; margin-bottom: 32px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
    text-align: left;
    padding: 16px;
    background: var(--light-gray);
    font-size: 14px;
    font-weight: 600;
}
.cart-table td { padding: 16px; border-bottom: 1px solid var(--border); }
.cart-item-img {
    width: 80px;
    height: 80px;
    background: var(--light-gray);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--gray);
}
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
}
.cart-summary {
    margin-top: 24px;
    text-align: right;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}
.cart-summary-total {
    font-size: 20px;
    font-weight: 700;
    border-top: 2px solid var(--border);
    padding-top: 16px;
    margin-top: 8px;
}
.cart-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 12px; }
.empty-cart { text-align: center; padding: 60px 0; }
.empty-cart p { font-size: 18px; color: var(--gray); margin-bottom: 24px; }

/* ===== Checkout ===== */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; }
.checkout-form h2, .order-summary h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.order-summary {
    background: var(--light-gray);
    padding: 24px;
    border-radius: var(--radius);
    align-self: start;
}
.summary-totals { margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.summary-total { font-size: 18px; font-weight: 700; padding-top: 12px; border-top: 1px solid var(--border); }

/* ===== About Page ===== */
.about-content { max-width: 800px; margin: 0 auto; }
.about-content h2 { font-size: 24px; margin: 32px 0 16px; }
.about-content p { font-size: 16px; line-height: 1.8; color: var(--gray); margin-bottom: 16px; }
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 20px 0; }
.value-card { padding: 24px; background: var(--light-gray); border-radius: var(--radius); }
.value-card h3 { font-size: 18px; margin-bottom: 8px; }
.value-card p { font-size: 14px; color: var(--gray); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 20px 0; }
.stat-card { text-align: center; padding: 24px; background: var(--light-gray); border-radius: var(--radius); }
.stat-number { font-size: 36px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 14px; color: var(--gray); margin-top: 4px; }

/* ===== Contact Page ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-item { margin-bottom: 24px; }
.contact-item h3 { font-size: 16px; margin-bottom: 6px; }
.contact-item p { font-size: 15px; color: var(--gray); }
.contact-form-wrap {
    background: var(--light-gray);
    padding: 32px;
    border-radius: var(--radius);
}
.contact-form-wrap h2 { margin-bottom: 20px; }

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .products-main .products-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .checkout-layout { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav { display: none; }
    .search-box { display: none; }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .products-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .products-main .products-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: 1fr; }
    .newsletter-form { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .cart-table { font-size: 13px; }
}
