/* --- LOCAL FONTS SETUP --- */
@font-face {
    font-family: 'Outfit';
    src: url('fonts/Outfit-Variable.woff2') format('woff2-variations'),
        url('fonts/Outfit-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk-Variable.woff2') format('woff2-variations'),
        url('fonts/SpaceGrotesk-Variable.woff2') format('woff2');
    font-weight: 300 700;
    font-display: swap;
    font-style: normal;
}

html {
    overflow-y: scroll;
}

:root {
    --bg-color: #0b0d10;
    --card-bg: rgba(22, 26, 32, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --gold-gradient: linear-gradient(135deg, #FFDF73 0%, #E5A93C 50%, #FFDF73 100%);
    --gold-glow: rgba(229, 169, 60, 0.25);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --success: #10b981;

    /* Glass Refinements */
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --accent-color: #E5A93C;
    --danger-color: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', 'Roboto', 'Arial', 'Helvetica', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background: var(--bg-color);
    background-image:
        radial-gradient(circle at 0% 0%, rgba(229, 169, 60, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(30, 41, 59, 0.2) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 50px 20px 0px 20px;
    line-height: 1.6;
    margin: 0;
    display: block;
    position: relative;
    /* Thêm để làm neo cho các element toàn trang */
}

/* Modern Grid Background */
.website-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.3) 0%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.3) 0%, black 40%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

/* Background Blobs for Glassmorphy environment */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

body::before {
    background: #E5A93C;
    top: -100px;
    right: -100px;
    animation: blobFloat 20s infinite alternate;
    z-index: -2;
}

body::after {
    background: #3b82f6;
    bottom: -100px;
    left: -100px;
    animation: blobFloat 25s infinite alternate-reverse;
    z-index: -2;
}

@keyframes blobFloat {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-100px, 50px) scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 10;
    margin: 0 auto !important;
    text-align: left;
    padding: 0;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(229, 169, 60, 0.2));
    text-transform: uppercase;
}

header h1 {
    text-align: center;
}

.login-box h1 {
    text-align: center;
}

.subtitle,
.header-desc {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 40px;
    font-size: 1.15rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Navbar Capsule */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 50px;
    padding: 10px 25px;
    margin-bottom: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    width: 100%;
    position: relative;
    z-index: 99999 !important;
}

header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px 0 40px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hero-header {
    position: relative;
    z-index: 1;
    text-align: left;
    padding: 0px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
}

.hero-mascot {
    flex-shrink: 0;
    width: 250px;
    position: relative;
    animation: mascotFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
}

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

.mascot-el {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.mascot-el img {
    width: 100%;
    height: auto;
    display: block;
}

.mascot-el-1 {
    width: 50px;
    top: 10px;
    left: -35px;
    animation: floatEl1 4s ease-in-out infinite;
}

.mascot-el-2 {
    width: 60px;
    top: 50%;
    right: -30px;
    animation: floatEl2 5s ease-in-out infinite;
}

.mascot-el-3 {
    width: 45px;
    bottom: 20px;
    left: -10px;
    animation: floatEl3 4.5s ease-in-out infinite;
}

@keyframes mascotFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatEl1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-10px, -15px) rotate(5deg);
    }
}

@keyframes floatEl2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(15px, 10px) rotate(-8deg);
    }
}

@keyframes floatEl3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-5px, 15px) rotate(10deg);
    }
}

@media (max-width: 900px) {
    .hero-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding-bottom: 20px;
    }

    .hero-mascot {
        width: 180px;
        order: -1;
        /* Đưa gấu lên trên tiêu đề trên mobile nếu muốn, hoặc giữ nguyên */
    }
}

