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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
    overflow-x: hidden;
    /* iPhone 15 Pro optimizations */
    max-width: 393px;
    margin: 0 auto;
    min-height: 852px;
}

/* Header Styles - iPhone 15 Pro Dynamic Island Support */
.header {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    padding: 44px 0 12px 0; /* Reduced top padding */
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 393px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* Support for safe area */
    padding-top: env(safe-area-inset-top, 44px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
}

/* Status bar content */
.header-content::before {
    content: "15:05";
    position: absolute;
    top: -32px;
    left: 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.header-content::after {
    content: "•• 📶 97";
    position: absolute;
    top: -32px;
    right: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    padding: 12px;
    cursor: pointer;
    min-width: 44px; /* iOS accessibility guidelines */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.listing-count {
    font-size: 13px;
    opacity: 1;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.share-btn, .favorite-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    padding: 12px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter Tabs - iPhone 15 Pro Optimized */
.filter-tabs {
    background: #f5f5f5;
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    position: fixed;
    top: 78px; /* Adjusted for new header height */
    width: 100%;
    max-width: 393px;
    z-index: 999;
}

.filter-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 16px 12px;
    font-size: 13px;
    color: #999;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    min-height: 50px; /* Better touch target */
    font-weight: 400;
}

.filter-tab.active {
    color: #666;
    border-bottom-color: #4a90e2;
    font-weight: 500;
}

/* Main Content - iPhone 15 Pro Spacing */
.main-content {
    margin-top: 128px; /* Adjusted for header + filters */
    margin-bottom: 90px; /* Adjusted for bottom nav */
    background: white;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Ad Banner - iPhone 15 Pro Optimized */
.ad-banner {
    display: flex;
    background: #f8f9ff;
    border: 1px solid #e3e7ff;
    margin: 16px 20px;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    align-items: center;
}

.ad-banner img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 16px;
}

.ad-content {
    flex: 1;
}

.ad-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.ad-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
}

.ad-btn {
    background: #ffb84d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
}

.ad-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 12px;
}

.ad-close i {
    color: #999;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Listings - iPhone 15 Pro Optimized */
.listings {
    background: white;
}

.listing-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    position: relative;
}

.listing-item.highlighted {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
}

.listing-image {
    width: 90px;
    height: 90px;
    margin-right: 16px;
    position: relative;
    flex-shrink: 0;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.store-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    background: #333;
    color: white;
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.listing-content {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
}

.listing-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2; /* Standard property for compatibility */
    overflow: hidden;
}

.listing-location {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 14px;
}

.listing-location i {
    margin-right: 6px;
    font-size: 12px;
}

.listing-price {
    color: #1565c0;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    position: absolute;
    right: 20px;
    bottom: 20px;
}

/* Bottom Navigation - iPhone 15 Pro Optimized */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 393px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    padding: 12px 0;
    z-index: 1000;
    /* Support for safe area */
    padding-bottom: env(safe-area-inset-bottom, 12px);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    cursor: pointer;
    transition: color 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    display: block;
    color: #999;
}

.nav-item span {
    font-size: 11px;
    color: #999;
    display: block;
    font-weight: 500;
}

.nav-item.active i,
.nav-item.active span {
    color: #4a90e2;
}

.add-btn {
    background: #4a90e2;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.add-btn i {
    color: white !important;
    margin: 0;
}

/* Chat Button - iPhone 15 Pro Optimized */
.chat-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: #333;
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* iPhone 15 Pro Specific Adjustments */
@media screen and (max-width: 393px) {
    .header-content {
        padding: 0 16px;
    }
    
    .ad-banner {
        margin: 12px 16px;
        padding: 16px;
    }
    
    .listing-item {
        padding: 16px;
    }
    
    .listing-image {
        width: 80px;
        height: 80px;
        margin-right: 12px;
    }
    
    .listing-content h3 {
        font-size: 15px;
    }
    
    .listing-price {
        font-size: 16px;
    }
}

/* Landscape mode for iPhone 15 Pro */
@media screen and (orientation: landscape) and (max-height: 393px) {
    .header {
        padding-top: env(safe-area-inset-top, 12px);
    }
    
    .filter-tabs {
        top: 48px; /* Adjusted for landscape header */
    }
    
    .main-content {
        margin-top: 98px; /* Adjusted for landscape */
    }
    
    .chat-btn {
        bottom: 80px;
        right: 20px;
    }
}

