:root {
    --primary: #0071e3;
    --primary-dark: #005bb5;
    --secondary: #5e5ce6;
    --bg: #f5f5f7;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --border: rgba(0, 0, 0, 0.12);
    --radius: 1.25rem;
    --shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg);
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg);
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    background-attachment: fixed;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.88));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1010;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92));
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--muted);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

.btn-outline {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--surface-solid);
    color: var(--text);
    text-decoration: none;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.hero {
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin: 0 0 1rem;
    line-height: 1.1;
    color: var(--text);
}

.hero p {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #991b1b;
}

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    color: #166534;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.75rem;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 420px;
    margin: 0 auto;
}

.footer {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.mobile-menu {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 247, 0.96));
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 1.25rem 1.25rem;
}

.mobile-menu .container {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 1rem 1rem;
}

.mobile-menu a,
.mobile-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    font-weight: 500;
    margin-top: 0.25rem;
}

.mobile-menu a:hover,
.mobile-menu button:hover {
    background: #fff;
    color: var(--primary);
    text-decoration: none;
}

.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1030;
    max-width: 360px;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    color: #fff;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    transition: opacity 0.3s ease;
}

.toast-danger {
    background: rgba(239, 68, 68, 0.9);
}

.toast-success {
    background: rgba(34, 197, 94, 0.9);
}

.img-placeholder {
    width: 100%;
    height: 160px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: nowrap;
        padding: 0.6rem 0;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 2rem 0;
    }

    .glass-card {
        padding: 1.25rem;
        overflow-x: auto;
    }

    .container {
        width: 96%;
        padding: 1rem 0;
    }

    .form-control,
    .btn {
        width: 100%;
    }

    .btn + .btn {
        margin-top: 0.5rem;
    }

    table {
        min-width: 600px;
    }
}

.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.footer .container {
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-links a {
    margin-left: 1rem;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto;
}

.img-preview {
    display: block;
    width: 100%;
    height: 160px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.03);
}

.product-card a {
    text-decoration: none;
}

.category-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.mb-3 {
    margin-bottom: 1rem;
}

.max-w-lg {
    max-width: 640px;
    margin: 0 auto;
}

.form-label {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.category-grid .category-card {
    min-height: 100px;
    font-size: 1rem;
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trust-bar {
        gap: 1rem;
        font-size: 0.8rem;
        padding: 1rem 0;
    }
    .section-title {
        font-size: 1.35rem;
    }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin: 0;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* Hero slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: calc(100vh - 70px);
    min-height: 620px;
    max-height: 900px;
    overflow: hidden;
    background: #fff;
    border-radius: var(--radius);
}

.hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 4%;
    background: linear-gradient(120deg, #ffffff 0%, #f5f5f7 100%);
}

.hero-slide.no-image {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
}

.hero-slide.no-image .hero-slide-content {
    margin: 0 auto;
}

.hero-slide-content {
    max-width: 560px;
    z-index: 2;
}

.hero-slide h2 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    margin: 0 0 1rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
}

.hero-slide p {
    color: var(--muted);
    font-size: 1.15rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.hero-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.hero-price del {
    color: var(--muted);
    font-size: 1.25rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

.hero-image img {
    max-height: 80%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 1.5rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
}

.hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    padding: 0;
}

.hero-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--surface);
    border: 1px solid var(--border);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text);
    box-shadow: var(--shadow);
}

.hero-arrow.prev { left: 1.5rem; }
.hero-arrow.next { right: 1.5rem; }

.hero-arrow:hover {
    background: var(--surface-solid);
}

