/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-card-hover: #222236;
    --bg-elevated: #252538;
    --text-primary: #f0f0f5;
    --text-secondary: #9898b0;
    --text-muted: #6b6b85;
    --accent-primary: #7c5cfc;
    --accent-secondary: #5a3ddb;
    --accent-glow: rgba(124, 92, 252, 0.3);
    --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #5a3ddb 50%, #8b6cff 100%);
    --success: #00d68f;
    --warning: #ffaa00;
    --danger: #ff4757;
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --glass: rgba(26, 26, 40, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 4px 30px var(--accent-glow);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Telegram theme overrides */
    --tg-bg: var(--tg-theme-bg-color, var(--bg-primary));
    --tg-text: var(--tg-theme-text-color, var(--text-primary));
    --tg-hint: var(--tg-theme-hint-color, var(--text-secondary));
    --tg-link: var(--tg-theme-link-color, var(--accent-primary));
    --tg-button: var(--tg-theme-button-color, var(--accent-primary));
    --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-size: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

input {
    font-family: var(--font);
    outline: none;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: var(--accent-primary);
}

/* ===== Loader ===== */
#loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: loaderFadeIn 0.6s ease-out;
}

@keyframes loaderFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    border: 2px solid var(--accent-primary);
}

.loader-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ===== Header ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
    transition: var(--transition);
}

.header-avatar:hover {
    transform: scale(1.05);
}

.header-info {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    gap: 6px;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.header-btn:hover,
.header-btn:active {
    color: var(--accent-primary);
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--accent-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px var(--accent-glow);
    animation: badgePop 0.35s var(--transition-bounce);
}

@keyframes badgePop {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* ===== Search ===== */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-primary);
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.search-overlay.active {
    transform: translateY(0);
    opacity: 1;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.search-bar input {
    flex: 1;
    background: none;
    color: var(--text-primary);
    font-size: 16px;
    padding: 8px 0;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-close {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 14px;
    padding: 8px;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.search-result-item:active {
    background: var(--bg-card);
}

.search-result-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-category {
    font-size: 12px;
    color: var(--text-muted);
}

.search-result-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.search-empty svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    padding: 36px 20px 40px;
    overflow: hidden;
    margin-bottom: 8px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(124, 92, 252, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(90, 61, 219, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(139, 108, 255, 0.08) 0%, transparent 60%);
}

.hero-particles {
    position: absolute;
    inset: 0;
}

.hero-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0;
    animation: particleFloat 6s infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    10% {
        opacity: 0.6;
        transform: translateY(-10px) scale(1);
    }

    90% {
        opacity: 0.2;
        transform: translateY(-80px) scale(0.5);
    }

    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 6px 10px;
    background: rgba(124, 92, 252, 0.15);
    border: 1px solid rgba(124, 92, 252, 0.3);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 20px;
    animation: badgeGlow 3s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
    from {
        box-shadow: 0 0 4px rgba(124, 92, 252, 0.1);
    }

    to {
        box-shadow: 0 0 20px rgba(124, 92, 252, 0.25);
    }
}

.hero-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.hero-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 340px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 18px 8px;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-light);
}

/* ===== Categories ===== */
.categories-section {
    padding: 0 0 8px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 14px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.section-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    padding: 8px 14px;
    background: rgba(124, 92, 252, 0.1);
    border: 1px solid rgba(124, 92, 252, 0.2);
    border-radius: 100px;
    transition: var(--transition);
}

.section-filter:hover,
.section-filter:active {
    background: rgba(124, 92, 252, 0.2);
}

.categories-scroll {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.category-chip:active {
    transform: scale(0.96);
}

.category-chip.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.category-chip .cat-emoji {
    font-size: 16px;
    line-height: 1;
}

/* ===== Products Grid ===== */
.products-section {
    padding: 0 0 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    animation: cardFadeIn 0.5s ease-out both;
}

.product-card:nth-child(1) {
    animation-delay: 0s;
}

.product-card:nth-child(2) {
    animation-delay: 0.05s;
}

.product-card:nth-child(3) {
    animation-delay: 0.1s;
}

.product-card:nth-child(4) {
    animation-delay: 0.15s;
}

.product-card:nth-child(5) {
    animation-delay: 0.2s;
}

.product-card:nth-child(6) {
    animation-delay: 0.25s;
}

.product-card:nth-child(7) {
    animation-delay: 0.3s;
}

.product-card:nth-child(8) {
    animation-delay: 0.35s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:active {
    transform: scale(0.97);
}

.product-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.product-image {
    position: relative;
    padding: 20px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.06) 0%, transparent 100%);
}

.product-image svg {
    width: 64px;
    height: 80px;
    filter: drop-shadow(0 4px 12px rgba(124, 92, 252, 0.2));
    transition: var(--transition);
}

.product-card:hover .product-image svg {
    transform: translateY(-4px);
    filter: drop-shadow(0 8px 20px rgba(124, 92, 252, 0.3));
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-hit {
    background: rgba(0, 214, 143, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 214, 143, 0.3);
}

.badge-new {
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(124, 92, 252, 0.3);
}

.badge-sale {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.product-info {
    padding: 0 14px 14px;
}

.product-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-dosage {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.product-price .currency {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 1px;
}

.product-old-price {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 500;
}

.product-add-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    flex-shrink: 0;
}

.product-add-btn:active {
    transform: scale(0.88);
}

.product-add-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== Info Section ===== */
.info-section {
    padding: 0 0 24px;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.info-card {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--border-light);
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.info-card h3 {
    font-size: 15px;
    font-weight: 700;
}

.info-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Footer ===== */
.app-footer {
    padding: 32px 20px 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
    opacity: 0.8;
}

.footer-name {
    font-size: 16px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-copy {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 8px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-overlay.active .modal-sheet {
    transform: translateY(0);
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 10px auto 0;
}

.modal-content {
    padding: 16px 20px 40px;
}

/* Product Detail Modal Content */
.modal-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    margin-bottom: 16px;
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.08) 0%, transparent 100%);
    border-radius: var(--radius-lg);
}

.modal-product-image svg {
    width: 100px;
    height: 130px;
    filter: drop-shadow(0 8px 24px rgba(124, 92, 252, 0.25));
}

.modal-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.modal-product-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.modal-product-price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
}

.modal-product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-primary);
}

