
/* ========================================
   SHOP_DIEN_THOAI - SITE.CSS
   ======================================== */

/* 1. MÀU S?C CHUNG */
:root {
    --shop-blue: #3267b1;
    --shop-blue-dark: #285794;
    --shop-ink: #223047;
    --shop-muted: #6b778a;
    --shop-border: #e3e9f2;
    --shop-bg: #f7f9fc;
}

html {
    font-size: 15px;
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--shop-bg);
    color: var(--shop-ink);
    font-family: 'Segoe UI', Arial, sans-serif;
}

a {
    color: var(--shop-blue);
}

    a:hover {
        color: var(--shop-blue-dark);
    }

/* 2. HEADER VÀ MENU */
.site-header {
    background: white;
    border-bottom: 1px solid var(--shop-border);
}

    .site-header .navbar {
        min-height: 68px;
    }

.brand {
    font-weight: 700;
    color: #234e8c !important;
    font-size: 1.16rem;
    letter-spacing: -.3px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 29px;
    height: 29px;
    margin-right: 7px;
    border-radius: 7px;
    background: #e4edfb;
    color: #356bb4;
    font-size: 19px;
    vertical-align: middle;
}

.navbar .nav-link {
    color: #4a5870;
    font-weight: 500;
    padding: .55rem .85rem !important;
    border-radius: 6px;
    transition: .2s;
}

    .navbar .nav-link:hover {
        color: var(--shop-blue);
        background: #f1f5fc;
    }

/* 3. N?I DUNG CHÍNH */
.site-main {
    padding-top: 34px;
    padding-bottom: 65px;
    min-height: calc(100vh - 144px);
}

/* 4. FOOTER */
.site-footer {
    border-top: 1px solid var(--shop-border);
    background: white;
    color: #798495;
    font-size: .88rem;
}

.footer-inner {
    min-height: 63px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* 5. BUTTON */
.btn {
    border-radius: 7px;
    padding: .6rem 1.05rem;
    font-weight: 600;
}

.btn-shop {
    color: white;
    background: var(--shop-blue);
    border-color: var(--shop-blue);
}

    .btn-shop:hover,
    .btn-shop:focus {
        color: white;
        background: var(--shop-blue-dark);
        border-color: var(--shop-blue-dark);
    }

.btn-outline-secondary {
    color: #52637c;
    border-color: #cad3df;
    background: white;
}

    .btn-outline-secondary:hover {
        background: #f0f3f8;
        color: #37455a;
        border-color: #b9c4d3;
    }

.btn:focus-visible,
a:focus-visible,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 .18rem rgba(50,103,177,.17);
}

/* 6. BANNER TRANG CH? */
.intro-section {
    display: grid;
    grid-template-columns: 1.5fr .8fr;
    align-items: center;
    gap: 24px;
    background: #eaf1fc;
    border: 1px solid #dbe6f5;
    padding: 42px 50px;
    border-radius: 13px;
    overflow: hidden;
}

.eyebrow {
    display: block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: #436eaa;
    margin-bottom: 15px;
}

.intro-copy {
    align-self: center;
}

    .intro-copy h1 {
        font-size: clamp(1.9rem, 3.8vw, 2.75rem);
        letter-spacing: -.035em;
        line-height: 1.16;
        font-weight: 750;
        margin: 0 0 15px;
    }

    .intro-copy p {
        max-width: 470px;
        color: #596b84;
        line-height: 1.75;
        font-size: 1.04rem;
        margin-bottom: 23px;
    }

/* 7. ?NH TH?T TRONG BANNER */
.intro-picture {
    min-height: 235px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image {
    display: block;
    width: 100%;
    max-width: 360px;
    max-height: 250px;
    object-fit: contain;
    margin: auto;
    transition: transform .25s ease;
}

.intro-picture:hover .banner-image {
    transform: scale(1.04);
}

/* 8. TIÊU ?? DANH SÁCH S?N PH?M */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 19px;
}

    .section-heading h2 {
        font-size: 1.55rem;
        margin: 0 0 5px;
        font-weight: 700;
    }

    .section-heading p {
        margin: 0;
        color: var(--shop-muted);
    }

.text-link {
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

/* 9. L??I S?N PH?M */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 19px;
}