/* Product carousel */
.carousel {
    position: relative;
    overflow: hidden;
    padding: 0 2rem;
    margin: 0 -2rem;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-card {
    min-width: calc(25% - 1.125rem);
    flex-shrink: 0;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: var(--surface);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    box-shadow: var(--shadow);
}

.carousel-nav:hover { background: var(--surface-solid); }
.carousel-nav.prev { left: 0.25rem; }
.carousel-nav.next { right: 0.25rem; }

@media (max-width: 1024px) {
    .carousel-card { min-width: calc(33.333% - 1rem); }
    .hero-slide {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
        padding-bottom: 2rem;
        min-height: auto;
        background: linear-gradient(120deg, #ffffff 0%, #f5f5f7 100%);
    }
    .hero-slide.no-image {
        min-height: 520px;
        justify-content: center;
    }
    .hero-slide-content { margin: 0 auto; padding-bottom: 1rem; }
    .hero-image {
        display: flex;
        position: relative;
        height: 320px;
        order: 2;
    }
    .hero-image img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
        border-radius: 1rem;
    }
}

@media (max-width: 768px) {
    .carousel { padding: 0 1rem; margin: 0 -1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .carousel::-webkit-scrollbar { display: none; }
    .carousel-track { gap: 1rem; transform: none !important; }
    .carousel-card {
        min-width: calc(85% - 1rem);
        scroll-snap-align: start;
    }
    .carousel-nav { display: none; }
    .hero-slider { height: 92vh; min-height: 520px; max-height: 720px; }
    .hero-track { height: 100%; }
    .hero-slide {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        text-align: center;
        padding: 0;
        min-height: 520px;
        color: #fff;
        background: #111;
    }
    .hero-slide::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 100%);
        z-index: 1;
    }
    .hero-slide-content {
        position: relative;
        z-index: 2;
        max-width: 88%;
        margin: 0 auto;
        padding: 0 1rem 5rem;
    }
    .hero-slide h2 {
        font-size: 2.25rem;
        color: #fff;
        text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }
    .hero-slide p {
        color: rgba(255,255,255,0.9);
        font-size: 1.05rem;
    }
    .hero-price {
        color: #fff;
        font-size: 1.75rem;
    }
    .hero-price del { color: rgba(255,255,255,0.65); }
    .hero-image {
        position: absolute;
        inset: 0;
        display: block;
        order: 0;
        height: 100%;
        z-index: 0;
    }
    .hero-image img {
        width: 100%;
        height: 100%;
        max-height: none;
        max-width: none;
        object-fit: cover;
        border-radius: 0;
        box-shadow: none;
    }
    .hero-arrow {
        background: rgba(255,255,255,0.15);
        color: #fff;
        border-color: rgba(255,255,255,0.3);
        left: 0.5rem;
        right: auto;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .hero-arrow:hover { background: rgba(255,255,255,0.3); }
    .hero-arrow.next { right: 0.5rem; left: auto; }
    .hero-dot { background: rgba(255,255,255,0.4); }
    .hero-dot.active { background: #fff; }
}

@media (max-width: 480px) {
    .carousel-card { min-width: calc(100% - 1.5rem); }
}

/* Product card enhancements */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card .img-preview {
    height: 200px;
    margin-bottom: 0;
    border-radius: 1rem;
    background: #f5f5f7;
}

.product-card .img-preview img {
    transition: transform 0.4s ease;
}

.product-card:hover .img-preview img {
    transform: scale(1.04);
}

.product-card .card-body {
    padding-top: 1rem;
}

.img-preview .placeholder-img {
    object-fit: contain;
    padding: 22%;
    opacity: 0.5;
}

.product-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

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

.price-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.price {
    font-weight: 700;
    font-size: 1.1rem;
}

.compare-price {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 0.95rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-featured {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #5a3d00;
}

.badge-sale {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: #fff;
}

.badge-affiliate {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
}

.badge-wrap {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.4rem;
    z-index: 3;
    flex-wrap: wrap;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, #fff, #f0f4ff);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin: 0 0 0.5rem;
}

.newsletter p {
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.newsletter form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.newsletter input {
    max-width: 320px;
    min-width: 240px;
}

/* Trust bar */
.trust-bar {
    padding: 1rem;
    background: linear-gradient(90deg, #0071e3 0%, #5e5ce6 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 113, 227, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.trust-track {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    animation: trustShine 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes trustShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.trust-track span {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    z-index: 1;
    animation: trustFloat 3s ease-in-out infinite;
}

.trust-track span:nth-child(2) { animation-delay: 0.2s; }
.trust-track span:nth-child(3) { animation-delay: 0.4s; }
.trust-track span:nth-child(4) { animation-delay: 0.6s; }

@keyframes trustFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.trust-icon {
    font-size: 1.35rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.trust-track span[aria-hidden="true"] {
    display: none;
}

@media (max-width: 768px) {
    .trust-track span[aria-hidden="true"] {
        display: inline-flex;
    }
    .trust-track {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: max-content;
        animation: trustTicker 18s linear infinite;
        gap: 1rem;
    }

    .trust-track span {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        animation: none;
    }

    .trust-bar::before { display: none; }

    @keyframes trustTicker {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
}

.stars {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    color: #f59e0b;
}

.stars::before {
    content: '★★★★★';
    letter-spacing: 2px;
    background: linear-gradient(90deg, #f59e0b calc(var(--rating) / 5 * 100%), #d1d5db calc(var(--rating) / 5 * 100%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    min-height: 160px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(94, 92, 230, 0.06));
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.category-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 16px 48px rgba(0, 113, 227, 0.12);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    font-size: 2.5rem;
    line-height: 1;
    z-index: 1;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

.just-added-section {
    background: linear-gradient(120deg, #f7f9ff 0%, #fff8f9 100%);
    padding: 2.5rem 0;
    width: 100%;
    border-radius: var(--radius);
}

.just-added-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.just-added-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    padding: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.just-added-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
    color: var(--text);
}

.just-added-card .img-preview {
    position: relative;
    height: 140px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f5f5f7;
    margin-bottom: 0.5rem;
}

.just-added-card .img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .just-added-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .just-added-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.75rem;
        padding: 0 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .just-added-grid::-webkit-scrollbar { display: none; }
    .just-added-card {
        min-width: 160px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .just-added-card .img-preview {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .category-card {
        min-height: 140px;
        padding: 1.25rem 0.75rem;
    }
    .category-icon { font-size: 2rem; }
}

/* Floating cart */
.cart-float {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1001;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(0, 113, 227, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.cart-float:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.cart-float-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #ef4444;
    color: #fff;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 1020;
}

.cart-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.cart-drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
    animation: cartSlideIn 0.25s ease;
}

@keyframes cartSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.cart-drawer-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}

.cart-drawer-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-drawer-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #f5f5f7;
    flex-shrink: 0;
}

.cart-drawer-item .info { flex: 1; }
.cart-drawer-item .info h4 { margin: 0 0 0.15rem; font-size: 0.95rem; }
.cart-drawer-item .info p { margin: 0; color: var(--muted); font-size: 0.85rem; }

.cart-drawer-empty {
    text-align: center;
    padding: 2rem 0;
    color: var(--muted);
}

@media (max-width: 480px) {
    .cart-drawer-panel {
        max-width: none;
        padding: 1rem;
    }
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86));
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Product page */
.product-thumb {
    border: 2px solid transparent;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.product-thumb:hover,
.product-thumb.active {
    border-color: var(--primary);
    transform: scale(1.03);
}

.product-stock {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-stock-success {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.product-stock-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
}

.product-stock-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.product-description {
    line-height: 1.8;
}

@media (max-width: 768px) {
    .product-detail {
        padding: 1.25rem;
        gap: 1.5rem;
    }

    .product-thumbs {
        padding-bottom: 0.5rem;
    }

    .product-thumbs::-webkit-scrollbar {
        height: 4px;
    }

    .product-thumbs::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 2px;
    }
}

/* Footer */
.footer-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-tagline {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    max-width: 280px;
    line-height: 1.5;
}

.footer-link {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Mobile app-style bottom navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,245,247,0.96));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-bottom-nav li {
    flex: 1 1 0;
    text-align: center;
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    min-width: 56px;
    padding: 0.25rem 0.25rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease;
}

.mobile-bottom-nav a[aria-current="page"],
.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active,
.mobile-bottom-nav button:hover,
.mobile-bottom-nav button.active {
    color: var(--primary);
}

.mobile-bottom-nav svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-bottom-nav .cart-count {
    position: absolute;
    top: 2px;
    left: 50%;
    margin-left: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }

    .cart-float {
        display: none;
    }

    .cart-drawer-panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: 85vh;
        max-height: 620px;
        border-radius: 1.5rem 1.5rem 0 0;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 1.25rem 1rem 1rem;
        animation: cartSlideUp 0.3s ease;
    }

    .cart-drawer-panel .cart-drawer-item {
        padding: 0.9rem 0;
    }

    .cart-drawer-panel .cart-drawer-item img {
        width: 64px;
        height: 64px;
    }

    .cart-drawer-panel .cart-drawer-item .info h4 {
        font-size: 1rem;
    }

    .cart-drawer-panel .cart-drawer-item .info p {
        font-size: 0.9rem;
    }

    .cart-drawer-close {
        font-size: 1.75rem;
    }

    .cart-drawer-footer a,
    .cart-drawer-footer button {
        padding: 0.85rem;
        font-size: 1rem;
    }
}

@keyframes cartSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .navbar {
        background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(245,245,247,0.96));
    }

    .navbar .container {
        padding: 0.5rem 0;
    }

    .menu-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--surface);
        border: 1px solid var(--border);
    }

    .menu-toggle span {
        background: var(--text);
    }

    .mobile-menu {
        position: fixed;
        top: 64px;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1002;
        padding: 0;
        background: var(--surface-solid);
        border: none;
        border-radius: 0;
        display: none;
        overflow-y: auto;
    }

    .mobile-menu.open {
        display: block;
    }

    .mobile-menu .container {
        padding: 1.5rem;
        gap: 1rem;
    }

    .mobile-menu a,
    .mobile-menu button {
        font-size: 1.15rem;
        padding: 1rem;
        border-radius: 1rem;
        background: var(--surface);
    }

    .mobile-menu a:hover,
    .mobile-menu button:hover {
        background: var(--bg);
    }

    .mobile-menu .btn-primary,
    .mobile-menu .btn-primary:hover {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

    .mobile-menu .btn-outline,
    .mobile-menu .btn-outline:hover {
        background: transparent;
        color: var(--primary);
        border-color: var(--primary);
    }
}

.cart-drawer-item button {
    width: auto;
    padding: 0.35rem 0.65rem;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 0.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-links {
        justify-content: center;
    }
}

.theme-toggle-mobile { display: none !important; }

@media (max-width: 768px) {
    .theme-toggle-mobile {
        display: flex !important;
    }
}

.shop-filters-toggle {
    display: none;
}

@media (max-width: 768px) {
    .shop-filters-toggle {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .shop-filters {
        display: none;
        margin-top: 0.75rem;
    }

    .shop-filters.open {
        display: block;
    }

    .shop-filters.open form {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .shop-filters.open .form-control,
    .shop-filters.open .btn {
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 auto !important;
    }

    .shop-filters.open form > div {
        width: 100% !important;
        min-width: auto !important;
        flex: 1 1 auto !important;
    }

    .shop-filters.open form > div .form-control {
        max-width: none !important;
    }
}

/* Vendor dashboard v2 */

.vendor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem 0 1rem;
}

.vendor-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.vendor-header-info h1 {
    margin: 0;
    font-size: 1.75rem;
}

.vendor-header-info p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.vendor-status {
    display: inline-flex;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--border);
}

.vendor-status[data-status="approved"] {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.25);
}

html[data-theme="dark"] .vendor-status[data-status="approved"] {
    color: #4ade80;
}

.vendor-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.vendor-balance-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vendor-balance-label {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.vendor-balance-amount {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.vendor-balance-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vendor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.vendor-stat {
    padding: 1.25rem;
    text-align: center;
}

.vendor-stat-value {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.vendor-stat-label {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.vendor-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.vendor-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.vendor-action:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    text-decoration: none;
}

.vendor-action-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.vendor-action-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.vendor-action-hint {
    font-size: 0.8rem;
    color: var(--muted);
}

.vendor-recent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.vendor-recent-section {
    padding: 1.5rem;
}

.vendor-recent-title {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: var(--text);
}

.vendor-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vendor-product-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
}

.vendor-product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.vendor-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--border), var(--surface));
    border-radius: 0.5rem;
}

