@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Clinical Color Palette */
    --clr-white: #FFFFFF;
    --clr-bg-clinical: #F8F9FA;
    --clr-bg-soft: #F1F3F5;
    --clr-text-main: #000000;
    --clr-text-muted: #8E9196;
    /* Slightly adjusted for better image matching */
    --clr-accent: #000000;
    /* Modern clinical dark */
    --clr-border: #E9ECEF;
    --clr-glass: rgba(255, 255, 255, 0.7);
    --clr-success: #2B8A3E;
    --clr-error: #FA5252;
    /* Typography */
    --ff-primary: 'Inter', sans-serif;
    --ff-heading: 'Playfair Display', serif;
    /* Spacing & Borders */
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
    --max-width: 1440px;
}

/* Logo Styles */
.logo-text {
    font-family: var(--ff-primary);
    font-weight: 900;
    /* Inter Black for CORECURA */
    font-size: 1.6rem;
    letter-spacing: -0.04em;
    /* Tightening for that logo feel */
    color: #000000;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.logo-text span {
    font-weight: 700;
    /* Inter Bold for LABS */
    font-style: italic;
    color: #555555;
    letter-spacing: 0.02em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--ff-primary);
    background-color: var(--clr-bg-clinical);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--ff-heading);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Clinical Glassmorphism */
.glass {
    background: var(--clr-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Buttons */
.btn-primary {
    background-color: var(--clr-accent);
    color: var(--clr-white);
    padding: 1rem 2.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--clr-accent);
    color: var(--clr-accent);
    padding: 1rem 2.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background-color: var(--clr-accent);
    color: var(--clr-white);
}

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

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

.animate-fade {
    animation: fadeIn 0.8s ease-out forwards;
}

.carousel-card:hover img {
    transform: scale(1.05);
}

/* Section Header */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title span {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--clr-text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN 
   ========================================================================== */

/* -------------------------------------
   TABLET (max-width: 1024px)
   ------------------------------------- */
@media (max-width: 1024px) {

    /* HEADER */
    .logo-text {
        font-size: 1.2rem;
    }

    #desktop-nav ul {
        gap: 1rem !important;
    }

    /* HERO */
    h1.font-heading,
    .font-heading {
        font-size: 3.5rem !important;
    }

    /* CATEGORY CARDS / SHOP GRID / KPI CARDS */
    .container>div[style*="grid-template-columns: repeat(3, 1fr)"],
    section[style*="padding: 8rem 2rem;"]>div[style*="grid-template-columns: repeat(3, 1fr)"],
    div[style*="grid-template-columns: repeat(3, 1fr)"],
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* DAILY PROTOCOLS */
    section[style*="display: flex; min-height: 80vh; background: var(--clr-white);"] {
        flex-direction: column !important;
    }

    section[style*="display: flex; min-height: 80vh; background: var(--clr-white);"]>div {
        min-height: 40vh;
    }

    /* SHOP */
    aside[style*="width: 250px;"] {
        width: 200px !important;
    }

    /* PRODUCT DETAIL & CHECKOUT */
    div[style*="grid-template-columns: 1.5fr 1fr"] {
        gap: 3rem !important;
    }

    /* ADMIN */
    #admin-sidebar {
        width: 200px !important;
    }

    div[style*="grid-template-columns: 1fr 3fr"] {
        grid-template-columns: 200px 1fr !important;
        gap: 2rem !important;
    }

    /* LOGIN / PORTAL — reduce top padding */
    section[style*="padding: 180px 0"] {
        padding: 140px 0 60px !important;
    }

    section[style*="padding: 140px 0 80px"] {
        padding: 120px 0 60px !important;
    }

    /* CAROUSEL — wider cards on tablet */
    #carousel-track > a {
        min-width: calc(25% - 1.2rem) !important;
        max-width: calc(25% - 1.2rem) !important;
    }

    /* FOOTER */
    footer>div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* -------------------------------------
   FOLDING PHONE / SMALL TABLET (max-width: 900px)
   ------------------------------------- */
