/* Shared Header, Mobile Drawer, and Footer Stylesheet (Global Redesign) */

:root {
    --f-radius-lg: 32px;
    --f-radius-md: 20px;
    --f-radius-sm: 12px;
    
    --f-bg-page: var(--bg-primary);
    --f-bg-card: var(--bg-primary);
    --f-border: 1px solid var(--border-color);
    --f-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
    --f-shadow-md: 0 16px 48px -16px rgba(15, 23, 42, 0.08);
    --f-shadow-lg: 0 24px 64px -20px rgba(15, 23, 42, 0.12);
    
    --f-text-muted: var(--text-secondary);
    --f-success: #10b981;
    --f-danger: #ef4444;
}

[data-theme="dark"] {
    --f-border: 1px solid rgba(255, 255, 255, 0.06);
    --f-shadow-md: 0 20px 48px -16px rgba(0, 0, 0, 0.4);
    --f-shadow-lg: 0 32px 64px -20px rgba(0, 0, 0, 0.6);
}

body {
    padding-top: 104px;
}

/* Header Floating Redesign */
.header-redesign {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    z-index: 900;
    width: 95%;
    max-width: 1250px;
    margin: 0 auto;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-redesign.scrolled {
    top: 12px;
    width: 90%;
    max-width: 1150px;
}

.header-container {
    height: 64px;
    padding: 0 24px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: color-mix(in srgb, var(--bg-primary) 60%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--f-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--f-shadow-sm);
}

.header-redesign.scrolled .header-container {
    background-color: color-mix(in srgb, var(--bg-primary) 95%, transparent);
    border-color: var(--border-color);
    box-shadow: var(--f-shadow-md);
}

/* Header Alignment without Tailwind dependency */
.desktop-nav {
    display: flex;
    align-items: center;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-links a {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.header-links a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle Button styling */
.theme-toggle-input {
    display: none !important;
}

.theme-toggle-btn {
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: var(--f-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.theme-icon {
    font-size: 18px;
}

.theme-icon-sun {
    display: none;
}

.theme-icon-moon {
    display: block;
}

/* Toggle styles based on theme */
[data-theme="dark"] .theme-icon-sun {
    display: block;
}

[data-theme="dark"] .theme-icon-moon {
    display: none;
}

/* Cart Button */
.header-cart {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: var(--f-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.header-cart:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.header-cart .count {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Actions Button styling */
.header-actions .btn {
    height: 38px !important;
    padding: 0 20px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    border-radius: 100px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.header-actions .btn-primary {
    background-color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    color: #fff !important;
}

.header-actions .btn-primary:hover {
    background-color: color-mix(in srgb, var(--primary-color) 85%, #000) !important;
    border-color: color-mix(in srgb, var(--primary-color) 85%, #000) !important;
}
 
/* Mobile Nav Toggle Icon */
.nav-toggle {
    display: none;
    background: var(--bg-secondary);
    border: var(--f-border);
    cursor: pointer;
    font-size: 22px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0 !important;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Header media queries for responsive behavior */
@media (max-width: 992px) {
    .desktop-nav {
        display: none !important;
    }
    
    .nav-toggle {
        display: flex !important;
    }
    
    .header-actions .hidden-mobile,
    .header-actions .header-cta {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 0 14px !important;
    }

    .header-logo {
        max-width: 120px !important;
    }
}

/* mobile nav sheet drawer slide-up */
.mobile-nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
}

.mobile-nav-drawer.open {
    display: flex;
}

.mobile-nav-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-nav-sheet {
    position: relative;
    background-color: var(--bg-primary);
    border-top: var(--f-border);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.mobile-nav-bar {
    width: 40px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 100px;
    margin: 0 auto 20px;
}

.mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    border-radius: var(--f-radius-sm);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 40%, transparent);
    transition: all 0.2s;
}

.mobile-drawer-link i {
    color: var(--primary-color);
    font-size: 20px;
}

.mobile-drawer-link:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

/* Footer layout */
.footer {
    background-color: var(--bg-primary);
    border-top: var(--f-border);
    padding: 80px 0 40px !important;
}

.footer-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: var(--f-border);
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-strip-item {
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-strip-item i {
    color: var(--primary-color);
    font-size: 18px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-about {
    font-size: 14px;
    line-height: 1.6;
    color: var(--f-text-muted);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--f-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.footer-socials a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    font-size: 14px;
    color: var(--f-text-muted);
    transition: color 0.2s;
    font-weight: 700;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: var(--f-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 13.5px;
    color: var(--f-text-muted);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-redesign {
        width: 90% !important;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}