/* 10. TH? S?N PH?M */
.product-card {
    background: white;
    border: 1px solid var(--shop-border);
    border-radius: 11px;
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

    .product-card:hover {
        transform: translateY(-3px);
        border-color: #c6d6ea;
        box-shadow: 0 7px 20px rgba(29,54,88,.07);
    }

/* 11. KHU V?C ?NH S?N PH?M */
.product-illustration {
    height: 180px;
    background: #f3f6fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ?nh th?t c?a s?n ph?m */
.product-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform .25s ease;
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

/* 12. THÔNG TIN S?N PH?M */
.product-card-body {
    padding: 19px;
}

.product-category {
    text-transform: uppercase;
    color: #7c8797;
    font-size: .73rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: .04em;
}

.product-card h3 {
    margin: 0 0 18px;
    font-size: 1.07rem;
    font-weight: 650;
    line-height: 1.45;
}

.product-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

    .product-card-bottom strong {
        color: #b63f40;
        font-size: 1.02rem;
    }

    .product-card-bottom a {
        font-weight: 600;
        text-decoration: none;
    }

/* 13. TIÊU ?? TRANG QU?N LƯ */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

    .page-head h1 {
        font-weight: 720;
        font-size: clamp(1.7rem, 2.4vw, 2.1rem);
        margin: 0 0 7px;
    }

    .page-head p {
        color: var(--shop-muted);
        margin: 0;
    }

/* 14. KHUNG N?I DUNG */
.content-panel {
    padding: 26px;
    background: white;
    border: 1px solid var(--shop-border);
    border-radius: 11px;
}

.small-panel {
    max-width: 780px;
    line-height: 1.7;
}

    .small-panel h1 {
        font-size: 1.7rem;
        margin-bottom: 14px;
    }

    .small-panel p {
        color: #56657a;
    }

/* 15. T̀M KI?M VÀ L?C S?N PH?M */
.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-search {
    flex: 2 1 250px;
}

.filter-category {
    flex: 1 1 200px;
}

.filter-form .btn {
    white-space: nowrap;
}

/* 16. FORM NH?P LI?U */
.form-label {
    font-weight: 600;
    font-size: .92rem;
    color: #46566d;
}

.form-control,
.form-select {
    min-height: 43px;
    border-radius: 7px;
    border-color: #ced8e5;
}

.form-panel {
    max-width: 720px;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.field-error {
    display: block;
    font-size: .86rem;
    margin-top: 5px;
}

/* 17. B?NG QU?N LƯ S?N PH?M */
.table-responsive {
    scrollbar-color: #cdd9e8 transparent;
}

.product-table {
    margin-bottom: 0;
    white-space: nowrap;
}

    .product-table th {
        border-bottom-color: #dce4ef;
        background: #f7f9fc;
        color: #60718a;
        font-size: .85rem;
        font-weight: 700;
        padding: 13px 12px;
    }

    .product-table td {
        padding: 15px 12px;
        border-color: #eef1f5;
    }

    .product-table tbody tr:hover td {
        background: #fafcff;
    }

.code-tag {
    border-radius: 5px;
    padding: 5px 8px;
    background: #edf2f9;
    color: #486486;
    font-weight: 650;
    font-size: .89rem;
}

/* 18. NÚT S?A / XÓA / CHI TI?T */
.table-actions {
    min-width: 180px;
}

    .table-actions a {
        text-decoration: none;
        margin-left: 13px;
        font-weight: 600;
    }

.delete-link {
    color: #c14a4a;
}

    .delete-link:hover {
        color: #983737;
    }

/* 19. KHÔNG CÓ S?N PH?M */
.empty-state {
    padding: 35px 16px;
    text-align: center;
    color: #63748c;
    border: 1px dashed #d7e1ec;
    border-radius: 8px;
    background: white;
}

/* 20. TRANG XEM CHI TI?T */
.detail-panel {
    max-width: 750px;
}

.detail-list {
    margin-bottom: 0;
}

    .detail-list > div {
        display: grid;
        grid-template-columns: 190px 1fr;
        padding: 14px 0;
        border-bottom: 1px solid #edf0f4;
    }

        .detail-list > div:last-child {
            border-bottom: 0;
        }

    .detail-list dt {
        color: #66758a;
        font-weight: 600;
    }

    .detail-list dd {
        margin: 0;
        font-weight: 600;
    }

/* 21. TABLET */
@media (max-width: 900px) {
    .intro-section {
        grid-template-columns: 1fr .7fr;
        padding: 32px;
    }

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

/* 22. ?I?N THO?I */
@media (max-width: 650px) {

    .site-main {
        padding-top: 25px;
        padding-bottom: 45px;
    }

    .intro-section {
        grid-template-columns: 1fr;
        padding: 28px 23px 20px;
        gap: 15px;
    }

    .intro-copy h1 {
        font-size: 1.85rem;
    }

    .intro-copy p {
        font-size: .98rem;
    }

    /* Gi? ?nh banner trên ?i?n tho?i */
    .intro-picture {
        display: flex;
        min-height: 160px;
    }

    .banner-image {
        max-height: 180px;
        max-width: 270px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-illustration {
        height: 195px;
    }

    .product-image {
        padding: 18px;
    }

    .page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .content-panel {
        padding: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search,
    .filter-category {
        flex: 0 0 auto;
        width: 100%;
    }

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

    .detail-list > div {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .footer-inner {
        justify-content: center;
        text-align: center;
        padding: 17px 0;
    }
}

/* 23. GI?M HI?U ?NG N?U NG??I DÙNG CÀI ??T */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-image,
    .banner-image,
    .navbar .nav-link {
        transition: none;
    }

        .product-card:hover,
        .product-card:hover .product-image,
        .intro-picture:hover .banner-image {
            transform: none;
        }
}