@media (max-width: 900px) {

    /* NAVBAR — switch to hamburger at 900px */
    #desktop-nav {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    #mobile-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: #fff;
        padding: 1rem;
        border-bottom: 1px solid var(--clr-border);
        flex-direction: column;
        gap: 1rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    #mobile-nav.active {
        display: flex !important;
    }

    #mobile-nav ul {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* Hide desktop avatar dropdown, use mobile nav instead */
    .header-login-btn,
    .user-menu-wrapper {
        display: none !important;
    }

    /* PORTAL — stack 2fr/1fr to single column */
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* ADMIN — stack sidebar above content */
    div[style*="grid-template-columns: 1fr 3fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    #admin-sidebar {
        flex-direction: row !important;
        overflow-x: auto;
        width: 100% !important;
        border-bottom: 1px solid var(--clr-border);
        padding-bottom: 1rem;
    }

    #admin-sidebar button {
        white-space: nowrap;
        flex: 0 0 auto;
        text-align: center !important;
    }

    /* Admin short labels on small tablet */
    .admin-label-full {
        display: none;
    }

    .admin-label-short {
        display: inline;
    }

    /* CAROUSEL — 3 cards visible */
    #carousel-track > a {
        min-width: calc(33.33% - 1.2rem) !important;
        max-width: calc(33.33% - 1.2rem) !important;
    }
}

/* -------------------------------------
   MOBILE (max-width: 768px)
   ------------------------------------- */