/* Status Bar and Dynamic Island - iPhone 15 Pro */
/* Removed Dynamic Island styles */

/* Time display */
/* Moved to header-content::before */

/* Battery and signal indicators */
/* Moved to header-content::after */

/* Battery percentage indicator */
/* Integrated with header-content::after */

/* iPhone Home Indicator */
.bottom-nav::after {
    content: "";
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background: #000;
    border-radius: 3px;
    z-index: 1002;
}

/* Smooth scrolling for iPhone 15 Pro */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Improved touch targets for iPhone 15 Pro */
button, .nav-item, .listing-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Safe area support */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(44px, env(safe-area-inset-top));
    }
    
    .bottom-nav {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* Yepy Category Filter System - Behavioral Science Nudges */
.yepy-category-filter {
    background: linear-gradient(135deg, #fafafa 0%, #f5f7fa 100%);
    margin: 16px 20px;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e8eaef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.yepy-category-filter::before {
    display: none; /* Remove shimmer effect for subtle approach */
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.filter-info {
    width: 32px;
    height: 32px;
    background: #f1f3f4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.category-title h3 {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

.category-subtitle {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

.category-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.category-tab {
    flex: 1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.category-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.category-tab.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.category-tab.recommended {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    position: relative;
}

.category-tab.recommended::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-top: 12px solid #10b981;
}

.category-tab.recommended:hover {
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.category-tab.recommended.active {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.category-tab.active .tab-title {
    color: white;
    font-weight: 700;
}

.category-tab.recommended.active .tab-title {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.category-tab.active .tab-subtitle {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.category-tab.recommended.active .tab-subtitle {
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    justify-content: center;
    gap: 4px;
}

.tab-title {
    font-size: 12px;
    font-weight: 600;
    display: block;
}

.tab-subtitle {
    font-size: 9px;
    opacity: 0.7;
    display: block;
    line-height: 1.2;
}

/* Smart Recommendation Strip */
.smart-recommendation {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.smart-recommendation.show {
    opacity: 1;
    transform: translateY(0);
}

.recommendation-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.recommendation-content i {
    color: #3b82f6;
    font-size: 12px;
}

.recommendation-content span {
    font-size: 11px;
    color: #1e40af;
    flex: 1;
}

.try-yepy-btn {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.try-yepy-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

/* Subtle Social Proof */
.filter-stats {
    text-align: center;
    margin-bottom: 8px;
}

.stats-text {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
}

/* Update existing classes to be more subtle */
.trending-badge {
    display: none; /* Remove prominent trending badge */
}

.social-proof {
    display: none; /* Hide old social proof */
}

/* Responsive adjustments for Yepy filter */
@media screen and (max-width: 393px) {
    .yepy-category-filter {
        margin: 16px;
        padding: 16px;
    }
    
    .category-tabs {
        gap: 6px;
    }
    
    .category-tab {
        padding: 10px 6px;
        min-height: 70px;
    }
    
    .tab-title {
        font-size: 12px;
    }
    
    .tab-subtitle {
        font-size: 9px;
    }
}

/* Yepy Value Proposition Card */
.yepy-value-card {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    margin-top: 16px;
    padding: 16px;
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.2);
    animation: slideInFromBottom 0.5s ease-out;
}

@keyframes slideInFromBottom {
    0% { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.value-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.value-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin-right: 10px;
    border: 1px solid #f59e0b;
}

.value-title {
    flex: 1;
}

.value-title h4 {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 2px;
}

.value-title p {
    font-size: 11px;
    color: #d97706;
    margin: 0;
    font-weight: 500;
}

.certified-mark {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    animation: certifiedPulse 2s infinite;
}

@keyframes certifiedPulse {
    0%, 100% { 
        background: #10b981;
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }
    50% { 
        background: #059669;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
    }
}

.value-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
}

.feature-item i {
    color: #f59e0b;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.value-cta {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
}

.discount-text {
    font-size: 11px;
    color: #92400e;
    font-weight: 600;
    font-style: italic;
}

/* Responsive adjustments for value card */
@media screen and (max-width: 393px) {
    .yepy-value-card {
        margin-top: 12px;
        padding: 12px;
    }
    
    .value-title h4 {
        font-size: 13px;
    }
    
    .feature-item {
        font-size: 11px;
        padding: 6px 10px;
    }
} 