.modal-product-old-price {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.modal-product-dosage {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 20px;
}

.modal-product-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-product-specs {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-muted);
    font-weight: 500;
}

.spec-value {
    font-weight: 600;
}

.modal-add-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

.modal-add-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* Quantity controls */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    justify-content: center;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.qty-btn:active {
    background: var(--bg-elevated);
    transform: scale(0.92);
}

.qty-value {
    font-size: 20px;
    font-weight: 800;
    min-width: 30px;
    text-align: center;
}

/* ===== Cart Modal ===== */
.cart-sheet {
    max-height: 85vh;
}

.cart-content {
    padding: 16px 20px 40px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.cart-clear {
    font-size: 13px;
    font-weight: 600;
    color: var(--danger);
    padding: 8px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
}

.cart-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

.cart-empty h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.cart-empty p {
    font-size: 13px;
    color: var(--text-muted);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.cart-item-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: rgba(124, 92, 252, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-icon svg {
    width: 28px;
    height: 36px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-dosage {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.cart-qty-btn:active {
    transform: scale(0.9);
}

.cart-qty-value {
    font-size: 14px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 17px;
    font-weight: 800;
}

.cart-summary-total .total-price {
    color: var(--accent-primary);
}

.cart-checkout-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

.cart-checkout-btn:active {
    transform: scale(0.97);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.toast.active {
    transform: translateX(-50%) translateY(0);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#app {
    animation: fadeInUp 0.5s ease-out;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ===== Responsive ===== */
@media (min-width: 400px) {
    .hero-title {
        font-size: 36px;
    }

    .products-grid {
        gap: 14px;
    }
}

@media (min-width: 500px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* ===== Pulse animation for "add to cart" feedback ===== */
@keyframes addPulse {
    0% {
        box-shadow: 0 0 0 0 var(--accent-glow);
    }

    70% {
        box-shadow: 0 0 0 12px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

.product-add-btn.pulsing {
    animation: addPulse 0.6s ease-out;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* ===== Product Category Tag ===== */
.product-category-tag {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ===== Modal Category ===== */
.modal-product-category {
    display: inline-block;
    font-size: 12px;
    color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.1);
    border: 1px solid rgba(124, 92, 252, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 6px;
}

/* ===== Modal Color Palette ===== */
.modal-color-palette {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.modal-color-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-color-swatch:hover {
    transform: scale(1.15);
}

.modal-color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 3px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== Modal Variant Chips ===== */
.modal-variants {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.variant-chip {
    padding: 8px 16px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.variant-chip:active {
    transform: scale(0.96);
}

.variant-chip.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}