@media (max-width: 768px) {
    #main-content {
        padding-top: 70px !important;
    }

    /* TYPOGRAPHY — only override base body text, not all elements */
    body {
        font-size: 14px !important;
    }

    h2,
    .section-title h2 {
        font-size: 1.75rem !important;
    }

    /* BUTTONS — full width on mobile, except inside tables and inline action rows */
    .btn-primary,
    .btn-outline {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Only expand standalone buttons to full width, not table/inline ones */
    .btn-primary:not(td .btn-primary):not(.inline-actions .btn-primary),
    .btn-outline:not(td .btn-outline):not(.inline-actions .btn-outline) {
        width: 100% !important;
    }

    /* CONTAINER */
    .container {
        padding: 0 1rem !important;
    }

    /* HEADER */
    :root {
        --header-height: 60px;
    }

    .logo-text {
        font-size: 1rem !important;
    }

    #header>.container {
        justify-content: space-between;
        position: relative;
    }

    #desktop-nav {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    #mobile-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: #fff;
        padding: 1rem;
        border-bottom: 1px solid var(--clr-border);
        flex-direction: column;
        gap: 1rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    #mobile-nav.active {
        display: flex !important;
    }

    #mobile-nav ul {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* HERO */
    section[style*="image2.jpg"] {
        height: 80vh !important;
        background-position: center !important;
    }

    section[style*="image2.jpg"] .container {
        align-items: center !important;
        text-align: center !important;
    }

    section[style*="image2.jpg"] h1 {
        font-size: 2.2rem !important;
        margin-bottom: 1.5rem !important;
    }

    section[style*="image2.jpg"] .animate-fade {
        width: 90% !important;
        margin: 0 auto !important;
        padding: 2rem !important;
        flex-direction: column !important;
    }

    /* GRIDS TO 1 COL */
    .container>div[style*="grid-template-columns: repeat(3, 1fr)"],
    section[style*="padding: 8rem 2rem;"]>div[style*="grid-template-columns: repeat(3, 1fr)"],
    div[style*="grid-template-columns: repeat(2, 1fr)"],
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: repeat(4, 1fr)"],
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* DAILY PROTOCOLS PADDING */
    section[style*="display: flex; min-height: 80vh; background: var(--clr-white);"]>div:last-child {
        padding: 2rem !important;
    }

    /* SHOP */
    div[style*="display: flex; gap: 4rem;"] {
        flex-direction: column;
        gap: 2rem !important;
    }

    aside[style*="width: 250px;"] {
        width: 100% !important;
        display: none;
    }

    aside[style*="width: 250px;"].active-filter {
        display: block !important;
    }

    #mobile-filter-toggle {
        display: block !important;
    }

    /* Let shop grid be 2 cols on mobile if min-width is enough, else 1 col handled by above. But let's map them all to 1 col for simplicity per prompt or 2 cols? User says: "Grid 2col, 480px below 1col". */
    div[style*="display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem;"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    @media (max-width: 480px) {
        div[style*="display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem;"] {
            grid-template-columns: 1fr !important;
        }
    }

    /* PRODUCT DETAIL / CHECKOUT / ADMIN / PORTAL TO 1 COL */
    div[style*="grid-template-columns: 1.5fr 1fr"],
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns: 1fr 3fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .product-image-container,
    div[style*="position: sticky"] {
        position: static !important;
    }

    .product-detail-section {
        padding-top: 100px !important;
    }

    .product-detail-image-container {
        width: 100% !important;
    }

    .product-detail-image-container img {
        object-fit: contain !important;
    }

    .checkout-section {
        padding-top: 80px !important;
        overflow-x: hidden !important;
    }

    .checkout-title {
        margin-bottom: 1.5rem !important;
    }

    .checkout-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .checkout-form-column {
        order: 2 !important;
    }

    .checkout-summary {
        order: 1 !important;
        position: static !important;
        top: auto !important;
        border-radius: 12px !important;
        border: 1px solid var(--clr-border) !important;
        padding: 1.5rem !important;
        background: var(--clr-white) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        margin-bottom: 1.5rem !important;
    }

    .checkout-steps {
        overflow-x: auto !important;
        gap: 0.5rem !important;
        white-space: nowrap !important;
    }

    .checkout-steps span {
        font-size: 0.55rem !important;
    }

    .payment-methods {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .checkout-submit-btn {
        margin-bottom: 2rem !important;
    }

    /* IOS AUTO-ZOOM FIX — 16px minimum prevents Safari zoom on focus */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    /* LOGIN FORM — reduce top padding, proper sizing */
    .container > .glass.animate-fade {
        width: 100% !important;
        max-width: 100% !important;
    }

    .container > .glass.animate-fade > div {
        padding: 2rem !important;
    }

    section[style*="padding: 180px 0"],
    section[style*="padding: 180px 0;"] {
        padding: 20px 0 40px !important;
    }

    /* FORM ELEMENTS */
    form[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    form[style*="grid-template-columns: 1fr 1fr"] [style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    /* CART DRAWER */
    #cart-panel {
        left: 0 !important;
        width: 100vw !important;
        padding: 1.5rem !important;
        transform: translateX(100%);
    }

    /* MODALS */
    .glass.animate-fade {
        width: 95vw !important;
        padding: 2rem !important;
    }

    .location-modal-content {
        padding: 2rem !important;
    }

    .location-modal-title {
        font-size: 1.25rem !important;
    }

    /* ADMIN / PORTAL TABLES */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    #admin-sidebar {
        flex-direction: row !important;
        overflow-x: auto;
        width: 100% !important;
        border-bottom: 1px solid var(--clr-border);
        padding-bottom: 1rem;
    }

    #admin-sidebar button {
        white-space: nowrap;
        flex: 0 0 auto;
        text-align: center !important;
    }

    /* FOOTER */
    footer>div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    footer.container {
        padding: 2rem 1rem !important;
    }

    .footer-copyright {
        margin-top: 2rem !important;
        font-size: 0.6rem !important;
    }

    .footer-research-only {
        display: block !important;
        margin-top: 0.25rem !important;
    }

    /* ANNOUNCEMENT BAR */
    body>div:not(#app) {
        word-wrap: break-word !important;
        font-size: 0.5rem !important;
        padding: 0 1rem !important;
        white-space: normal !important;
    }

    /* CORECURA STANDARD */
    section[style*="background: #0A0A0A;"] {
        flex-direction: column !important;
    }

    section[style*="background: #0A0A0A;"]>div:first-child {
        min-height: 40vh !important;
        width: 100% !important;
        flex: none !important;
    }

    section[style*="background: #0A0A0A;"]>div:last-child {
        padding: 2rem !important;
        background: #0A0A0A !important;
        width: 100% !important;
        flex: none !important;
    }

    section[style*="background: #0A0A0A;"] span[style*="font-size: 6.5rem"] {
        display: none !important;
    }

    section[style*="background: #0A0A0A;"]>div:last-child>div:last-child {
        flex-direction: column !important;
    }

    /* CAROUSEL */
    #carousel-track>a {
        min-width: 60% !important;
        max-width: 60% !important;
    }

    button[onclick*="slideCarousel"] {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }

    /* RESEARCH FRONTIERS */
    section[style*="background: #000;"]>div>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    section[style*="background: #000;"]>div>div[style*="grid-template-columns"]>a {
        aspect-ratio: 3/4 !important;
        width: 100% !important;
    }

    /* PORTAL */
    .portal-header h1 {
        font-size: 2rem !important;
    }

    /* ADMIN HEADER STATS */
    div[style*="justify-content: space-between"][style*="margin-bottom: 4rem"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
    }

    div[style*="justify-content: space-between"][style*="margin-bottom: 4rem"] > div[style*="display: flex; gap: 1rem"] {
        width: 100% !important;
    }

    div[style*="justify-content: space-between"][style*="margin-bottom: 4rem"] > div[style*="display: flex; gap: 1rem"] > div {
        flex: 1 !important;
    }

    /* ADMIN USER SEARCH INPUT */
    #admin-user-search {
        width: 100% !important;
    }

    /* ADMIN USER FILTERS + SEARCH ROW */
    div[style*="justify-content: space-between"][style*="flex-wrap: wrap"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    div[style*="justify-content: space-between"][style*="flex-wrap: wrap"] > div[style*="position: relative"] {
        width: 100% !important;
    }

    /* EDIT PROFILE BUTTONS — keep inline layout */
    #edit-profile-form .btn-primary,
    #edit-profile-form .btn-outline {
        width: auto !important;
    }

    /* GENERAL */
    html,
    body {
        overflow-x: hidden !important;
        width: 100vw !important;
    }
}

