/* --- 1. BIẾN & THIẾT LẬP CHUNG --- */
:root {
    --primary: #000000;
    --accent: #2563eb;
    --text: #1f2937;
    --light-bg: #f9fafb;
    --border: #e5e7eb;
    --white: #ffffff;
    --muted: #6b7280;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    color: var(--text);
    line-height: 1.6;
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* --- 2. HEADER --- */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.logo a,
.footer-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span, .footer-logo span { color: var(--accent); }

.navbar { flex: 1; display: flex; justify-content: center; }
.nav-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 14px;
    color: #4b5563;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-icons a {
    color: #111827;
    transition: var(--transition);
}

.header-icons a:hover { color: var(--accent); }

.cart-icon {
    position: relative;
    font-size: 18px;
}

.badge {
    position: absolute;
    top: -9px;
    right: -11px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 999px;
}

.btn-login {
    background: var(--primary);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* --- 3. HERO --- */
.hero {
    padding: 96px 0;
    background: var(--light-bg);
}

.hero-wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content { flex: 1; }

.sub-title {
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 2px;
}

.hero-content h1 {
    font-size: 52px;
    line-height: 1.08;
    margin: 18px 0 18px;
    color: var(--primary);
    letter-spacing: -1.8px;
}

.hero-content p {
    color: #4b5563;
    font-size: 16px;
    max-width: 560px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.btn-cta, .btn-outline, .btn-newsletter {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    transition: var(--transition);
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cta {
    background: var(--primary);
    color: white;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-cta:hover, .btn-outline:hover {
    transform: translateY(-3px);
}

.btn-cta:hover { opacity: 0.86; }
.btn-outline:hover { background: var(--primary); color: white; }

.hero-image { flex: 1; text-align: center; }
.hero-image img {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.1));
}

/* --- 4. FEATURES --- */
.features {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 28px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 0;
}

.feature-card i {
    font-size: 28px;
    color: var(--accent);
    width: 34px;
    text-align: center;
}

.feature-text h3 { font-size: 16px; margin-bottom: 4px; }
.feature-text p { font-size: 13px; color: #6b7280; }

/* --- 5. PRODUCTS SECTION --- */
.products-section { padding: 80px 0; }

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    letter-spacing: -1px;
    color: var(--primary);
}

.section-subtitle {
    color: #6b7280;
    font-size: 15px;
    margin-top: 8px;
}

.underline {
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 999px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transform: translateY(-5px);
}

.product-img {
    height: 220px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-hot, .tag-new {
    position: absolute;
    top: 0;
    left: 0;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.tag-hot { background: #ef4444; }
.tag-new { background: #16a34a; }

.product-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    min-height: 48px;
}

.product-meta {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

.price {
    color: var(--accent);
    font-weight: 800;
    font-size: 18px;
    margin: 10px 0 18px;
}

.btn-add-cart {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* --- 6. SMALL BANNER --- */
.small-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #1d4ed8 100%);
    padding: 50px 0;
}

.small-banner-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.small-banner-content { color: white; }

.banner-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.small-banner-content h3 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.small-banner-content h3 strong { color: #fbbf24; }

.small-banner-content p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
}

.small-banner .btn-cta {
    background: white;
    color: var(--accent);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

.small-banner .btn-cta:hover {
    background: #fbbf24;
    color: #1e3a8a;
}

/* --- 7. NEW ARRIVALS --- */
.new-arrivals-section {
    padding: 80px 0;
    background: var(--light-bg);
}

/* --- 8. NEWSLETTER --- */
.newsletter-section {
    padding: 80px 0;
    background: var(--primary);
}

.newsletter-wrapper {
    text-align: center;
}

.newsletter-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
}

.newsletter-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto 32px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 540px;
    margin: 0 auto;
}

.newsletter-input,
.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-input,
.form-textarea {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
}

.form-textarea {
    min-height: 160px;
    resize: vertical;
}

.newsletter-input::placeholder,
.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

.newsletter-input:focus,
.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

.form-input:focus,
.form-textarea:focus {
    background: white;
}

.btn-newsletter {
    background: var(--accent);
    color: white;
    border: none;
    white-space: nowrap;
}

.btn-newsletter:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.newsletter-note {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    margin-top: 16px;
}

.newsletter-note i { margin-right: 5px; }

/* --- 9. FOOTER --- */
.main-footer {
    background: #111827;
    color: #d1d5db;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 50px;
}

.footer-logo {
    color: white;
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #9ca3af;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.footer-heading {
    font-size: 15px;
    font-weight: 800;
    color: white;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links li { margin-bottom: 10px; }

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

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.footer-contact i {
    color: var(--accent);
    width: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
}

.footer-bottom-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom p {
    font-size: 13px;
    color: #6b7280;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    font-size: 13px;
    color: #6b7280;
    transition: var(--transition);
}

.footer-bottom-links a:hover { color: white; }

/* --- EXTRA SECTIONS --- */
.page-hero {
    padding: 70px 0 40px;
    background: var(--light-bg);
}

.page-hero .section-title { margin-bottom: 14px; }

.page-intro {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    color: #6b7280;
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 34px;
}

.filter-pill {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.detail-section {
    padding: 80px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.detail-gallery {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.detail-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.detail-title {
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -1.6px;
    margin: 10px 0 14px;
}

.detail-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent);
    margin: 14px 0 14px;
}

.detail-list {
    margin: 18px 0 26px;
    padding-left: 18px;
    color: #4b5563;
}

.detail-list li { margin-bottom: 8px; }

.info-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary);
}

.info-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 26px;
}

.info-metric {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.info-metric strong {
    display: block;
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 4px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-body {
    padding: 22px;
}

.blog-card-body .blog-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}

.blog-card-body h3 {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--primary);
}

.blog-card-body p {
    color: #6b7280;
    font-size: 14px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.stat-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-size: 28px;
    color: var(--accent);
    line-height: 1;
}

.stat-box span {
    font-size: 13px;
    color: #6b7280;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 34px;
    align-items: start;
}

.contact-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.contact-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.contact-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
}

.contact-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 18px;
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 12px;
}

.form-input, .form-textarea {
    width: 100%;
    background: #fff;
    color: var(--text);
}

.form-textarea { min-height: 180px; }

.contact-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.cart-wrap {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 18px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cart-table th {
    background: #f8fafc;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cart-product img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.qty-control button {
    border: 0;
    background: #f8fafc;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.qty-control span {
    width: 34px;
    text-align: center;
    font-weight: 700;
}

.cart-summary {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.summary-box {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #4b5563;
}

.summary-row.total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
}

/* --- 10. RESPONSIVE --- */
@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: repeat(2, 1fr); }
    .cart-summary { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .hero-wrapper,
    .detail-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-wrapper,
    .small-banner-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .hero-image { order: -1; }

    .hero-content h1,
    .detail-title {
        font-size: 40px;
    }

    .hero-btns,
    .small-banner-wrapper {
        justify-content: center;
    }

    .navbar { display: none; }
    .header-wrapper { justify-content: space-between; }

    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .newsletter-form { flex-direction: column; }
    .btn-newsletter { width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .contact-grid { gap: 22px; }
    .form-row { grid-template-columns: 1fr; }
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr { border-bottom: 1px solid var(--border); }
    .cart-table td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        align-items: center;
    }
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #6b7280;
    }
    .cart-product { justify-content: flex-end; text-align: right; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .hero { padding: 72px 0; }
    .hero-content h1, .detail-title { font-size: 32px; }
    .section-title h2, .newsletter-content h2 { font-size: 28px; }
    .product-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom-wrapper { flex-direction: column; text-align: center; }
    .about-stats { grid-template-columns: 1fr; }
    .cart-product img { width: 60px; height: 60px; }
}
