:root{
    --bg:#f4f8fc;
    --bg-2:#eef4fb;
    --card:#ffffff;
    --text:#0f172a;
    --muted:#64748b;
    --line:#e2e8f0;
    --line-2:#dbe5f0;

    --primary:#0ea5a4;
    --primary-2:#0f766e;
    --primary-soft:#ecfeff;

    --blue:#2563eb;
    --blue-soft:#eff6ff;

    --danger:#e11d48;
    --danger-soft:#fff1f2;

    --orange:#f59e0b;
    --orange-soft:#fff7ed;

    --success:#16a34a;
    --success-soft:#ecfdf5;

    --shadow-sm:0 6px 20px rgba(15,23,42,.05);
    --shadow-md:0 14px 34px rgba(15,23,42,.08);
    --shadow-lg:0 20px 50px rgba(15,23,42,.10);

    --radius-sm:14px;
    --radius-md:20px;
    --radius-lg:28px;

    --container:1180px;
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

html,body{
    margin:0;
    padding:0;
}

body{
    font-family:"Be Vietnam Pro",sans-serif;
    font-size:15px;
    line-height:1.6;
    color:var(--text);
    background:
        radial-gradient(circle at top left, rgba(14,165,164,.08), transparent 28%),
        radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 24%),
        linear-gradient(180deg,#f8fbff 0%,#f2f7fc 100%);
}

a{
    text-decoration:none;
    color:inherit;
}

img{
    max-width:100%;
    display:block;
}

button,
input,
select,
textarea{
    font:inherit;
}

.container{
    width:min(var(--container), calc(100% - 24px));
    margin:0 auto;
}

/* ===== HEADER ===== */
.site-header{
    position:sticky;
    top:0;
    z-index:100;
    background:rgba(255,255,255,.88);
    backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(226,232,240,.85);
    box-shadow:0 4px 20px rgba(15,23,42,.03);
}

.header-inner{
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 0;
}

.logo{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    flex-shrink:0;
}

.logo-badge{
    width:46px;
    height:46px;
    border-radius:16px;
    background:linear-gradient(135deg,var(--primary),var(--blue));
    color:#fff;
    display:grid;
    place-items:center;
    font-weight:800;
    letter-spacing:.5px;
    box-shadow:var(--shadow-md);
}

.logo-text{
    display:flex;
    flex-direction:column;
    min-width:0;
    line-height:1.15;
}

.logo-text strong{
    font-size:16px;
    font-weight:800;
    white-space:nowrap;
}

.logo-text small{
    font-size:12px;
    color:var(--muted);
    white-space:nowrap;
}

.header-search{
    flex:1;
    display:flex;
    align-items:center;
    gap:8px;
    background:#f8fbff;
    border:1px solid var(--line);
    border-radius:999px;
    padding:6px;
    min-width:0;
    box-shadow:var(--shadow-sm);
}

.header-search input{
    flex:1;
    min-width:0;
    border:none;
    background:transparent;
    outline:none;
    padding:10px 14px;
    color:var(--text);
}

.header-search input::placeholder{
    color:#94a3b8;
}

.header-search button{
    border:none;
    padding:11px 16px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--primary),var(--primary-2));
    color:#fff;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
}

.header-search button:hover{
    transform:translateY(-1px);
    opacity:.96;
}

.header-cta{
    padding:12px 16px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--blue),#1d4ed8);
    color:#fff;
    font-weight:700;
    white-space:nowrap;
    box-shadow:var(--shadow-sm);
    transition:.2s ease;
}

.header-cta:hover{
    transform:translateY(-1px);
}

.mobile-nav{
    background:#fff;
    border-bottom:1px solid var(--line);
}

.mobile-nav-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:10px 0;
}

.mobile-nav a{
    flex:1;
    text-align:center;
    color:var(--muted);
    font-size:14px;
    font-weight:700;
    padding:8px 10px;
    border-radius:999px;
    transition:.2s ease;
}

.mobile-nav a:hover{
    background:var(--bg-2);
    color:var(--text);
}

/* ===== GENERAL ===== */
.main-site{
    min-height:60vh;
}