.vendor-product-meta {
    flex: 1;
    min-width: 0;
}

.vendor-product-name {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vendor-product-sub {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.vendor-product-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.vendor-product-status,
.vendor-tx-status {
    display: inline-flex;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--border);
}

.vendor-product-status[data-status="published"] {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.25);
}

.vendor-product-status[data-status="pending"] {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.25);
}

html[data-theme="dark"] .vendor-product-status[data-status="published"] {
    color: #4ade80;
}

html[data-theme="dark"] .vendor-product-status[data-status="pending"] {
    color: #fbbf24;
}

.vendor-tx-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vendor-tx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
}

.vendor-tx-main {
    min-width: 0;
}

.vendor-tx-type {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    text-transform: capitalize;
}

.vendor-tx-desc {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vendor-tx-date {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.vendor-tx-amount {
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
}

.vendor-tx-in {
    color: #22c55e;
}

.vendor-tx-out {
    color: #ef4444;
}

.vendor-tx-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

/* Vendor product grid */

.vendor-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.vendor-product-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

.vendor-product-card .vendor-product-thumb {
    width: 100%;
    height: 160px;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    background: var(--bg);
}

.vendor-product-card .vendor-product-thumb img {
    border-radius: 0.5rem;
}

.vendor-product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vendor-product-card-body .vendor-product-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: normal;
}

.vendor-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.vendor-product-price {
    font-weight: 700;
    color: var(--text);
}

.vendor-product-stock {
    color: var(--muted);
}

.vendor-product-card-foot {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Deposit methods */

.vendor-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.vendor-method-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vendor-method-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.vendor-method-name {
    font-weight: 700;
    color: var(--text);
}

.vendor-method-type {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 2rem;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--border);
}

.vendor-method-currency {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.vendor-method-instructions {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    flex: 1;
}

/* Vendor mobile */

@media (max-width: 768px) {
    .vendor-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem 0 0.75rem;
    }

    .vendor-header-info h1 {
        font-size: 1.5rem;
    }

    .vendor-balance {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .vendor-balance-amount {
        font-size: 1.75rem;
    }

    .vendor-balance-actions,
    .vendor-balance-actions a,
    .vendor-balance-actions button {
        width: 100%;
    }

    .vendor-balance-actions {
        display: flex;
        flex-direction: column;
    }

    .vendor-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .vendor-stat {
        padding: 1rem;
    }

    .vendor-stat-value {
        font-size: 1.25rem;
    }

    .vendor-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .vendor-recent {
        grid-template-columns: 1fr;
    }

    .vendor-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .vendor-product-side {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .vendor-tx-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .vendor-tx-amount,
    .vendor-tx-side {
        align-self: flex-end;
    }

    .vendor-products-grid {
        grid-template-columns: 1fr;
    }

    .vendor-product-card-foot {
        flex-direction: row;
    }
}

/* Tickets */

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ticket-row:hover {
    background: var(--bg);
    border-color: var(--primary);
    text-decoration: none;
    color: inherit;
}

.ticket-info {
    min-width: 0;
    flex: 1;
}

.ticket-subject {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.ticket-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-status,
.ticket-priority {
    display: inline-flex;
    padding: 0.25rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--border);
}

.ticket-status[data-status="open"] {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.25);
}

.ticket-status[data-status="in_progress"] {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.25);
}

.ticket-status[data-status="resolved"] {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.25);
}

