/* * Shogime Boutique - Corrected Stylesheet
 * Matches layout.html class names
 */

:root {
    /* Color Palette */
    --primary: #2C2C2C;
    --secondary: #8B7355;
    --accent: #C9A66B;
    --background: #FAFAF8;
    --surface: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --border: #E8E8E8;
    --hover: #F5F5F3;
    
    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* Transitions */
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background);
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
}

/* --- TOP BAR --- */
.top-bar {
    background: var(--primary);
    color: white;
    padding: 8px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-link:hover { color: var(--accent); }
.divider { margin: 0 10px; opacity: 0.5; }

/* --- MAIN HEADER --- */
.main-header {
    position: fixed !important; /* Changed from sticky to fixed for better compatibility */
    top: 0 !important;
    left: 0;
    width: 100%;
    z-index: 9999 !important; /* Ensure it stays above EVERYTHING */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    padding: 0.8rem 0 !important; /* Shrink slightly on scroll */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#main-content {
    padding-top: 80px; /* Adjust based on your header height */
}

body:not(.dashboard) #main-content {
    padding-top: 80px; /* Adjust based on your header height */
}

/* Logo */
.header-logo img {
    max-height: 50px; /* Adjust logo size */
    width: auto;
}
.logo-hover { display: none; }

/* Navigation Menu */
.header-nav { flex: 1; display: flex; justify-content: center; }

.nav-menu {
    display: flex;
    gap: 2.5rem;
    margin: 0;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link i { font-size: 14px; color: var(--accent); }

/* 1. Base State - Hide the line for EVERY link by default */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0 !important; /* Force width to 0 */
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
    opacity: 1;
}

/* 2. Hover State - Show line only when the mouse is physically over the link */
.nav-link:hover::after {
    width: 100% !important; /* Force width to 100% on hover */
}

/* 3. Dropdown Fix - Specifically target the Categories/Dropdown button */
/* This tells the browser: "Even if Oscar says this is active, keep the line at 0" */
.nav-menu .nav-item.dropdown .nav-link.active::after,
.nav-menu .nav-item.dropdown .nav-link.dropdown-toggle::after {
    width: 0 !important;
}

/* 4. Re-enable hover for the Dropdown */
.nav-menu .nav-item.dropdown .nav-link:hover::after {
    width: 100% !important;
}

/* 5. Active State for simple links (like Home/Shop) */
/* We only want the line to stay if it's a direct page link that is currently active */
.nav-link.active:not(.dropdown-toggle)::after {
    width: 100% !important;
}

.nav-link.dropdown-toggle {
    border-bottom: 0px solid transparent !important;
    text-decoration: none !important;
}

/* Header Actions (Search, Account, Basket) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.header-action-btn:hover { color: var(--accent); }

.basket-btn {
    background: var(--primary);
    color: white !important;
    padding: 8px 16px;
    border-radius: 2px;
    transition: all 0.3s;
}

.basket-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.basket-badge {
    background: var(--accent);
    color: white;
    font-size: 10px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
    margin-top: -8px;
}

/* --- SEARCH BAR EXPANDED --- */
.search-bar-expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 2rem 0;
    z-index: 1100;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-bar-expanded.active { transform: translateY(0); }

.search-input-group {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.search-input {
    flex: 1;
    border: none;
    font-size: 1.5rem;
    font-family: var(--font-display);
    padding: 0 1rem;
    outline: none;
}

.search-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- FOOTER --- */
.main-footer {
    background: var(--primary);
    color: white;
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.footer-section h3 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: rgba(255,255,255,0.7); }
.footer-links a:hover { color: white; padding-left: 5px; }

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 0;
    margin-top: 3rem;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
}

/* --- UTILITIES --- */
.mobile-menu-toggle { display: none; }

@media (max-width: 992px) {
    .header-nav { display: none; } /* Hide menu on mobile for now */
    .mobile-menu-toggle { display: block; background: none; border: none; font-size: 1.5rem; }
    .header-wrapper { padding: 0 1rem; }
}

/* --- PARALLAX HERO STYLES --- */
.hero-section {
    position: relative;
    height: 90vh;
    overflow: hidden; /* Keeps the moving image inside the box */
    display: flex;
    align-items: center;
    perspective: 1px; /* Helps some browsers with smooth parallax */
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Extra height is required so we don't see white space when it moves */
    z-index: 1;
    will-change: transform; /* Optimization for smoother movement */
}

.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 120%; /* Taller than container to allow movement */
    z-index: 1;
}

.hero-img-main {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 2;
}

.hero-container {
    position: relative;
    z-index: 10; /* Ensure text is always ABOVE the moving image */
    pointer-events: none; /* Allows clicks to pass through if needed */
}

.hero-container a, 
.hero-container button {
    pointer-events: auto; /* Re-enable clicking for buttons */
}

/* --- FLOATING ELEMENTS --- */
.parallax-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(201, 166, 107, 0.2); /* Your --accent color */
    filter: blur(40px);
}
.circle-1 { width: 300px; height: 300px; top: -50px; right: 0; }
.circle-2 { width: 200px; height: 200px; bottom: 0; right: 20%; background: rgba(139, 115, 85, 0.2); }

.floating-card {
    position: absolute;
    right: 10%;
    top: 20%;
    background: white;
    color: #1a1a1a;
    padding: 20px 40px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    text-align: center;
    color: white;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.scroll-mouse {
    width: 20px; height: 35px;
    border: 2px solid white;
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}
.scroll-wheel {
    width: 2px; height: 8px;
    background: white;
    position: absolute;
    top: 5px; left: 50%;
    transform: translateX(-50%);
    animation: scrollMove 2s infinite;
}
@keyframes scrollMove {
    0% { opacity: 0; top: 5px; }
    50% { opacity: 1; }
    100% { opacity: 0; top: 15px; }
}

/* --- REVEAL ANIMATION --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Add a slight delay for each item in the grid for a staggered effect */
.reveal-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.4s; }

/* --- DASHBOARD PADDING FIX --- */

/* 1. Remove the global main-content padding that we used for the storefront */
body.dashboard #main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 2. Fix the navbar spacing in the dashboard */
/* Oscar's dashboard has its own internal navbar, so we reset any fixed header gaps */
body.dashboard .navbar {
    margin-bottom: 20px !important;
}

/* 3. Ensure the dashboard content isn't hidden under anything */
body.dashboard #content_wrapper {
    padding: 20px !important;
}