.section{
    padding:26px 0;
}

.section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:12px;
    margin-bottom:16px;
}

.section-head h2{
    margin:0;
    font-size:28px;
    line-height:1.2;
    font-weight:800;
}

.section-head p{
    margin:6px 0 0;
    color:var(--muted);
}

.page-head{
    padding:20px 0 8px;
}

.page-head h1{
    margin:0 0 8px;
    font-size:32px;
    line-height:1.2;
    font-weight:800;
}

.page-head p{
    margin:0;
    color:var(--muted);
}

.breadcrumb{
    margin-bottom:12px;
    color:var(--muted);
    font-size:14px;
}

.breadcrumb a{
    color:var(--blue);
    font-weight:600;
}

.empty-box{
    width:100%;
    background:var(--card);
    border:1px solid var(--line);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
    padding:30px 20px;
    text-align:center;
    color:var(--muted);
}

/* ===== BUTTONS ===== */
.btn,
.btn-outline,
.btn-danger,
.btn-sm{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:none;
    cursor:pointer;
    transition:.2s ease;
    text-align:center;
}

.btn{
    padding:13px 18px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--primary),var(--primary-2));
    color:#fff;
    font-weight:800;
    box-shadow:var(--shadow-sm);
}

.btn:hover{
    transform:translateY(-1px);
    opacity:.97;
}

.btn-outline{
    padding:13px 18px;
    border-radius:999px;
    background:#fff;
    border:1px solid var(--line);
    color:var(--text);
    font-weight:800;
}

.btn-outline:hover{
    background:var(--bg-2);
}

.btn-danger{
    padding:10px 13px;
    border-radius:12px;
    background:var(--danger-soft);
    color:var(--danger);
    font-weight:800;
}

.btn-danger:hover{
    transform:translateY(-1px);
}

.btn-sm{
    padding:10px 13px;
    border-radius:12px;
    background:var(--blue-soft);
    color:var(--blue);
    font-weight:800;
}

.btn-sm:hover{
    transform:translateY(-1px);
}

/* ===== ALERT ===== */
.alert{
    padding:14px 16px;
    border-radius:16px;
    margin:16px 0;
    font-weight:700;
    border:1px solid transparent;
}

.alert-success{
    background:var(--success-soft);
    color:#166534;
    border-color:#bbf7d0;
}

.alert-error{
    background:#fef2f2;
    color:#991b1b;
    border-color:#fecaca;
}

.alert-warning{
    background:#fff7ed;
    color:#9a3412;
    border-color:#fdba74;
}

/* ===== HERO ===== */
.hero{
    padding:28px 0 8px;
}

.hero-grid{
    display:grid;
    grid-template-columns:1.1fr .9fr;
    gap:20px;
    align-items:stretch;
}

.hero-card{
    position:relative;
    overflow:hidden;
    padding:30px;
    border-radius:32px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.18), transparent 28%),
        linear-gradient(135deg,#0f766e 0%,#0ea5a4 45%,#2563eb 100%);
    color:#fff;
    box-shadow:var(--shadow-lg);
}

.hero-card::before{
    content:"";
    position:absolute;
    right:-40px;
    bottom:-40px;
    width:180px;
    height:180px;
    border-radius:50%;
    background:rgba(255,255,255,.10);
}

.hero-card h1{
    margin:0 0 12px;
    font-size:38px;
    line-height:1.15;
    font-weight:800;
    max-width:720px;
    position:relative;
    z-index:1;
}

.hero-card p{
    margin:0 0 18px;
    color:rgba(255,255,255,.92);
    max-width:620px;
    position:relative;
    z-index:1;
}

.hero-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    position:relative;
    z-index:1;
}

.hero-side{
    display:grid;
    gap:16px;
}

.info-card{
    background:rgba(255,255,255,.92);
    border:1px solid rgba(226,232,240,.9);
    border-radius:26px;
    padding:20px;
    box-shadow:var(--shadow-md);
}

.info-card h3{
    margin:0 0 8px;
    font-size:18px;
    font-weight:800;
}

