/* 
   ============================================================
   FIXER PREMIUM iOS DESIGN SYSTEM
   Apple-Inspired Aesthetics & High-Quality Components
   ============================================================ 
*/

:root {
    /* Core System Colors */
    --ios-blue: #007AFF;
    --ios-blue-light: #5856D6;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-gray: #8E8E93;
    --ios-light-gray: #F2F2F7;
    --ios-dark-gray: #1C1C1E;
    
    /* Surface Colors */
    --ios-bg: #FFFFFF;
    --ios-card: #FFFFFF;
    --ios-glass: rgba(255, 255, 255, 0.72);
    
    /* Border Radii (Squircles) */
    --ios-radius-lg: 24px;
    --ios-radius-md: 20px;
    --ios-radius-sm: 14px;
    
    /* Shadows */
    --ios-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --ios-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    
    /* Typography */
    --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Plus Jakarta Sans", sans-serif;
}

/* Global Smooth Transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--ios-font);
    background-color: var(--ios-bg);
    color: #000;
}

/* Glassmorphism Classes */
.ios-glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--ios-glass);
}

.ios-glass-dark {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(28, 28, 30, 0.8);
}

/* Premium Header Redesign */
.app-header.ios-premium {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-left h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    color: #000;
}

.header-subtitle {
    font-size: 13px;
    color: var(--ios-gray);
    font-weight: 500;
}

.location-selector.ios-style {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: var(--ios-blue);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* Button & Icon Styling */
.header-icon-btn.ios-style {
    width: 44px;
    height: 44px;
    background: var(--ios-light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    color: #000;
}

.header-icon-btn.ios-style:active {
    transform: scale(0.9);
    background: #E5E5EA;
}

/* Modern Search Row */
.search-row.ios-style {
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-wrapper.ios-style {
    flex: 1;
    background: var(--ios-light-gray);
    border-radius: var(--ios-radius-sm);
    padding: 0 16px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.search-wrapper.ios-style:focus-within {
    background: #EBEBEB;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.search-wrapper.ios-style input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

/* Premium Cards */
.cat-rect.ios-premium, .cat-square.ios-premium {
    border-radius: var(--ios-radius-md);
    overflow: hidden;
    box-shadow: var(--ios-shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.cat-rect.ios-premium:active, .cat-square.ios-premium:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Bottom Nav (Floating iOS Style) */
.ios-bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    height: 72px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 36px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--ios-gray);
    transition: all 0.2s;
}

.nav-item.active {
    color: var(--ios-blue);
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
}

/* Category Grid Polish */
.cats-popup-grid.ios-style {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px 0;
}

.cats-popup-item.ios-style .cats-popup-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--ios-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.cats-popup-item.ios-style:active .cats-popup-icon {
    transform: scale(0.88);
}

/* Dark Mode Overrides */
body.dark-mode {
    background-color: #000;
    color: #fff;
    --ios-bg: #000;
    --ios-card: #1C1C1E;
    --ios-light-gray: #1C1C1E;
    --ios-glass: rgba(28, 28, 30, 0.8);
}

body.dark-mode .app-header.ios-premium {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .header-left h1 {
    color: #fff;
}

body.dark-mode .ios-bottom-nav {
    background: rgba(28, 28, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.05);
}