@media (max-width: 600px) {
    .hero-mascot {
        display: none;
        /* Ẩn bớt trên màn hình quá nhỏ để ưu tiên nội dung */
    }
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-links a {
    position: relative;
    /* Base for badge bubble */
}

/* Premium Badge Bubble Styling */
.menu-badge-container {
    position: absolute;
    bottom: 90%;
    /* Moved down from 100% */
    left: 50%;
    transform: translateX(-50%) translateY(0);
    padding-bottom: 4px;
    /* Reduced from 8px */
    pointer-events: none;
    animation: badgeFloat 2s ease-in-out infinite;
    z-index: 50;
    white-space: nowrap;
}

.menu-badge-bubble {
    background: #ef4444;
    /* Default */
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 10px 8px 10px;
    /* Extra bottom padding for the tail */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;

    /* The Magic: Unified Shape with Mask */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' preserveAspectRatio='none' viewBox='0 0 100 100'%3E%3Cpath d='M8,0 L92,0 C96.4,0 100,3.6 100,8 L100,72 C100,76.4 96.4,80 92,80 L58,80 L50,95 L42,80 L8,80 C3.6,80 0,76.4 0,72 L0,8 C0,3.6 3.6,0 8,0 Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' preserveAspectRatio='none' viewBox='0 0 100 100'%3E%3Cpath d='M8,0 L92,0 C96.4,0 100,3.6 100,8 L100,72 C100,76.4 96.4,80 92,80 L58,80 L50,95 L42,80 L8,80 C3.6,80 0,76.4 0,72 L0,8 C0,3.6 3.6,0 8,0 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.menu-badge-bubble::after {
    display: none;
    /* No longer needed with masking */
}

.menu-badge-bubble svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

@keyframes badgeFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-3px);
    }
}

.nav-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-svg svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.nav-action-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-action-btn.btn-danger-action {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.nav-action-btn.btn-danger-action:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
}

/* Common Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #111;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--gold-gradient);
    box-shadow: 0 5px 15px var(--gold-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(229, 169, 60, 0.5);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: none;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: #fff;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Premium Ticket / Lists */
.coupon-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}


/* ADMIN VIEW - List Item Layout */
.coupon-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 25px;
    display: grid;
    grid-template-columns: 120px 1fr 100px 200px;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.coupon-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateX(5px);
}

