/* Base shared styles (moved to styles/) */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-body, 'Inter', sans-serif);
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #F5F5F7;
}

/* Layout: make footer stick to bottom using flex layout */
html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

:root {
    --royal-violet: #7400b8;
    --indigo-bloom: #6930c3;
    --slate-indigo: #5e60ce;
    --blue-energy: #5390d9;
    --fresh-sky: #4ea8de;
    --sky-surge: #48bfe3;
    --strong-cyan: #56cfe1;
    --pearl-aqua: #64dfdf;
    --turquoise: #72efdd;
    --aquamarine: #80ffdb;
    --white: #ffffff;
    --muted: #6b7280;
    --muted-dark: #4a4a4a;

    --royal-violet-rgb: 116, 0, 184;
    --pearl-aqua-rgb: 100, 223, 223;
    --font-family-body: 'Inter', sans-serif;
    --font-family-heading: 'Poppins', 'Inter', sans-serif;
    --font-family: var(--font-family-body);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Acrylic glass utility for header */
.acrylic {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Hidden by default, shown in mobile menu */
.mobile-menu-brand {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.mobile-menu-brand img {
    height: 60px;
    width: auto;
}

.mobile-menu-brand span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--royal-violet);
    font-family: var(--font-family-heading);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 700;
    color: var(--royal-violet);
    /* Changed from white to royal-violet for visibility on all pages */
    text-shadow: none;
    transition: color 0.3s ease;
}

/* Headings and logo should use the heading font */
h1,
h2,
h3,
h4,
h5,
h6,
.nav-logo {
    font-family: var(--font-family-heading, 'Poppins', 'Inter', sans-serif);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin-left: auto;
    align-items: center;
}

.nav-menu li {
    margin-left: 2rem;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    margin-left: auto;
    margin-right: 1rem;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--blue-energy);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: inline-block;
    will-change: transform, color;
    transition: color 0.18s ease, transform 0.12s ease;
}

.nav-menu a:hover {
    color: var(--blue-energy);
    transform: translateY(-2px) scale(1.04);
}

/* Ensure cart toggle matches nav spacing and color */
.nav-actions {
    margin-left: 0;
    /* spacing handled by .nav-menu li and .nav-profile */
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cart-toggle {
    color: var(--muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.cart-toggle i,
.cart-toggle #cart-count {
    color: inherit;
}

/* Hover effect for cart toggle to match nav link hover */
.cart-toggle {
    transition: color 0.18s ease, transform 0.12s ease;
}

.cart-toggle:hover {
    color: var(--blue-energy);
    transform: translateY(-2px);
}

.cart-toggle:hover i,
.cart-toggle:hover #cart-count {
    color: inherit;
}

/* Profile icon in header */
.nav-profile {
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-left: 2rem;
    /* match spacing between nav items */
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-profile:focus-visible {
    outline: 2px solid var(--blue-energy);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-profile:hover {
    color: var(--blue-energy);
    transform: translateY(-2px);
}

/* Profile Dropdown Menu */
.profile-dropdown {
    position: relative;
    display: inline-flex;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1001;
    overflow: hidden;
}

.profile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--muted-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.profile-menu-item:hover {
    background: linear-gradient(90deg, rgba(var(--pearl-aqua-rgb), 0.15), rgba(var(--royal-violet-rgb), 0.08));
    color: var(--indigo-bloom);
    padding-left: 22px;
}

.profile-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--blue-energy);
    transition: color 0.18s ease;
}

.profile-menu-item:hover i {
    color: var(--royal-violet);
}

.profile-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--pearl-aqua-rgb), 0.4), transparent);
    margin: 6px 0;
}

.profile-menu-item.logout {
    color: #e53935;
}

.profile-menu-item.logout i {
    color: #e53935;
}

.profile-menu-item.logout:hover {
    background: rgba(229, 57, 53, 0.1);
    color: #c62828;
}

/* Arrow indicator on profile button when menu is open */
.profile-dropdown .nav-profile[aria-expanded="true"] {
    color: var(--royal-violet);
}