.ticket-status[data-status="closed"] {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    border-color: rgba(148, 163, 184, 0.25);
}

.ticket-priority[data-priority="high"] {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.25);
}

.ticket-priority[data-priority="medium"] {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.25);
}

.ticket-priority[data-priority="low"] {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.25);
}

html[data-theme="dark"] .ticket-status[data-status="open"] {
    color: #60a5fa;
}

html[data-theme="dark"] .ticket-status[data-status="in_progress"] {
    color: #fbbf24;
}

html[data-theme="dark"] .ticket-status[data-status="resolved"] {
    color: #4ade80;
}

html[data-theme="dark"] .ticket-status[data-status="closed"] {
    color: #94a3b8;
}

html[data-theme="dark"] .ticket-priority[data-priority="high"] {
    color: #f87171;
}

html[data-theme="dark"] .ticket-priority[data-priority="medium"] {
    color: #fbbf24;
}

html[data-theme="dark"] .ticket-priority[data-priority="low"] {
    color: #4ade80;
}

.ticket-conversation {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-message {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    max-width: 90%;
}

.ticket-message-user {
    background: var(--surface);
    align-self: flex-start;
}

.ticket-message-admin {
    background: rgba(59, 130, 246, 0.08);
    align-self: flex-end;
    border-color: rgba(59, 130, 246, 0.25);
}

.ticket-message-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.ticket-message-time {
    color: var(--muted);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .ticket-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ticket-badges {
        width: 100%;
        justify-content: flex-start;
    }

    .ticket-subject {
        white-space: normal;
    }

    .ticket-message {
        max-width: 100%;
    }
}

/* Modals */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1022;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
}

