* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    font-size: 23px;
    font-weight: 800;
    white-space: nowrap;
}

.logo span {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
}

.nav-menu a {
    transition: 0.2s;
}

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

.menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 20px;
}

.hero {
    padding: clamp(48px, 7vw, 80px) 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.14), transparent 34%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: clamp(24px, 4vw, 40px);
}

.label {
    display: inline-block;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    margin-bottom: 10px;
}

.hero h1 {
    color: var(--dark);
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.1;
    margin-bottom: 18px;
}

.hero p {
    max-width: 620px;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 18px);
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    font-weight: 800;
    transition: 0.25s;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

.hero-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 22px;
    overflow: hidden;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 8px;
}

.hero-card h3 {
    color: var(--dark);
    font-size: 24px;
    margin-top: 16px;
}

.hero-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section {
    padding: clamp(52px, 6vw, 70px) 0;
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    gap: 32px;
    align-items: center;
}

h2 {
    color: var(--dark);
    font-size: clamp(28px, 4vw, 34px);
    margin-bottom: 14px;
}

.section p {
    color: var(--muted);
}

.info-list {
    display: grid;
    gap: 16px;
}

.info-item {
    display: flex;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

.info-item span {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.info-item h3 {
    color: var(--dark);
    margin-bottom: 4px;
}

.products {
    background: var(--white);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.section-head p {
    color: var(--muted);
    font-weight: 700;
}

.filter-box {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr)) auto;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-box input,
.filter-box select,
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--white);
    transition: 0.2s;
}

.filter-box input:focus,
.filter-box select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: 0.25s;
}

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

.product-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 190px;
    max-height: 260px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.product-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--dark);
    color: var(--white);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.product-info {
    padding: 18px;
}

.product-brand {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.product-info h3 {
    color: var(--dark);
    margin: 6px 0 8px;
    min-height: 52px;
}

.specs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 0;
}

.specs span {
    background: #e0f2fe;
    color: #075985;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
}

.price {
    color: #ef4444;
    font-weight: 900;
    font-size: 20px;
}

.need {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.empty-message {
    grid-column: 1 / -1;
    color: var(--muted);
    background: var(--bg);
    padding: 24px;
    border-radius: 18px;
    text-align: center;
}

.contact-list {
    list-style: none;
    margin-top: 18px;
    display: grid;
    gap: 10px;
    font-weight: 700;
}

.contact-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
}

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

.footer {
    background: var(--dark);
    color: var(--white);
    padding: 28px 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer p,
.footer a {
    color: #cbd5e1;
}

.footer a {
    margin-left: 16px;
}

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

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow);
    animation: pop 0.25s ease;
}