/* ==========================================================================
   TRUST BADGES COMPONENT
   ========================================================================== */
.trust-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    background: var(--clr-white);
    overflow: hidden;
}

.trust-badge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1.5rem;
    border-right: 1px solid var(--clr-border);
    transition: background 0.3s ease;
    opacity: 0;
    transform: translateY(16px);
    animation: trust-fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.trust-badge-card:nth-child(4n) {
    border-right: none;
}

.trust-badge-card:nth-child(1) {
    animation-delay: 0.10s;
}

.trust-badge-card:nth-child(2) {
    animation-delay: 0.25s;
}

.trust-badge-card:nth-child(3) {
    animation-delay: 0.40s;
}

.trust-badge-card:nth-child(4) {
    animation-delay: 0.55s;
}

@keyframes trust-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trust-badge-card:hover {
    background: var(--clr-bg-clinical);
}

.trust-badge-icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-badge-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    stroke: var(--clr-border);
    stroke-width: 1.5px;
    fill: none;
    stroke-dasharray: 6 4;
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.trust-badge-card:hover .trust-badge-ring {
    animation: trust-ring-rotate 8s linear infinite;
    stroke: #1B5E8A;
}

@keyframes trust-ring-rotate {
    to {
        stroke-dashoffset: -100;
    }
}

.trust-badge-svg {
    width: 28px;
    height: 28px;
    stroke: #000;
    stroke-width: 1.5px;
    fill: none;
    transition: stroke 0.3s ease;
}

.trust-badge-card:hover .trust-badge-svg {
    stroke: #1B5E8A;
}

.trust-badge-stat {
    font-family: var(--ff-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    color: #000;
}

.trust-badge-title {
    font-family: var(--ff-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text-muted);
    margin-bottom: 0.75rem;
}

.trust-badge-desc {
    font-size: 0.75rem;
    color: var(--clr-text-muted);
    line-height: 1.5;
    max-width: 200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .trust-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-badge-card {
        border-bottom: 1px solid var(--clr-border);
    }

    .trust-badge-card:nth-child(2n) {
        border-right: none;
    }

    .trust-badge-card:nth-child(3),
    .trust-badge-card:nth-child(4) {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .trust-badges-grid {
        grid-template-columns: 1fr;
    }

    .trust-badge-card {
        border-right: none !important;
        border-bottom: 1px solid var(--clr-border) !important;
    }

    .trust-badge-card:last-child {
        border-bottom: none !important;
    }
}

/* ==========================================================================
   FOOTER LINK HOVER EFFECTS
   ========================================================================== */
.footer-links a {
    color: var(--clr-text-muted);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--clr-text-main);
}

/* ==========================================================================
   SCROLL TO TOP BUTTON
   ========================================================================== */
#scroll-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 44px;
    height: 44px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    pointer-events: none;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scroll-to-top:hover {
    background: #333;
    transform: translateY(-2px);
}

/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 2px solid var(--clr-border);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton loading states */
.skeleton {
    background: var(--clr-bg-soft);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text-sm {
    height: 10px;
    width: 60%;
    margin-bottom: 6px;
}

.skeleton-text-lg {
    height: 18px;
    width: 40%;
}

/* ==========================================================================
   INPUT FOCUS STATES
   ========================================================================== */
input:focus,
select:focus {
    border-color: #000 !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   ADMIN FILTER PILLS
   ========================================================================== */
.filter-pill {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--clr-border);
    background: var(--clr-white);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--ff-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-pill:hover {
    border-color: #000;
    background: var(--clr-bg-soft);
}

.filter-pill.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.pill-count {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 6px;
    border-radius: 100px;
    min-width: 16px;
    text-align: center;
}

.filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   ORDER STATUS BADGES
   ========================================================================== */
.order-status-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ==========================================================================
   PULSE DOT (NEEDS ACTION)
   ========================================================================== */
.pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--clr-accent);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-attention 1.5s ease-in-out infinite;
}

@keyframes pulse-attention {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(255, 165, 0, 0);
    }
}