.info-card p{
    margin:0;
    color:var(--muted);
}

/* ===== CATEGORY ===== */
.category-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
}

.category-card{
    position:relative;
    overflow:hidden;
    background:linear-gradient(180deg,#ffffff 0%,#f9fcff 100%);
    border:1px solid var(--line);
    border-radius:24px;
    padding:20px;
    box-shadow:var(--shadow-sm);
    transition:.22s ease;
}

.category-card:hover{
    transform:translateY(-4px);
    box-shadow:var(--shadow-md);
    border-color:#cfe2f3;
}

.category-card::after{
    content:"";
    position:absolute;
    right:-24px;
    top:-24px;
    width:90px;
    height:90px;
    border-radius:50%;
    background:rgba(14,165,164,.08);
}

.category-card strong{
    display:block;
    margin-bottom:6px;
    font-size:17px;
    font-weight:800;
    position:relative;
    z-index:1;
}

.category-card span{
    color:var(--muted);
    font-size:14px;
    position:relative;
    z-index:1;
}

/* ===== BANNER ===== */
.banner-card{
    position:relative;
    overflow:hidden;
    border-radius:30px;
    padding:26px;
    color:#fff;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.18), transparent 25%),
        linear-gradient(135deg,#0f172a 0%,#1d4ed8 100%);
    box-shadow:var(--shadow-lg);
}

.banner-card h3{
    margin:0 0 8px;
    font-size:30px;
    line-height:1.15;
    font-weight:800;
}

.banner-card p{
    margin:0 0 14px;
    color:rgba(255,255,255,.9);
    max-width:700px;
}

/* ===== PRODUCT ===== */
.product-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
}

.product-card{
    background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
    border:1px solid var(--line);
    border-radius:26px;
    overflow:hidden;
    box-shadow:var(--shadow-sm);
    display:flex;
    flex-direction:column;
    transition:.22s ease;
}

.product-card:hover{
    transform:translateY(-4px);
    box-shadow:var(--shadow-md);
    border-color:#d7e3ef;
}

.product-thumb{
    position:relative;
    overflow:hidden;
    background:#eef4fb;
    aspect-ratio:1 / 1;
}

.product-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .35s ease;
}

.product-card:hover .product-thumb img{
    transform:scale(1.04);
}

.product-body{
    display:flex;
    flex-direction:column;
    gap:9px;
    flex:1;
    padding:15px;
}

.badge-row{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    background:var(--primary-soft);
    color:var(--primary-2);
    line-height:1;
}

.badge.alt{
    background:var(--blue-soft);
    color:var(--blue);
}

.badge.hot{
    background:var(--success-soft);
    color:#0f766e;
}

.badge.danger{
    background:var(--danger-soft);
    color:var(--danger);
}

.product-title{
    font-size:16px;
    font-weight:800;
    line-height:1.45;
    color:var(--text);
    min-height:46px;
}

.product-short{
    color:var(--muted);
    font-size:14px;
    line-height:1.55;
    min-height:44px;
}

.price-row{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.price{
    color:var(--danger);
    font-size:20px;
    font-weight:900;
    line-height:1.2;
}

.old-price{
    color:#94a3b8;
    text-decoration:line-through;
    font-size:14px;
    font-weight:600;
}

.product-actions{
    display:flex;
    gap:8px;
    margin-top:auto;
}

.product-actions .btn,
.product-actions .btn-outline{
    flex:1;
    padding:11px 12px;
    font-size:14px;
}

/* ===== PRODUCT DETAIL ===== */
.product-detail{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
    align-items:start;
}

.detail-gallery,
.detail-info{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:30px;
    padding:18px;
    box-shadow:var(--shadow-md);
}

.detail-gallery img{
    width:100%;
    border-radius:22px;
    object-fit:cover;
}

.detail-info h1{
    margin:0 0 10px;
    font-size:32px;
    line-height:1.25;
    font-weight:800;
}

.detail-desc{
    margin:12px 0;
    color:var(--muted);
    font-size:15px;
}

.detail-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:16px;
}

