/**
 * Lyanna 1Shop - Global CSS Design Tokens & Structure Reset
 * File: css/global.css
 */

/* ==========================================================================
   1. Design System & CSS Variables
   ========================================================================== */
:root {
    /* Color Palette */
    --nav-dark: #232f3e;          /* Deep marketplace trust charcoal */
    --nav-dark-hover: #19222d;
    --accent-gold: #f3a847;       /* Amazonian gold conversion accent */
    --accent-gold-rgb: 243, 168, 71;
    --accent-gold-hover: #e09332;
    --price-red: #b12704;         /* Authoritative price retail red */
    
    /* Backgrounds & Surfaces */
    --bg-main: #f4f6f8;           /* Neutral light background */
    --bg-surface: #ffffff;        /* Pure white for foreground elements */
    --bg-dark: #121921;           /* Premium luxury layout dark bg */
    --bg-glass-dark: rgba(35, 47, 62, 0.85);
    --bg-glass-light: rgba(255, 255, 255, 0.85);

    /* Borders & Outlines */
    --border-color: #eef0f2;
    --border-color-focus: rgba(243, 168, 71, 0.5);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-circle: 50%;

    /* Typography & Scales */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    /* Box Shadows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(243, 168, 71, 0.3);
    --shadow-bubble: 0 6px 16px rgba(0, 0, 0, 0.12);

    /* Animation Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Layout Dimensions */
    --header-height: 70px;
    --content-max-width: 1280px;
}

/* ==========================================================================
   2. Absolute Layout Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    background-color: var(--bg-main);
    font-family: var(--font-primary);
    color: var(--nav-dark);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Clear standard WordPress and plugin margins */
body.admin-bar {
    margin-top: 0 !important;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* ==========================================================================
   3. Typography & Utility Classes
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
}

.text-gold { color: var(--accent-gold); }
.text-red { color: var(--price-red); }
.text-muted { color: #88929d; }

.container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Hardware-Accelerated Container Reset */
.hardware-accel {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
}

/* ==========================================================================
   4. Header & Global Navigation
   ========================================================================== */
.lyanna-header {
    background-color: var(--nav-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
    padding: 10px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* Brand Identity */
.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--bg-surface);
    display: flex;
    align-items: center;
}

.brand-logo .logo-1shop {
    background-color: var(--accent-gold);
    color: var(--nav-dark);
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    margin-left: 4px;
    font-weight: 900;
    display: inline-block;
    transform: skewX(-10deg);
}

/* Global Search Bar (Mobile & Desktop Fluid) */
.header-search {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 15px;
    position: relative;
}

.header-search form {
    display: flex;
    background: var(--bg-surface);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow var(--transition-fast);
}

.header-search form:focus-within {
    box-shadow: 0 0 0 2px var(--accent-gold);
}

.header-search input[type="search"] {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    border: none;
}

.header-search button[type="submit"] {
    background-color: var(--accent-gold);
    color: var(--nav-dark);
    padding: 0 25px;
    font-weight: 700;
    transition: background var(--transition-fast);
}

.header-search button[type="submit"]:hover {
    background-color: var(--accent-gold-hover);
}

/* Desktop Navigation Menu */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 18px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--bg-surface);
}

.nav-links a {
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after {
    width: 100%;
}

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

/* User Actions & Dynamic Cart Badges */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon-btn {
    color: var(--bg-surface);
    font-size: 1.4rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-circle);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.header-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-gold);
}

.cart-icon-container {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 4px 14px 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bg-surface);
    transition: all var(--transition-fast);
}

.cart-icon-container:hover {
    background: var(--accent-gold);
    color: var(--nav-dark);
    border-color: var(--accent-gold);
}

.cart-icon-container .cart-badge {
    background: var(--price-red);
    color: var(--bg-surface);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--border-radius-circle);
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cart-icon-container:hover .cart-badge {
    background: var(--nav-dark);
}

.cart-info-summary {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    font-weight: 600;
}

.cart-info-summary .cart-total-label {
    opacity: 0.8;
}

/* Hamburger Trigger */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--bg-surface);
    cursor: pointer;
}

/* ==========================================================================
   5. Mobile Bottom Navigation Bar (Super Premium Mobile App feel)
   ========================================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass-light);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 999;
    height: 60px;
    justify-content: space-around;
    align-items: center;
    padding: 5px 0;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--nav-dark);
    opacity: 0.75;
    transition: opacity var(--transition-fast), color var(--transition-fast);
    flex-grow: 1;
}

.mobile-bottom-nav a.active, .mobile-bottom-nav a:hover {
    opacity: 1;
    color: var(--accent-gold-hover);
}

.mobile-bottom-nav i {
    font-size: 1.25rem;
    margin-bottom: 3px;
}

.mobile-bottom-nav .nav-cart-wrapper {
    position: relative;
}

.mobile-bottom-nav .cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--price-red);
    color: var(--bg-surface);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--border-radius-circle);
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   6. Global Footer Design
   ========================================================================== */
.lyanna-footer {
    background-color: var(--nav-dark);
    color: var(--bg-surface);
    padding: 60px 0 80px; /* space for mobile-bottom-nav */
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.footer-col p {
    color: #a4b0be;
    margin-bottom: 15px;
    line-height: 1.7;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #a4b0be;
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
    transition: all var(--transition-fast);
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-surface);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background-color: var(--accent-gold);
    color: var(--nav-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #a4b0be;
    font-size: 0.8rem;
}

/* Trust Badges Bar */
.trust-bar {
    background-color: #1a222d;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trust-bar-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bg-surface);
    font-size: 0.85rem;
    font-weight: 500;
}

.trust-item i {
    color: var(--accent-gold);
    font-size: 1.2rem;
}

/* ==========================================================================
   7. Media Queries (Global Core Styles)
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 5px 0 0 0;
    }
    
    .header-container {
        flex-wrap: wrap;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