/* ==========================================================================
   ANIMATE FADE (for modals)
   ========================================================================== */
.animate-fade {
    animation: fadeInUp 0.25s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ==========================================================================
   NAV DROPDOWN (Tools)
   ========================================================================== */
.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    min-width: 200px;
    padding-top: 12px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.nav-dropdown-menu {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    padding: 0.5rem 0;
}

.nav-dropdown-wrapper:hover .nav-dropdown {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.nav-dropdown-item {
    display: block;
    padding: 0.65rem 1.25rem;
    font-size: 0.8rem !important;
    font-weight: 500;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* ==========================================================================
   USER AVATAR + DROPDOWN
   ========================================================================== */
.user-menu-wrapper {
    position: relative;
}

.user-avatar-btn:hover {
    border-color: var(--clr-border) !important;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: transparent;
    min-width: 160px;
    padding-top: 10px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.user-dropdown-menu {
    background: #fff;
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
}

.user-menu-wrapper:hover .user-dropdown {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.user-dropdown-item {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--clr-text-main);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--ff-primary);
    transition: background 0.15s ease;
}

.user-dropdown-item:hover {
    background: var(--clr-bg-soft);
}

/* ==========================================================================
   HEADER LOGIN BUTTON
   ========================================================================== */
.header-login-btn {
    font-size: 0.7rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem 1rem;
    border: 1px solid var(--clr-border);
    border-radius: 4px;
    color: var(--clr-text-main);
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.header-login-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* ==========================================================================
   PEPTIDE CALCULATOR — TOGGLE BUTTONS
   ========================================================================== */
.calc-toggle-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.calc-toggle {
    padding: 0.65rem 1.25rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--ff-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.calc-toggle:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.85);
}

.calc-toggle.active {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
    font-weight: 700;
}

.calc-toggle-other {
    flex: 0.6;
}

/* Calculator responsive */
@media (max-width: 768px) {
    #calc-card {
        padding: 1.5rem !important;
    }

    .calc-toggle {
        padding: 0.55rem 0.75rem;
        font-size: 0.75rem;
    }

    .calc-toggle-group {
        gap: 0.35rem;
    }

    #calc-results .grid,
    #calc-results div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
}

/* Hide login button on mobile (shown in mobile nav instead) */
@media (max-width: 768px) {
    .header-login-btn,
    .user-menu-wrapper {
        display: none !important;
    }
}

/* ==========================================================================
   ADMIN SIDEBAR LABELS — short on mobile, full on desktop
   ========================================================================== */
.admin-label-short {
    display: none;
}

@media (max-width: 768px) {
    .admin-label-full {
        display: none;
    }

    .admin-label-short {
        display: inline;
    }

    /* Admin action buttons (Add Agent, etc.) — full width */
    .admin-section-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .admin-action-btn {
        width: 100% !important;
    }

    /* Track page — reduce top padding */
    .track-page-section {
        padding-top: 100px !important;
    }

    /* Checkout empty state — reduce top padding */
    .checkout-empty-section {
        padding-top: 120px !important;
    }
}