.detail-meta{
    margin-top:16px;
    padding-top:16px;
    border-top:1px dashed var(--line-2);
    color:var(--muted);
    font-size:14px;
    line-height:1.8;
}

.rich-text{
    margin-top:16px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:22px;
    padding:18px;
    box-shadow:var(--shadow-sm);
}

.rich-text h3{
    margin:0 0 10px;
    font-size:20px;
    font-weight:800;
}

/* ===== FOOTER ===== */
.site-footer{
    margin-top:36px;
    background:linear-gradient(180deg,#0f172a 0%,#0b1220 100%);
    color:#fff;
}

.footer-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr;
    gap:24px;
    padding:34px 0;
}

.footer-grid h3,
.footer-grid h4{
    margin:0 0 10px;
    font-weight:800;
}

.footer-grid p{
    margin:0;
    color:rgba(255,255,255,.78);
}

.footer-links{
    margin:0;
    padding:0;
    list-style:none;
}

.footer-links li{
    margin:9px 0;
}

.footer-links a{
    color:rgba(255,255,255,.82);
    transition:.2s ease;
}

.footer-links a:hover{
    color:#fff;
}

.footer-bottom{
    text-align:center;
    padding:14px 10px;
    border-top:1px solid rgba(255,255,255,.08);
    color:rgba(255,255,255,.68);
    font-size:14px;
}

