.card-img-top {
    width: 100%;
    height: auto;
    display: block;
}

/* Global theme */
:root {
    --primary: #00d4ff;
    --accent: #16213e;
    --bg: #f6f8fa;
    --muted: #6c757d;
    --danger: #ff4757;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--bg);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    color: #212529;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header / navbar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.transparent-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(0, 212, 255, 0.14));
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 180px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.05;
}

.brand-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 1.5px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    margin: 0;
    padding: 0;
}

.brand-tagline {
    color: #cdd8f5;
    font-size: 0.9rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.nav-toggle {
    display: none;
}

.nav-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    margin: 3px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle:checked + .nav-toggle-btn span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-btn span:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked + .nav-toggle-btn span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.nav-toggle-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}

nav a.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    margin: 0;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.18s ease;
}

nav a.nav-btn:hover {
    background: rgba(0, 212, 255, 0.95);
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 212, 255, 0.35);
}

nav a.primary-cta {
    background: #19dfff;
    color: #0a1226;
    border-color: #19dfff;
}

.nav-btn.nav-btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.profile-img {
    height: 20px;
    width: 20px;
    color: #ddd;
    flex-shrink: 0;
}

.home-img {
    height: 20px;
    width: 20px;
    color: #ddd;
}

.cart-img {
    height: 20px;
    width: 20px;
}

.order-img {
    height: 20px;
    width: 20px;
}

.jdm-img {
    height: 42px;
    width: 42px;
}

.index-img {
    height: 70px;
    width: 70px;
}

aside nav a.nav-btn {
    color: #333 !important;
    background: transparent;
    border: 1px solid #ddd;
}

aside nav a.nav-btn:hover {
    background: #e6e6e6;
    color: #000 !important;
    transform: none;
}

/* Containers and layout helpers */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 16px;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: #111;
}

.page-shell {
    min-height: calc(100vh - 180px);
    display: flow-root;
    padding: 0;
}

.page-shell > *:last-child {
    margin-bottom: 0;
}

/* Cards */
.card {
    border-radius: 12px;
    overflow: hidden;
}

.card .card-body {
    padding: 18px;
}

.card-title {
    font-weight: 700;
    font-size: 1rem;
}

/* Forms */
.form-label {
    font-weight: 600;
}

.form-control {
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: none;
    border: 1px solid #e6e9ee;
}

.form-control:focus {
    box-shadow: 0 0 0 0.15rem rgba(0, 212, 255, 0.14);
    border-color: var(--primary);
}

.btn {
    border-radius: 8px;
}

/* Footer */
footer.site-footer {
    padding: 28px 0 12px;
    background: #0c1426;
    text-align: left;
}

.transparent-footer {
    background: linear-gradient(135deg, #0b1221, #0f172a);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.24);
    color: #e8f0ff;
    position: relative;
    margin-top: -12px; /* overlap để che viền trắng còn lại */
    padding-top: 40px;
}

.transparent-footer::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 18px;
    background: linear-gradient(135deg, #0b1221, #0f172a);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 26px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h6 {
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: #e8f0ff;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.footer-desc {
    color: #d4def8;
    margin: 10px 0 0;
    line-height: 1.6;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dfe7ff;
    text-decoration: none;
    padding: 6px 0;
}

.footer-link:hover {
    color: #7cdfff;
}

.footer-col p {
    margin-bottom: 8px;
    color: #dce5ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 18px;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.footer-bottom small {
    color: #c8d3ef;
}

/* Small helpers */
.muted {
    color: var(--muted);
}

.card-img-top.product-img,
.product-img {
    height: 230px;
    object-fit: cover;
    object-position: center;
    background: #0c1426;
    padding: 0;
    border-bottom: 1px solid #0e162a;
    border-radius: 0;
}

/* Cart thumbnails */
.cart-thumb {
    width: 100%;
    max-width: 120px;
    height: 100px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    background: #0c1426;
    display: block;
}

.cart-thumb-mobile {
    max-width: none;
    width: 100%;
    height: 120px;
}

.card .price {
    font-weight: 800;
    color: #c92a2a;
}

/* Responsive Design */
@media (max-width: 1120px) {
    .app-container {
        padding: 24px 18px;
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .main-nav {
        gap: 8px;
    }

    nav a.nav-btn {
        padding: 8px 12px;
    }

    .col-lg-4 {
        flex: 0 0 calc(33.333% - 12px) !important;
        width: calc(33.333% - 12px) !important;
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 48px;
        row-gap: 18px;
    }

    .footer-col {
        height: 100%;
    }
}

@media (max-width: 900px) {
    .header-inner {
        gap: 12px;
    }

    .brand-title {
        font-size: 1.25rem;
        letter-spacing: 1px;
    }

    .brand-tagline {
        font-size: 0.82rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 18px 14px;
    }

    .nav-toggle-btn {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        background: rgba(11, 18, 36, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 14px;
        padding: 10px;
    }

    .nav-toggle:checked ~ .main-nav {
        display: flex;
    }

    .main-nav .nav-btn {
        width: 100%;
        justify-content: space-between;
        padding: 11px 12px;
    }

    .card {
        margin-bottom: 12px;
    }

    .product-img {
        height: 150px;
    }

    .row.g-3 {
        gap: 12px !important;
    }

    .row.g-4 {
        gap: 12px !important;
    }

    .col-md-3,
    .col-md-9,
    .col-md-6 {
        width: 100% !important;
    }

    .col-lg-4 {
        flex: 0 0 calc(50% - 6px) !important;
        width: calc(50% - 6px) !important;
    }

    .display-6 {
        font-size: 1.5rem !important;
    }

    .footer-bottom-inner {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .brand-title {
        font-size: 1.05rem;
        letter-spacing: 0;
    }

    .brand-tagline {
        font-size: 0.75rem;
    }

    .jdm-img {
        height: 36px;
        width: 36px;
    }

    .app-container {
        padding: 14px 12px;
    }

    .main-nav .nav-btn {
        padding: 10px 10px;
        font-size: 0.95rem;
    }

    .page-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .card .card-body {
        padding: 12px;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 14px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .product-img {
        height: 120px;
    }

    .display-6 {
        font-size: 1.3rem !important;
    }

    .row row-cols-md-3 {
        flex-direction: column;
    }

    .col-lg-4 {
        flex: 0 0 100% !important;
        width: 100% !important;
    }

    .col {
        flex: 0 0 100% !important;
    }

    .table {
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 6px 4px !important;
    }

    .alert {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    footer.site-footer {
        padding: 18px 10px;
    }

    .card p {
        margin-bottom: 8px;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        margin-bottom: 8px;
    }

    .navbar-brand {
        font-size: 1.1rem !important;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem !important;
    }

    .form-control {
        margin-bottom: 8px;
    }

    .modal-dialog {
        margin: 0 8px;
    }
}

@media (max-width: 400px) {
    .brand-title {
        font-size: 0.95rem;
    }

    body {
        font-size: 13px;
    }

    nav a.nav-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .card .card-body {
        padding: 10px;
    }

    .form-control {
        padding: 6px 8px;
        font-size: 12px;
    }

    .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .product-img {
        height: 100px;
    }

    .modal-dialog {
        margin: 10px;
    }

    .display-6 {
        font-size: 1.2rem !important;
    }

    footer.site-footer {
        padding: 14px 8px;
        font-size: 0.9rem;
    }

    .d-md-none .col-4 img {
        height: 90px;
        object-fit: cover;
    }
}
