﻿html {
    font-size: 15px;
    height: 100%; /* Đổi từ min-height thành height */
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f4f7fb;
    color: #172033;
    font-family: Arial, Helvetica, sans-serif;
    /* Thêm 2 dòng này để hỗ trợ cấu trúc của Bootstrap đẩy footer xuống */
    display: flex;
    flex-column: column;
}

a {
    text-decoration: none;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    padding: 0.65rem 1rem;
}

.btn-primary {
    background: #0f766e;
    border-color: #0f766e;
}

    .btn-primary:hover {
        background: #115e59;
        border-color: #115e59;
    }

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.18);
}

.app-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e1e7ef;
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.app-brand {
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 800;
}

.navbar .nav-link {
    color: #455064;
    font-weight: 700;
}

    .navbar .nav-link:hover {
        color: #0f766e;
    }

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0; /* Thay đổi từ '32px 0 80px' thành '32px 0' */
}

.hero {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    gap: 28px;
    align-items: center;
    min-height: 460px;
    padding: 42px;
    border-radius: 8px;
    background: #12343b;
    color: #ffffff;
    overflow: hidden;
}

    .hero h1,
    .page-heading h1,
    .form-intro h1,
    .detail-content h1,
    .delete-panel h1 {
        margin: 0;
        font-weight: 800;
        letter-spacing: 0;
    }

    .hero h1 {
        max-width: 680px;
        font-size: clamp(2.25rem, 5vw, 4.5rem);
        line-height: 1.02;
    }

.hero-copy {
    max-width: 580px;
    margin: 18px 0 0;
    color: #d7e2e5;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-media {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

    .hero-media img,
    .product-image img,
    .detail-image img,
    .gallery img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.eyebrow {
    margin: 0 0 10px;
    color: #0f766e;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #9fe7df;
}

.feature-grid,
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

    .feature-grid article,
    .product-card,
    .app-form,
    .delete-panel,
    .book-list,
    .detail-layout {
        border: 1px solid #e1e7ef;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 14px 32px rgba(23, 32, 51, 0.06);
    }

    .feature-grid article {
        padding: 24px;
    }

    .feature-grid span {
        color: #0f766e;
        font-weight: 800;
    }

    .feature-grid h2,
    .product-card h2,
    .gallery h2 {
        margin: 8px 0;
        font-size: 1.15rem;
        font-weight: 800;
    }

    .feature-grid p,
    .product-body p,
    .form-intro p,
    .detail-content p,
    .delete-summary p,
    .book-list p,
    .category-card p,
    .muted-text {
        margin: 0;
        color: #5f6b7a;
    }

.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

    .page-heading h1 {
        font-size: 2.2rem;
    }

.product-card {
    overflow: hidden;
}

.product-image {
    aspect-ratio: 4 / 3;
    background: #e8eef5;
}

.image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #6b7280;
    font-weight: 800;
}

.product-body {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
}

.product-meta span,
.detail-price {
    color: #0f766e;
    font-size: 1.25rem;
    font-weight: 800;
}

.category-pill {
    display: inline-flex;
    width: fit-content;
    margin: 2px 0 12px;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    background: #e7f7f5;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 800;
}

.mini-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .mini-gallery img {
        width: 52px;
        height: 52px;
        border: 1px solid #e1e7ef;
        border-radius: 8px;
        object-fit: cover;
    }

.edit-preview {
    width: min(260px, 100%);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #e8eef5;
}

    .edit-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.edit-gallery img {
    width: 72px;
    height: 72px;
}

.product-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-layout {
    display: grid;
    grid-template-columns: 0.75fr 1fr;
    gap: 28px;
    align-items: start;
}

.form-intro {
    padding-top: 18px;
}

.app-form {
    padding: 28px;
}

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        margin-bottom: 8px;
        color: #263143;
        font-weight: 800;
    }

.form-control {
    border-color: #d5deea;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    gap: 30px;
    padding: 28px;
}

.detail-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #e8eef5;
}

.detail-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.gallery {
    margin-top: 28px;
}

    .gallery div {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }

    .gallery img {
        aspect-ratio: 1 / 1;
        border-radius: 8px;
    }

.delete-panel {
    max-width: 640px;
    margin: 0 auto;
    padding: 30px;
}

.delete-summary {
    margin: 22px 0;
    padding: 18px;
    border-radius: 8px;
    background: #f8fafc;
}