/* ===== FORM ===== */
.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.form-group{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.form-group.full{
    grid-column:1 / -1;
}

.form-group label{
    font-weight:800;
    font-size:14px;
}

.form-control{
    width:100%;
    border:1px solid var(--line);
    background:#fff;
    color:var(--text);
    border-radius:16px;
    padding:12px 14px;
    outline:none;
    transition:.2s ease;
    box-shadow:0 1px 0 rgba(15,23,42,.01);
}

.form-control:focus{
    border-color:#93c5fd;
    box-shadow:0 0 0 4px rgba(37,99,235,.08);
}

textarea.form-control{
    min-height:130px;
    resize:vertical;
}

.check-row{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    align-items:center;
}

/* ===== TABLE ===== */
.table-wrap{
    overflow:auto;
    width:100%;
}

.table{
    width:100%;
    min-width:860px;
    border-collapse:collapse;
}

.table th,
.table td{
    padding:12px 10px;
    border-bottom:1px solid var(--line);
    text-align:left;
    vertical-align:top;
}

.table th{
    color:var(--muted);
    font-size:13px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.2px;
    background:#fbfdff;
}

.table tr:hover td{
    background:#fcfdff;
}

.thumb-mini{
    width:62px;
    height:62px;
    border-radius:14px;
    object-fit:cover;
    background:#eef4fb;
    border:1px solid var(--line);
}

/* ===== ADMIN ===== */
.admin-wrap{
    display:grid;
    grid-template-columns:270px 1fr;
    min-height:100vh;
}

.admin-sidebar{
    background:
        radial-gradient(circle at top left, rgba(14,165,164,.16), transparent 24%),
        linear-gradient(180deg,#0f172a 0%,#111827 100%);
    color:#fff;
    padding:22px 18px;
}

.admin-brand{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:24px;
}

.admin-brand-badge{
    width:44px;
    height:44px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,var(--primary),var(--blue));
    color:#fff;
    font-weight:900;
    box-shadow:var(--shadow-sm);
}

.admin-user{
    margin-bottom:18px;
    color:rgba(255,255,255,.78);
    font-size:14px;
}

.admin-menu{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.admin-menu a{
    padding:12px 14px;
    border-radius:14px;
    color:rgba(255,255,255,.82);
    font-weight:700;
    transition:.2s ease;
}

.admin-menu a:hover,
.admin-menu a.active{
    background:rgba(255,255,255,.10);
    color:#fff;
}

.admin-main{
    background:var(--bg);
    padding:24px;
}

.admin-topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:18px;
}

.admin-card{
    background:linear-gradient(180deg,#ffffff 0%,#fcfdff 100%);
    border:1px solid var(--line);
    border-radius:26px;
    padding:18px;
    box-shadow:var(--shadow-sm);
}

.admin-card h2{
    font-size:22px;
    font-weight:800;
}

.stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
}

.stat-card{
    background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
    border:1px solid var(--line);
    border-radius:24px;
    padding:18px;
    box-shadow:var(--shadow-sm);
    position:relative;
    overflow:hidden;
}

.stat-card::after{
    content:"";
    position:absolute;
    right:-18px;
    top:-18px;
    width:82px;
    height:82px;
    border-radius:50%;
    background:rgba(37,99,235,.06);
}

.stat-card .label{
    position:relative;
    z-index:1;
    color:var(--muted);
    font-size:14px;
    font-weight:700;
}

.stat-card .value{
    position:relative;
    z-index:1;
    margin-top:8px;
    font-size:32px;
    line-height:1.1;
    font-weight:900;
    color:var(--text);
}

.admin-login{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
    background:
        radial-gradient(circle at top left, rgba(14,165,164,.10), transparent 22%),
        radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 18%),
        linear-gradient(180deg,#f8fbff 0%,#f3f7fb 100%);
}

.login-box{
    width:min(480px,100%);
    background:#fff;
    border:1px solid var(--line);
    border-radius:30px;
    padding:30px;
    box-shadow:var(--shadow-lg);
}

/* ===== UTILITY ===== */
.text-muted{
    color:var(--muted);
}

.text-center{
    text-align:center;
}

.mb-0{
    margin-bottom:0 !important;
}

.mt-0{
    margin-top:0 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px){
    .product-grid{
        grid-template-columns:repeat(3,1fr);
    }

    .category-grid{
        grid-template-columns:repeat(3,1fr);
    }

    .stats{
        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width: 991px){
    .hero-grid,
    .product-detail,
    .footer-grid,
    .admin-wrap,
    .form-grid{
        grid-template-columns:1fr;
    }

    .admin-sidebar{
        padding-bottom:10px;
    }

    .admin-main{
        padding:18px;
    }

    .product-grid{
        grid-template-columns:repeat(3,1fr);
    }

    .category-grid{
        grid-template-columns:repeat(3,1fr);
    }
}

@media (max-width: 768px){
    .header-inner{
        flex-wrap:wrap;
    }

    .header-search{
        order:3;
        width:100%;
    }

    .header-cta{
        padding:11px 14px;
        font-size:14px;
    }

    .hero-card{
        padding:24px;
        border-radius:26px;
    }

    .hero-card h1{
        font-size:30px;
    }

    .section-head h2,
    .page-head h1,
    .detail-info h1{
        font-size:25px;
    }

    .banner-card h3{
        font-size:24px;
    }

    .product-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .category-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .stats{
        grid-template-columns:1fr;
    }

    .product-title,
    .product-short{
        min-height:auto;
    }

    .detail-actions .btn,
    .detail-actions .btn-outline{
        width:100%;
    }

    .product-actions{
        flex-direction:column;
    }
}

@media (max-width: 520px){
    .container{
        width:min(100% - 18px, var(--container));
    }

    .logo-text small{
        display:none;
    }

    .mobile-nav a{
        font-size:13px;
        padding:8px 6px;
    }

    .hero{
        padding-top:20px;
    }

    .hero-card h1{
        font-size:27px;
    }

    .section{
        padding:22px 0;
    }

    .section-head h2,
    .page-head h1,
    .detail-info h1{
        font-size:22px;
    }

    .category-grid,
    .product-grid{
        grid-template-columns:1fr 1fr;
        gap:12px;
    }

    .category-card,
    .product-card,
    .detail-gallery,
    .detail-info,
    .admin-card,
    .stat-card,
    .login-box{
        border-radius:20px;
    }

    .product-body{
        padding:13px;
    }

    .product-title{
        font-size:15px;
    }

    .price{
        font-size:18px;
    }

    .admin-main{
        padding:14px;
    }

    .table{
        min-width:760px;
    }
}

@media (max-width: 390px){
    .category-grid,
    .product-grid{
        grid-template-columns:1fr;
    }

    .header-search button{
        padding:10px 13px;
    }

    .header-cta{
        width:100%;
        text-align:center;
    }
}