.coupon-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coupon-store {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.coupon-date {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Common Coupon Classes */
.discount-badge,
.coupon-badge {
    background: rgba(229, 169, 60, 0.1);
    color: #E5A93C;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(229, 169, 60, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ADMIN & COMMON VIEW REFINEMENTS */
.coupon-item .coupon-title {
    font-size: 1.05rem;
    margin-bottom: 0;
    color: #fff;
    font-weight: 700;
}

.coupon-dates {
    font-size: 0.9rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.urgent-text {
    color: #f87171;
    font-weight: 600;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* Rich Text Description Output */
.coupon-desc {
    font-size: 0.92rem;
    color: var(--text-dim);
    margin: 8px 0 5px;
    line-height: 1.7;
}

.coupon-desc strong {
    color: #e2e8f0;
    font-weight: 700;
}

.coupon-desc em {
    font-style: italic;
    color: #cbd5e1;
}

.coupon-desc u {
    text-decoration: underline;
}

.coupon-desc ul,
.coupon-desc ol {
    padding-left: 1.4em;
    margin: 4px 0;
}

.coupon-desc li {
    margin-bottom: 2px;
}

.coupon-desc a {
    color: #FFDF73;
    text-decoration: underline;
}

.coupon-desc p {
    margin: 0 0 4px;
}

/* Inputs and Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    outline: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(229, 169, 60, 0.1);
}

.login-box {
    max-width: 450px;
    margin: 0 auto;
}

/* Alerts and Toasts */
.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    font-size: 0.9rem;
    text-align: center;
}

#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

#toast.show {
    opacity: 1;
    pointer-events: auto;
    animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 100001;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
}

/* Code Display Box */
.hidden-code {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    width: 100%;
}

.btn-copy-go {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    background: var(--gold-gradient);
    color: #111;
    box-shadow: 0 5px 15px var(--gold-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-copy-go:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(229, 169, 60, 0.5);
}

.btn-copy-go:active {
    transform: translateY(1px);
}

/* Other components (brand sections, icons) */
.brand-section {
    width: 100%;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: var(--gold-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #111;
    font-size: 1.2rem;
    box-shadow: 0 10px 15px -3px var(--gold-glow);
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .coupon-ticket {
        flex-direction: column;
    }

    .ticket-divider {
        width: 100%;
        height: 2px;
        background-image: linear-gradient(to right, var(--card-border) 40%, transparent 0%);
        background-size: 15px 2px;
        background-repeat: repeat-x;
    }

    .ticket-divider::before {
        left: -16px;
        top: -15px;
        border-bottom: 1px solid var(--card-border);
        border-right: 1px solid var(--card-border);
        border-left: none;
        border-top: none;
    }

    .ticket-divider::after {
        right: -16px;
        left: auto;
        top: -15px;
        border-bottom: 1px solid var(--card-border);
        border-left: 1px solid var(--card-border);
        border-right: none;
        border-top: none;
    }

    .ticket-right {
        width: 100%;
        padding-top: 20px;
        border-left: none;
    }

    .coupon-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .coupon-actions {
        justify-self: stretch;
        width: 100%;
        margin-top: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        display: none;
    }
}

/* Admin Dashboard Extensions */
/* Unified Filter Console System */
.cp-filter-console {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 40px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   PREMIUM CATEGORY GRID (HUGE CARDS)
   ========================================================================== */
.cp-category-slider-wrapper {
    position: relative;
    margin-bottom: 40px;
    padding: 0 0px;
}

.cp-category-grid-huge {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    padding: 10px 5px 25px 5px;
    /* Added padding for shadows */
    margin-top: -10px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.cp-category-grid-huge::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Scroll Navigation Arrows */
.cp-scroll-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.cp-scroll-nav:hover {
    background: var(--gold-gradient);
    border-color: transparent;
    color: #111;
    transform: translateY(-50%) scale(1.1);
}

.cp-scroll-nav.prev {
    left: -20px;
}

.cp-scroll-nav.next {
    right: -20px;
}

/* Hide arrows on mobile if desired, or keep them small */
@media (max-width: 768px) {
    .cp-scroll-nav {
        display: none;
        /* Tap to scroll is native on mobile */
    }
}

.cat-card-huge {
    flex: 0 0 calc(25% - 15px);
    /* Show approx 4 cards on desktop */
    min-width: 200px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    text-align: left;
}

.cat-card-huge:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(229, 169, 60, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.cat-card-huge.active {
    background: var(--gold-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(229, 169, 60, 0.3);
}

.cat-card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s;
}

.cat-card-huge.active .cat-card-icon {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
}

.cat-card-info {
    display: flex;
    flex-direction: column;
}

.cat-card-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.cat-card-huge.active .cat-card-name {
    color: #111;
}

.cat-card-count {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
}

.cat-card-huge.active .cat-card-count {
    color: rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   PREMIUM LAYOUT WRAPPER (SIDEBAR + MAIN)
   ========================================================================== */
.premium-layout-wrapper {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 40px;
    align-items: stretch;
    margin-top: 30px;
}

/* Icon-Only Sidebar */
.icon-sidebar-stores {
    width: 80px;
    position: sticky;
    top: 30px;
    align-self: start;
    z-index: 100;
    min-width: 0;
    /* Ngăn grid item bị nở */
}

.sticky-sidebar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.store-icon-btn {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.store-icon-btn:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.store-icon-btn.active {
    background: var(--gold-gradient);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(229, 169, 60, 0.4);
}

.toggle-more-stores {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: 40px !important;
    margin-top: 5px;
}

.toggle-more-stores .more-icon {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.toggle-more-stores:hover {
    transform: translateY(3px) !important;
}

.toggle-more-stores:hover .more-icon {
    opacity: 1;
    transform: none; /* Bỏ xoay 90 độ cũ */
}

.store-icon-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.all-stores-icon {
    color: var(--accent-color);
}

.store-icon-btn.active .all-stores-icon {
    color: #111;
}

.store-initial {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-dim);
    text-transform: uppercase;
}

.store-icon-btn.active .store-initial {
    color: #111;
}

.store-count-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.store-icon-btn.active .store-count-badge {
    background: #ef4444;
    color: #fff;
    border-color: #f87171;
    opacity: 1;
    transform: scale(1.1);
}

/* Response for Layout */
@media (max-width: 1024px) {
    .premium-layout-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        overflow: hidden;
        /* Cắt bỏ mọi phần thừa */
    }

    .icon-sidebar-stores {
        width: 100%;
        max-width: 100vw;
        margin-bottom: 25px;
        position: relative;
        top: 0;
        min-width: 0;
    }

    .sticky-sidebar-inner {
        position: relative;
        flex-direction: row;
        overflow-x: auto;
        padding: 12px 15px;
        scrollbar-width: none;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        border-radius: 16px;
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        box-sizing: border-box;
    }

    .sticky-sidebar-inner::-webkit-scrollbar {
        display: none;
    }

    .store-icon-btn {
        flex: 0 0 54px;
        /* Fix kích thước để không bị bóp méo */
    }

    /* Hiệu ứng mờ ở hai đầu báo hiệu còn icon bên trong */
    .icon-sidebar-stores::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 100%;
        background: linear-gradient(to left, var(--bg-color), transparent);
        pointer-events: none;
        border-radius: 0 16px 16px 0;
        z-index: 2;
    }
}

/* Switch Toggle UI */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked+.slider {
    background-color: #10b981;
    border-color: #059669;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Admin Grid Card Flow */
.admin-coupon-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1.5fr 1fr;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.admin-coupon-grid:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .admin-coupon-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .admin-coupon-grid>div:last-child {
        justify-content: flex-start;
    }
}

/* Category Filter moved up to console */

/* ==========================================================================
   NAVBAR DROPDOWN (GLASSMORPHISM)
   ========================================================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    /* Expand hover area */
    margin-bottom: -8px;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 250px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(229, 169, 60, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 999999 !important;
    transform: translateX(-50%) translateY(10px) translateZ(9999px);
    padding: 12px;
    margin-top: 10px;
    backface-visibility: hidden;
    pointer-events: none;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) translateZ(9999px);
    pointer-events: auto;
}

.dropdown-content::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.dropdown-content a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-dim) !important;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid transparent;
}

.dropdown-content a:hover {
    background: rgba(229, 169, 60, 0.1) !important;
    color: var(--accent-color) !important;
    border-color: rgba(229, 169, 60, 0.2);
    transform: translateX(5px);
}

.dropdown-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #111;
    font-size: 0.85rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   MOBILE & RESPONSIVE REFINEMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .top-nav-bar {
        padding: 8px 12px;
        margin-bottom: 25px;
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 10px;
    }

    .nav-brand {
        grid-column: 2;
        justify-content: center;
        width: auto;
        margin: 0 auto;
        font-size: 1.1rem;
    }

    .brand-text {
        display: none !important;
    }

    .top-nav-bar>div:last-child {
        justify-content: flex-end;
        display: flex;
        grid-column: 3;
    }

    .nav-action-btn {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .nav-links {
        display: none !important;
        /* Ẩn menu ngang trên di động */
    }

    .nav-dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        box-shadow: none;
        width: 100%;
        display: none;
        padding-left: 20px;
        margin-top: 5px;
        backdrop-filter: none;
    }

    .nav-dropdown:hover .dropdown-content {
        display: block;
    }

    .drawer-toggle {
        display: flex !important;
        grid-column: 1;
        justify-content: flex-start;
    }
}

/* App Drawer Global (Hidden by default) */
.drawer-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.app-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000001;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
}

.app-drawer.active {
    left: 0;
}

.drawer-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: #fff;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.drawer-logo img {
    height: 32px;
    width: auto;
}

.drawer-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drawer-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.drawer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.drawer-item:hover,
.drawer-item.active {
    background: rgba(229, 169, 60, 0.1);
    color: var(--accent-color);
    border-color: rgba(229, 169, 60, 0.2);
}

.drawer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.drawer-icon svg {
    width: 20px;
    height: 20px;
}

.drawer-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-contact-btn {
    background: var(--gold-gradient);
    color: #111;
    padding: 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(229, 169, 60, 0.2);
}

/* Drawer Accordion logic */
.drawer-accordion {
    display: flex;
    flex-direction: column;
}

.accordion-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.drawer-accordion.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-top: 5px;
}

.drawer-accordion.open .accordion-content {
    max-height: 400px;
    /* Đủ rộng cho danh sách thương hiệu */
    padding: 10px 0;
    margin-bottom: 10px;
}

.accordion-sub-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 50px;
    /* Lùi vào lề để phân biệt cấp bậc */
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.accordion-sub-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.accordion-sub-item img,
.sub-item-fallback {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
}

.sub-item-fallback {
    background: var(--gold-gradient);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

.accordion-sub-item.all-link {
    color: var(--accent-color);
    font-weight: 700;
    justify-content: center;
    padding-left: 20px;
    margin-top: 5px;
}

.accordion-empty {
    padding: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    opacity: 0.5;
}

/* 🚀 Brand Detail Modern Layout */
.brand-hero-modern {
    margin-bottom: 30px;
    border-radius: 24px;
    overflow: hidden;
    background: #0d0f12;
    /* Nền tối đồng nhất */
    background-image:
        radial-gradient(circle at 20% 30%, rgba(229, 169, 60, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(229, 169, 60, 0.05) 0%, transparent 50%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    width: 100%;
}

.brand-hero-glass {
    padding: 40px;
    background: rgba(13, 15, 18, 0.3);
    /* Giảm độ đục để gradient bên dưới hiện rõ hơn */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.brand-hero-top {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.brand-hero-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.95);
    /* Trắng gần như đặc nhưng vẫn có độ sâu */
    border-radius: 20px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.brand-hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-logo-fallback {
    background: linear-gradient(135deg, #FFDF73 0%, #E5A93C 100%);
    color: #111;
    font-size: 3rem;
    font-weight: 800;
}

.brand-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}

.brand-breadcrumb {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.brand-breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.brand-breadcrumb a:hover {
    color: #FFDF73;
}

.brand-stats-row {
    display: flex;
    gap: 12px;
}

.brand-stat-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #FFDF73;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-desc-text {
    flex: 1;
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.6;
}

.brand-visit-btn {
    padding: 14px 35px;
    background: linear-gradient(135deg, #FFDF73 0%, #E5A93C 100%);
    color: #111;
    text-decoration: none;
    font-weight: 800;
    border-radius: 12px;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(229, 169, 60, 0.2);
}

.brand-visit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(229, 169, 60, 0.3);
}

.brand-main-feed {
    width: 100%;
}

.brand-content-layout {
    width: 100%;
    margin-top: 20px;
}

.brand-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.2);
}

.brand-section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

@media (max-width: 850px) {
    .brand-hero-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .brand-hero-logo {
        width: 80px;
        height: 80px;
    }

    .brand-hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .brand-visit-btn {
        width: 100%;
        text-align: center;
    }
}

/* 🌐 Website Global Floating Elements */
.web-el {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
}

.web-el img {
    max-width: 110px;
    height: auto;
    display: block;
}

.web-el-1 {
    top: 6%;
    left: 16%;
    animation: webFloat1 15s ease-in-out infinite;
}

.web-el-2 {
    top: 30%;
    left: -2%;
    animation: webFloat2 18s ease-in-out infinite;
}

.web-el-3 {
    top: 75%;
    left: 1%;
    animation: webFloat3 16s ease-in-out infinite;
}

.web-el-4 {
    top: 45%;
    right: 1%;
    animation: webFloat4 17s ease-in-out infinite;
}

.web-el-5 {
    bottom: 5%;
    right: 2%;
    animation: webFloat5 18s ease-in-out infinite;
}

@keyframes webFloat1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(25px, 35px) rotate(8deg);
    }
}

@keyframes webFloat2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-35px, 25px) rotate(-12deg);
    }
}

@keyframes webFloat3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(18px, -45px) rotate(6deg);
    }
}

@keyframes webFloat4 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-25px, -35px) rotate(-8deg);
    }
}

@keyframes webFloat5 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(30px, 20px) rotate(10deg);
    }
}

@media (max-width: 968px) {
    .web-el {
        display: none;
    }
}