:root {
    --bg: #f6f3f8;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #667085;
    --line: #e7dfed;
    --primary: #b43df5;
    --primary-2: #ff4fd8;
    --dark: #071133;
    --footer: #030b1d;
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    text-decoration: none;
    transition: 0.2s ease;
}

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

.site-main {
    min-height: 60vh;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #ece7f3;
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: #9b5cff;
    font-size: 14px;
}

.logo-text {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    align-items: center;
    gap: 42px;
}

.main-nav a {
    color: #475467;
    font-weight: 600;
    font-size: 17px;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-action-item {
    color: #64748b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-action-item:hover {
    color: var(--primary);
}

.header-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
}

.header-profile img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3e8ff;
}

.hero-section {
    padding: 26px 0 42px;
}

.hero-banner {
    position: relative;
    min-height: 540px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-banner > img {
    width: 100%;
    height: 540px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 46%, rgba(0,0,0,.08) 100%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: 58px;
    bottom: 58px;
    max-width: 620px;
    color: #fff;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}

.hero-content h1 {
    margin: 0 0 14px;
    font-size: 52px;
    line-height: 1.05;
    font-weight: 900;
}

.hero-content p {
    margin: 0 0 24px;
    font-size: 18px;
    color: rgba(255,255,255,.9);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-btn {
    background: var(--dark);
    color: #fff;
    padding: 16px 24px;
    border-radius: 18px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-btn:hover {
    background: #050d28;
    color: #fff;
    transform: translateY(-1px);
}

.hero-link-btn {
    color: #fff;
    font-weight: 700;
    padding: 15px 4px;
}

.hero-link-btn:hover {
    color: #fff;
    opacity: .8;
}

.page-hero {
    padding: 40px 0 10px;
}

.page-hero-small .page-hero-content {
    background: linear-gradient(135deg, #ffffff, #f8f0ff);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.page-hero-content h1 {
    margin: 8px 0 8px;
    font-size: 42px;
    font-weight: 900;
    color: #081a44;
}

.page-hero-content p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.product-section {
    padding: 26px 0 42px;
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: 52px;
    line-height: 1.08;
    font-weight: 900;
    color: #081a44;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    margin-right: 10px;
    vertical-align: middle;
}

.icon-box.yellow {
    background: linear-gradient(135deg, #ffca28, #ff9100);
}

.icon-box.orange {
    background: linear-gradient(135deg, #ffb703, #fb5607);
}

.view-all {
    background: #fff;
    color: #667085;
    border: 1px solid #ddd7e3;
    padding: 14px 20px;
    border-radius: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.view-all:hover {
    color: var(--primary);
    border-color: #d3b7ff;
    transform: translateY(-1px);
}

.product-card {
    background: var(--card);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
}

.thumb {
    position: relative;
    height: 430px;
    background: #111;
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dark-thumb {
    background: linear-gradient(180deg, #1b1b1f, #28282f);
}

.badge-top,
.badge-second {
    position: absolute;
    z-index: 2;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.badge-top {
    top: 18px;
}

.badge-second {
    top: 72px;
}

.badge-orange {
    background: linear-gradient(135deg, #ffca28, #ff6d00);
}

.badge-green {
    background: linear-gradient(135deg, #22c55e, #10b981);
}

.badge-red {
    background: linear-gradient(135deg, #ff4d4f, #ff6a00);
}

.body {
    padding: 22px;
}

.body h3 {
    margin: 0 0 16px;
    min-height: 70px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 900;
}

.body h3 a {
    color: var(--text);
}

.body h3 a:hover {
    color: var(--primary);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.author-box img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
}

.author-box strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
}

.author-box span {
    display: block;
    color: #98a2b3;
    font-size: 14px;
    margin-top: 3px;
}

.rating-row {
    width: max-content;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #f2de7b;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stars {
    color: #0fb981;
    letter-spacing: 1px;
}

.rating-row strong {
    font-weight: 800;
}

.rating-row small {
    color: #667085;
    font-size: 13px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    border-top: 1px dashed #e4e7ec;
    padding-top: 18px;
}

.price {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    color: #c026d3;
}

.price-row small {
    display: block;
    color: var(--muted);
    margin-top: 8px;
    font-size: 14px;
}

.cart-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--dark);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 auto;
}

.cart-btn:hover {
    color: #fff;
    background: #050d28;
    transform: translateY(-1px);
}

.category-section {
    padding: 48px 0 74px;
}

.category-section {
    padding: 60px 0;
}

/* Khung bao ngoài của từng danh mục */
.category-card {
    background: var(--card); /* Sử dụng biến #ffffff đã khai báo */
    border: 1px solid var(--line); /* Viền màu nhạt #e7dfed */
    border-radius: var(--radius-lg); /* Bo góc 24px */
    padding: 30px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); /* Đổ bóng nhẹ mặt định */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hiệu ứng khi di chuột vào */
.category-link-card:hover {
    transform: translateY(-8px); /* Nhảy lên cao hơn một chút */
    border-color: var(--primary); /* Đổi viền sang màu tím #b43df5 */
    box-shadow: var(--shadow); /* Sử dụng đổ bóng đậm đã khai báo ở :root */
}

/* Icon danh mục */
.category-icon {
    width: 64px;
    height: 64px;
    background: #f8f0ff; /* Nền tím nhạt cho icon */
    border-radius: var(--radius-md); /* Bo góc 18px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--primary); /* Màu tím chủ đạo */
    margin-bottom: 20px;
    transition: 0.3s ease;
}

.category-link-card:hover .category-icon {
    background: var(--primary);
    color: #fff;
    transform: rotate(-10deg); /* Xoay nhẹ icon cho sinh động */
}

.category-card h4 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.site-footer {
    background: var(--footer);
    color: #cbd5e1;
    padding: 60px 0 28px;
}

.footer-logo {
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f0abfc;
    font-size: 20px;
    font-weight: 900;
}

.footer-logo-icon {
    font-size: 14px;
}

.footer-text {
    color: #cbd5e1;
    line-height: 1.75;
    max-width: 270px;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.footer-socials a {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-socials a:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.site-footer h5 {
    color: #fff;
    margin-bottom: 18px;
    font-size: 26px;
    font-weight: 800;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 14px;
}

.site-footer a {
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-badges {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.footer-badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d8b4fe;
}

.marketplace-toolbar {
    padding: 20px 0 10px;
}

.toolbar-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.toolbar-search {
    flex: 1 1 420px;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 14px 16px;
}

.toolbar-search i {
    color: #94a3b8;
}

.toolbar-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    color: #0f172a;
    font-size: 15px;
}

.toolbar-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-filters select {
    min-width: 190px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    outline: none;
    color: #334155;
    font-weight: 600;
}

.marketplace-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.marketplace-meta h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 900;
    color: #081a44;
}

.marketplace-meta p {
    margin: 0;
    color: var(--muted);
}

.product-detail-section {
    padding: 18px 0 56px;
}

.product-detail-gallery,
.product-detail-card,
.content-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.product-detail-gallery {
    padding: 18px;
}

.product-main-image {
    border-radius: 22px;
    overflow: hidden;
    background: #111827;
}

.product-main-image img {
    width: 100%;
    height: 620px;
    object-fit: cover;
}

.product-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.product-thumb-item {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #ece7f3;
}

.product-thumb-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.product-detail-card {
    padding: 26px;
}

.product-detail-badges {
    margin-bottom: 16px;
}

.product-detail-title {
    margin: 0 0 20px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 900;
    color: #0f172a;
}

.product-detail-price-box {
    background: linear-gradient(135deg, #faf5ff, #fff);
    border: 1px solid #ebd7ff;
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 22px;
}

.product-detail-price {
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
    color: #c026d3;
    margin-bottom: 8px;
}

.product-detail-old-price {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-detail-price-box small {
    color: var(--muted);
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn-primary-shop,
.btn-secondary-shop {
    min-width: 170px;
    padding: 15px 22px;
    border-radius: 16px;
    font-weight: 800;
    text-align: center;
}

.btn-primary-shop {
    background: var(--dark);
    color: #fff;
}

.btn-primary-shop:hover {
    color: #fff;
    background: #050d28;
}

.btn-secondary-shop {
    background: #fff;
    color: #0f172a;
    border: 1px solid #dbe3ef;
}

.btn-secondary-shop:hover {
    color: var(--primary);
    border-color: #d6b6ff;
}

.product-detail-meta {
    display: grid;
    gap: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px dashed #e5e7eb;
}

.meta-item:first-child {
    border-top: none;
    padding-top: 0;
}

.meta-item span {
    color: var(--muted);
}

.meta-item strong {
    font-weight: 800;
    color: #0f172a;
    text-align: right;
}

.product-detail-content {
    margin-top: 26px;
}

.content-card {
    padding: 24px;
    height: 100%;
}

.content-card h3 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 900;
    color: #081a44;
}

.content-card p {
    margin: 0;
    color: #475467;
    line-height: 1.85;
}

.feature-list {
    padding-left: 20px;
    margin: 0;
    color: #475467;
}

.feature-list li {
    margin-bottom: 12px;
    line-height: 1.75;
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 18px;
    }

    .hero-banner,
    .hero-banner > img {
        min-height: 320px;
        height: 320px;
        border-radius: 24px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .hero-chip {
        font-size: 12px;
        padding: 8px 12px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .hero-btn,
    .hero-link-btn {
        font-size: 14px;
    }

    .page-hero-small .page-hero-content,
    .product-detail-card,
    .content-card,
    .product-detail-gallery,
    .toolbar-wrap {
        border-radius: 22px;
    }

    .section-head h2,
    .category-head h2 {
        font-size: 26px;
    }

    .icon-box {
        width: 42px;
        height: 42px;
        margin-right: 8px;
    }

    .thumb {
        height: 280px;
    }

    .badge-top,
    .badge-second {
        font-size: 12px;
        padding: 8px 12px;
    }

    .badge-second {
        top: 62px;
    }

    .body {
        padding: 18px;
    }

    .price-row {
        align-items: center;
    }

    .cart-btn {
        width: 50px;
        height: 50px;
    }

    .toolbar-filters,
    .product-detail-actions {
        width: 100%;
    }

    .toolbar-filters select,
    .btn-primary-shop,
    .btn-secondary-shop {
        width: 100%;
    }

    .product-main-image img {
        height: 300px;
    }

    .meta-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-item strong {
        text-align: left;
    }
}

/* auth buttons */
.auth-buttons,
.header-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login,
.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-login {
    background: #ffffff;
    color: #334155;
    border-color: #e5e7eb;
}

.btn-login:hover {
    color: #a855f7;
    border-color: #d8b4fe;
}

.btn-register {
    background: linear-gradient(135deg, #b43df5, #ff4fd8);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(180, 61, 245, 0.22);
}

.btn-register:hover {
    color: #ffffff;
    opacity: 0.96;
    transform: translateY(-1px);
}

.header-username {
    font-weight: 700;
    color: #334155;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* profile dropdown */
.profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-toggle {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 0;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3e8ff;
    display: block;
}

.profile-arrow {
    font-size: 13px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.profile-toggle.active .profile-arrow {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 230px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    padding: 10px 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #475467;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.2;
}

.profile-menu-item i {
    width: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 16px;
    flex-shrink: 0;
}

.profile-menu-item:hover {
    background: #f8fafc;
    color: #111827;
}

.profile-menu-item:hover i {
    color: #7c3aed;
}

.profile-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.logout-item {
    color: #475467;
}

.logout-item:hover {
    background: #fff1f2;
    color: #dc2626;
}

.logout-item:hover i {
    color: #dc2626;
}

@media (max-width: 768px) {
    .header-username {
        display: none;
    }

    .btn-login,
    .btn-register {
        padding: 9px 12px;
        font-size: 13px;
    }

    .profile-menu {
        width: 210px;
        right: -8px;
    }
}
.user-name {
    color: #111827;
    font-weight: 800;
}

.admin-name {
    color: #b91c1c;
    font-weight: 900;
}

.vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.4px;
    line-height: 1;
    margin-left: 2px;
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.22);
}
.profile-toggle .header-username.user-name {
    color: #111111 !important;
    font-weight: 800 !important;
}

.profile-toggle .header-username.admin-name {
    color: #b10000 !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7f0000, #ff2a2a);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.25);
    margin-left: 2px;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}
}