.delete-image {
    width: 180px;
    aspect-ratio: 4 / 3;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 8px;
    background: #e8eef5;
}

    .delete-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.delete-summary strong,
.delete-summary span {
    display: block;
}

.delete-summary small {
    display: inline-flex;
    margin-top: 6px;
    color: #64748b;
    font-weight: 700;
}

.delete-summary span {
    margin: 6px 0;
    color: #b42318;
    font-weight: 800;
}

.book-list {
    padding: 12px;
}

    .book-list ul {
        display: grid;
        gap: 12px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .book-list li {
        display: flex;
        gap: 14px;
        align-items: center;
        padding: 16px;
        border-radius: 8px;
        background: #f8fafc;
    }

        .book-list li > span {
            display: grid;
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            place-items: center;
            border-radius: 50%;
            background: #0f766e;
            color: #ffffff;
            font-weight: 800;
        }

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(23, 32, 51, 0.06);
}

.category-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 16px;
    background: #12343b;
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 800;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
}

.footer {
    border-top: 1px solid #e1e7ef;
    background: #ffffff;
    color: #64748b;
    margin-top: auto; /* Giữ nguyên dòng này */
    width: 100%;
    position: static !important; /* Thêm dòng này để loại bỏ hoàn toàn thuộc tính absolute ẩn (nếu có) */
}

    .footer .container {
        display: flex;
        min-height: 64px;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

@media (max-width: 900px) {
    .hero,
    .form-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .product-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 24px, 1120px);
        padding-top: 20px;
    }

    .hero {
        padding: 24px;
    }

    .feature-grid,
    .product-grid,
    .category-grid,
    .gallery div {
        grid-template-columns: 1fr;
    }

    .page-heading,
    .footer .container {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Final blue theme pass: keep every page visually consistent. */
.btn-primary,
.btn-gradient,
.btn-gradient-custom,
.btn-gradient-blue-form {
    background: linear-gradient(135deg, #0d6efd, #0a58ca) !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

    .btn-primary:hover,
    .btn-gradient:hover,
    .btn-gradient-custom:hover,
    .btn-gradient-blue-form:hover {
        background: linear-gradient(135deg, #0b5ed7, #084298) !important;
        border-color: #0a58ca !important;
        box-shadow: 0 10px 22px rgba(13, 110, 253, 0.24) !important;
    }

.navbar .nav-link:hover,
.eyebrow,
.feature-grid span,
.product-meta span,
.detail-price,
.category-pill {
    color: #0d6efd !important;
}

.category-pill {
    background: #e7f1ff !important;
}

.hero,
.home-hero {
    background: radial-gradient(circle at top right, #5aa2ff 0%, #0d6efd 34%, #0b1f4d 100%) !important;
}

.book-list li > span,
.category-icon {
    background: linear-gradient(135deg, #0d6efd, #0a58ca) !important;
}

.feature-card:hover,
.tech-product-card:hover,
.category-card:hover {
    border-color: rgba(13, 110, 253, 0.35) !important;
    box-shadow: 0 18px 34px rgba(13, 110, 253, 0.12) !important;
}

.category-filter-bar {
    padding: 1rem;
    border: 1px solid #e5edf9;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.category-filter-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.category-filter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 62px;
    padding: 0.75rem;
    border: 1px solid #dbe7f8;
    border-radius: 16px;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

    .category-filter-item:hover {
        transform: translateY(-2px);
        border-color: rgba(13, 110, 253, 0.35);
        color: #0d6efd;
        box-shadow: 0 12px 24px rgba(13, 110, 253, 0.12);
    }

    .category-filter-item.active {
        border-color: #0d6efd;
        background: linear-gradient(135deg, #0d6efd, #0a58ca);
        color: #ffffff;
    }

.category-filter-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 14px;
    background: #e7f1ff;
    color: #0d6efd;
    font-size: 1.2rem;
}

.category-filter-item.active .category-filter-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Blue TechStore theme overrides */
:root {
    --tech-primary: #0d6efd;
    --tech-primary-dark: #0a58ca;
    --tech-primary-deep: #084298;
    --tech-primary-soft: #e7f1ff;
    --tech-ink: #172033;
    --tech-muted: #64748b;
}

.w-fit {
    width: fit-content;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.78) !important;
}

.btn-primary,
.btn-gradient,
.btn-gradient-custom {
    background: linear-gradient(135deg, var(--tech-primary), var(--tech-primary-dark)) !important;
    border-color: var(--tech-primary) !important;
    color: #ffffff !important;
}

    .btn-primary:hover,
    .btn-gradient:hover,
    .btn-gradient-custom:hover {
        background: linear-gradient(135deg, #0b5ed7, var(--tech-primary-deep)) !important;
        border-color: var(--tech-primary-dark) !important;
        box-shadow: 0 10px 22px rgba(13, 110, 253, 0.24) !important;
    }

.btn-outline-primary {
    border-color: var(--tech-primary) !important;
    color: var(--tech-primary) !important;
}

    .btn-outline-primary:hover {
        background: var(--tech-primary) !important;
        color: #ffffff !important;
    }

.navbar .nav-link:hover,
.eyebrow,
.feature-grid span,
.product-meta span,
.detail-price,
.category-pill {
    color: var(--tech-primary) !important;
}

.category-pill {
    background: var(--tech-primary-soft) !important;
}

.book-list li > span,
.category-icon {
    background: linear-gradient(135deg, var(--tech-primary), var(--tech-primary-dark)) !important;
}

.hero,
.home-hero {
    background: radial-gradient(circle at top right, #5aa2ff 0%, #0d6efd 34%, #0b1f4d 100%) !important;
}

.home-hero {
    height: clamp(620px, calc(100vh - 190px), 720px);
    min-height: 620px;
    max-height: 720px;
    overflow: hidden;
}

    .home-hero .row {
        height: 100%;
        min-height: 620px;
        overflow: hidden;
    }

.home-carousel-col {
    position: relative;
    height: 100%;
    min-height: 620px;
    overflow: hidden;
}

.home-product-carousel {
    position: absolute;
    inset: 0;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden;
}

    .home-product-carousel .carousel-inner,
    .home-product-carousel .carousel-item {
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden;
    }

.home-hero-title {
    max-width: 500px;
    font-size: clamp(2.2rem, 3.35vw, 3.45rem);
}

.home-slide-img {
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    object-position: center;
    background: radial-gradient(circle at center, #172554 0%, #050816 70%);
    filter: saturate(1.08) contrast(1.02);
}

.product-slide-caption {
    right: 8%;
    left: 8%;
    bottom: 4.25rem;
    max-width: 560px;
    height: 185px;
    min-height: 185px;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(8, 18, 43, 0.86), rgba(13, 110, 253, 0.58));
    backdrop-filter: blur(10px);
    overflow: hidden;
}

    .product-slide-caption .d-flex {
        margin-top: auto;
    }

    .product-slide-caption .badge {
        width: fit-content;
        flex: 0 0 auto;
    }

.home-slide-title {
    min-height: 34px;
    max-height: 68px;
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-hero .col-12.col-lg-5 {
    min-height: 620px;
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
}

.home-hero .text-white-75 {
    max-width: 470px;
    font-size: 0.98rem;
}

.home-slide-desc {
    min-height: 42px;
    max-height: 42px;
    line-height: 1.5;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-icon {
    width: 52px;
    height: 52px;
}

.feature-card,
.tech-product-card,
.category-card,
.app-form,
.delete-panel,
.detail-layout {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

    .feature-card:hover,
    .tech-product-card:hover,
    .category-card:hover {
        transform: translateY(-4px);
        border-color: rgba(13, 110, 253, 0.35) !important;
        box-shadow: 0 18px 34px rgba(13, 110, 253, 0.12) !important;
    }

.form-control:focus,
.form-select:focus {
    border-color: var(--tech-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15) !important;
}

@media (max-width: 767px) {
    .home-hero,
    .home-hero .row,
    .home-hero .carousel,
    .home-hero .carousel-inner,
    .home-hero .carousel-item {
        min-height: auto;
    }

    .home-slide-img {
        height: 320px !important;
    }

    .home-carousel-col {
        height: 320px;
        min-height: 320px;
    }

    .home-product-carousel,
    .home-product-carousel .carousel-inner,
    .home-product-carousel .carousel-item {
        height: 320px;
        min-height: 320px;
    }

    .product-slide-caption {
        right: 1rem;
        left: 1rem;
        bottom: 2.5rem;
        height: 132px;
        min-height: 132px;
    }

    .home-slide-title {
        min-height: 44px;
        font-size: 1.1rem;
    }
}