@keyframes pop {
    from {
        transform: scale(0.94);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    font-size: 22px;
    color: var(--dark);
}

.modal-body {
    padding: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
    gap: 20px;
}

.detail-image {
    min-height: 260px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-info h3 {
    color: var(--dark);
    font-size: 26px;
    margin: 6px 0;
}

.detail-info p {
    color: var(--muted);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

.spec-table td {
    border-bottom: 1px solid var(--border);
    padding: 9px 0;
}

.spec-table td:first-child {
    width: 125px;
    color: var(--muted);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(80px);
    background: var(--dark);
    color: var(--white);
    padding: 12px 18px;
    border-radius: 14px;
    opacity: 0;
    transition: 0.3s;
    z-index: 300;
    font-weight: 700;
}

.toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Trang bài lab */

.lab-page {
    background: #f3f4f6;
}

.lab-header {
    background: #1d4ed8;
    color: var(--white);
    padding: 30px 0;
}

.lab-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.lab-header h1 {
    font-size: 30px;
    margin-bottom: 6px;
}

.lab-header p {
    color: #dbeafe;
}

.lab-home-link {
    color: var(--white);
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
    padding: 10px 14px;
    border-radius: 12px;
}

.lab-home-link:hover {
    background: rgba(255, 255, 255, 0.24);
}

.lab-main {
    padding: 34px 0 70px;
}

.lab-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 700;
}

.back-link {
    color: #020617;
    font-weight: 800;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.lab-card {
    min-height: 184px;
    background: var(--white);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: 0.25s;
}

.lab-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.lab-card h2 {
    color: #020617;
    font-size: 18px;
    line-height: 1.25;
    margin-bottom: 12px;
}

.lab-card ul {
    list-style: none;
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
}

.lab-card a,
.lab-card span {
    color: #020617;
    font-size: 14px;
}

.lab-card a:hover {
    color: var(--primary);
}

.lab-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #19c6d4;
    color: var(--white) !important;
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 5px;
}

.lab-btn:hover {
    background: #0891b2;
}

@media (max-width: 1100px) {
    .filter-box {
        grid-template-columns: 1fr 1fr;
    }

    .filter-box .btn {
        grid-column: 1 / -1;
    }

    .lab-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .hero-card {
        max-width: 620px;
        margin: auto;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-image {
        min-height: 220px;
    }
}

@media (max-width: 760px) {
    .nav {
        min-height: auto;
        padding: 14px 0;
    }

    .menu-btn {
        display: block;
        flex-shrink: 0;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 16px;
        right: 16px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: var(--shadow);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .filter-box,
    .product-grid,
    .lab-grid {
        grid-template-columns: 1fr;
    }

    .filter-box .btn {
        width: 100%;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content,
    .lab-header-content,
    .lab-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer a {
        display: inline-block;
        margin-left: 0;
        margin-right: 12px;
        margin-top: 8px;
    }

    .hero-image-wrap {
        aspect-ratio: 4 / 3;
    }

    .product-img {
        min-height: 230px;
        max-height: none;
    }

    .modal {
        border-radius: 18px;
    }

    .spec-table td {
        display: block;
        width: 100%;
    }

    .spec-table td:first-child {
        width: 100%;
        padding-bottom: 2px;
        font-weight: 800;
    }

    .spec-table td:last-child {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .logo {
        font-size: 20px;
    }

    .logo span {
        width: 36px;
        height: 36px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-card,
    .contact-form,
    .product-card {
        border-radius: 18px;
    }

    .product-info {
        padding: 16px;
    }

    .lab-header h1 {
        font-size: 26px;
    }
}

/* Fix ảnh laptop: giữ đúng tỉ lệ, không méo, không tràn khung */
.hero-card img {
    width: 100%;
    height: clamp(220px, 32vw, 320px);
    object-fit: contain;
    object-position: center;
    background: var(--white);
    border-radius: 22px;
    padding: 12px;
}

.product-img {
    height: clamp(190px, 22vw, 240px);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.detail-image {
    min-height: 260px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.detail-image img {
    width: 100%;
    height: 100%;
    max-height: 340px;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 720px) {
    .hero-card img {
        height: 240px;
    }

    .product-img {
        height: 230px;
    }

    .detail-image {
        min-height: 220px;
    }
}

/* Footer thông tin sinh viên cho báo cáo */
.student-footer {
    background: var(--dark);
    color: var(--white);
    padding: 34px 0;
}

.footer-report {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 28px;
    align-items: start;
}

.footer-about h3,
.student-info h3 {
    color: var(--white);
    margin-bottom: 10px;
}

.footer-about p {
    color: #cbd5e1;
    margin-bottom: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    color: #cbd5e1;
    font-weight: 700;
}

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

.student-info {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 20px;
}

.student-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.student-info-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px 14px;
}

.student-info-item span {
    display: block;
    color: #cbd5e1;
    font-size: 13px;
    margin-bottom: 4px;
}

.student-info-item strong {
    display: block;
    color: var(--white);
    font-size: 15px;
    line-height: 1.4;
}

@media (max-width: 820px) {
    .footer-report {
        grid-template-columns: 1fr;
    }

    .student-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .student-footer {
        padding: 28px 0;
    }

    .student-info {
        padding: 16px;
    }

    .student-info-item {
        padding: 11px 12px;
    }
}