.nav-logo-img {
    width: auto;
    height: auto;
    max-height: 52px;
    object-fit: contain;
    display: inline-block;
    opacity: 1;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.nav-logo-img.ja {
    max-height: 64px;
}

.nav-logo-img.company {
    max-height: 52px;
}

.nav-brand {
    font-weight: 700;
    color: inherit;
}

.nav-sep {
    color: var(--pearl-aqua);
    margin: 0 0.25rem;
}

.nav-logo .nav-brand {
    color: var(--indigo-bloom);
}

.nav-menu a {
    color: var(--muted);
}

.nav-menu a.active,
.nav-menu a:active {
    color: var(--royal-violet);
    font-weight: 700;
}

/* Keep acrylic header shadow on any page when acrylic class is present */
.navbar.acrylic,
.navbar.acrylic.navbar-scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Keep stronger header shadow only on shop page */
.shop-page .navbar,
.login-page .navbar,
.register-page .navbar,
.returns-page .navbar {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 992px) {
    .navbar {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-logo {
        color: var(--royal-violet);
        text-shadow: none;
    }
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.side-cart-header {
    padding: 25px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.side-cart-header h3 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    color: var(--heading-color);
}

/* Prevent visible caret on non-editable elements (avoid accidental edit-like caret) */
body *:not(input):not(textarea):not([contenteditable="true"]) {
    caret-color: transparent !important;
}

/* Responsiveness */
@media (max-width: 992px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: flex-start;
        /* Start from top */
        align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        padding: 3rem 2rem;
        /* Adjusted padding */
        margin: 0;
        overflow-y: auto;
    }

    .mobile-menu-brand {
        display: flex;
        /* Show on mobile menu */
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
        /* Reduced margin */
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        font-size: 1.4rem;
        width: 100%;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-actions {
        margin-left: 0;
    }

    .nav-profile {
        margin-left: 0.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .nav-logo-img.ja {
        max-height: 48px;
    }

    .nav-logo-img.company {
        max-height: 40px;
    }

    .nav-brand {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem !important;
    }

    .container {
        padding: 0 15px;
    }
}

/* Global Input & Cursor Polish */
* {
    caret-color: transparent !important;
    /* Hide caret everywhere by default */
}

input,
textarea,
[contenteditable="true"] {
    color: #333 !important;
    caret-color: #000000 !important;
    /* Force black blinking caret only here */
    color-scheme: light !important;
    /* Force light mode for I-beam logic */

    /* DEFINITIVE FIX: Custom SVG Black I-beam cursor */
    /* Applied globally for consistency */
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path d='M15.5 7h1v18h-1z M13 7h6v1h-6z M13 24h6v1h-6z' fill='black'/></svg>") 16 16, text !important;
}

/* Ensure placeholder contrast */
::placeholder {
    color: #888;
    opacity: 0.8;
}

/* General Mobile Polish */
input,
select,
textarea,
button {
    font-family: inherit;
}

/* Avoid visible highlight on tap */
* {
    -webkit-tap-highlight-color: transparent;
}

/* --- Premium Sticky Cookie Popup --- */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 380px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 30px;
    border-radius: 24px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    z-index: 10007;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateX(-120%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    border: none;
}

.cookie-banner.show {
    transform: translateX(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.cookie-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--royal-violet), var(--blue-energy));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 5px;
    box-shadow: 0 8px 20px rgba(116, 0, 184, 0.3);
    animation: cookie-float 3s ease-in-out infinite;
}

@keyframes cookie-float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

.cookie-content {
    flex: none;
}

.cookie-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--royal-violet);
    letter-spacing: -0.02em;
}

.cookie-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted-dark);
    line-height: 1.6;
}

.cookie-content a {
    color: var(--blue-energy);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(83, 144, 217, 0.2);
    transition: all 0.2s ease;
}

.cookie-content a:hover {
    border-bottom-color: var(--blue-energy);
    color: var(--indigo-bloom);
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    text-align: center;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--royal-violet), var(--indigo-bloom));
    color: white;
    box-shadow: 0 4px 15px rgba(116, 0, 184, 0.25);
}

.cookie-btn-accept:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(116, 0, 184, 0.4);
    filter: brightness(1.1);
}

.cookie-btn-decline {
    background: rgba(0, 0, 0, 0.05);
    color: var(--muted-dark);
}

.cookie-btn-decline:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
}

.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 10006;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.cookie-overlay.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 480px) {
    .cookie-banner {
        left: 20px;
        right: 20px;
        width: auto;
        bottom: 20px;
        padding: 25px;
    }
}