.modal.is-open {
    display: block;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    margin: 1rem auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    z-index: 1;
}

@media (min-width: 769px) {
    .modal.is-open {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-card {
        margin: auto;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.form-control:disabled,
.form-control[readonly] {
    background: rgba(0, 0, 0, 0.04);
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .glass-card form .form-control,
    .glass-card form .btn {
        width: auto;
    }
}

/* ---------- Floating support chat ---------- */
.chat-float {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 1001;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--accent, #5e5ce6));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(0, 113, 227, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-float:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0, 113, 227, 0.45);
}

.chat-launcher {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.chat-launcher .chat-float {
    position: static;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-options.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.9rem 0.45rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-solid, #fff);
    color: var(--text);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    color: var(--text);
}

.chat-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.chat-option-wa {
    background: #25d366;
}

.chat-option-tg {
    background: #229ed9;
}

.chat-option-ticket {
    background: linear-gradient(135deg, var(--primary), var(--accent, #5e5ce6));
}

.chat-modal {
    position: fixed;
    inset: 0;
    z-index: 1003;
}

.chat-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.chat-modal-panel {
    position: absolute;
    left: 1.25rem;
    bottom: 5.5rem;
    width: min(400px, calc(100vw - 2.5rem));
    max-height: min(70vh, 640px);
    overflow-y: auto;
    background: var(--surface-solid, var(--surface));
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    animation: chatSlideUp 0.25s ease;
}

@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.chat-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.chat-modal-header p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.chat-modal-close {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.chat-modal-lead {
    color: var(--muted);
    margin: 0 0 1rem;
}

.chat-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.chat-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--surface);
    text-decoration: none;
}

.chat-ticket-row:hover {
    border-color: var(--primary);
    text-decoration: none;
}

.chat-ticket-subject {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.chat-ticket-meta {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.chat-ticket-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--muted);
}

.chat-ticket-dot[data-status="open"],
.chat-ticket-dot[data-status="in_progress"] {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.chat-view-all {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ---------- Vendor KYC floating notice ---------- */
.kyc-pill {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-solid, var(--surface));
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.kyc-pill-required {
    border-color: #f59e0b;
    color: #f59e0b;
}

.kyc-pill-pending {
    cursor: default;
    color: #f59e0b;
}

.kyc-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    animation: kycPulse 1.6s ease-in-out infinite;
}

@keyframes kycPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
    50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
}

.kyc-pulse-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: kycPulse 1.6s ease-in-out infinite;
}

.kyc-modal {
    position: fixed;
    inset: 0;
    z-index: 1003;
}

.kyc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.kyc-modal-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100vw - 2rem));
    max-height: 85vh;
    overflow-y: auto;
    background: var(--surface-solid, var(--surface));
    border: 1px solid var(--border);
    border-top: 4px solid #f59e0b;
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    animation: kycPop 0.25s ease;
}

@keyframes kycPop {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.kyc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.kyc-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.kyc-modal-header p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.kyc-modal-close {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.kyc-modal-lead {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
    line-height: 1.55;
}

.kyc-modal-rejected {
    color: #ef4444;
    font-size: 0.85rem;
    margin: 0 0 1rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ---------- Mobile adjustments ---------- */
@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .chat-launcher {
        bottom: 5.25rem;
        left: 1rem;
    }

    .chat-launcher .chat-float {
        width: 50px;
        height: 50px;
    }

    .chat-modal-panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        max-height: 82vh;
        border-radius: 1.25rem 1.25rem 0 0;
        padding: 1.25rem 1rem 1rem;
    }

    .kyc-pill {
        bottom: 5.25rem;
        max-width: calc(100vw - 2rem);
    }

    .kyc-modal-panel {
        width: calc(100vw - 1.5rem);
        padding: 1.25rem;
    }

    .kyc-modal-form .form-group[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}
