/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Styles */
* { 
    box-sizing: border-box; 
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Fix for horizontal scrollbar */
.overflow-x-auto {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Logo Fix */
.logo {
    overflow: visible !important;
}

/* CSS Variables */
:root {
    --bg-color: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --accent: #10b981;
    --card-bg: #ffffff;
}

.dark-mode {
    --bg-color: #111827;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --card-bg: #1f2937;
}

/* Body */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-height: 100vh;
    margin: 0;
}

/* Header */
.header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.dark-mode .header { 
    background: #1f2937; 
    border-color: #374151; 
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 18px;
}

.theme-toggle:hover { 
    background: #1f2937; 
    border-color: #4b5563;
    color: #f9fafb;
}

.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: inline; color: #f59e0b; }
.dark-mode .theme-toggle .moon { display: none; }
.dark-mode .theme-toggle .sun { display: inline; color: #f59e0b; }

/* Product Card */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.product-card .image-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f3f4f6;
}

.dark-mode .product-card .image-container { 
    background: #374151; 
}

.product-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .image-container img { 
    transform: scale(1.05); 
}

.product-card .overlay-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

/* Filter Button */
.filter-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 8px;
}

.filter-btn:first-child {
    margin-left: 0;
}

/* Mobile/Tablet Filter Buttons - smaller for screens below 1024px */
@media (max-width: 1023px) {
    .filter-btn {
        padding: 6px 10px;
        font-size: 12px;
        margin-left: 4px;
    }
    
    .filter-btn:first-child {
        margin-left: 0;
    }
}

/* Mobile logo - larger for screens below 717px */
.mobile-logo {
    height: 70px !important;
    width: auto !important;
}

/* Mobile search - full width for screens below 717px */
@media (max-width: 717px) {
    .search-input {
        width: 100% !important;
    }
}

/* Full width helper */
.w-full {
    width: 100% !important;
}

/* Custom margin-left class */
.ml-13 {
    margin-left: 13px;
}

.filter-btn:hover { 
    background: #1f2937; 
    color: #f9fafb;
    border-color: #4b5563;
}

.filter-btn.active { 
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Search Input - Desktop */
.search-input-desktop {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px 10px 40px;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s ease;
    background: #f9fafb;
    color: var(--text-primary);
}

.dark-mode .search-input-desktop { 
    background: #374151; 
    border-color: #4b5563; 
    color: #f9fafb; 
}
.dark-mode .search-input-desktop::placeholder { 
    color: #9ca3af; 
}

.search-input-desktop:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.dark-mode .search-input-desktop:focus { 
    background: #4b5563; 
}

/* Search Input - Mobile */
.search-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px 10px 40px;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s ease;
    background: #f9fafb;
    color: var(--text-primary);
}

.dark-mode .search-input { 
    background: #374151; 
    border-color: #4b5563; 
    color: #f9fafb; 
}
.dark-mode .search-input::placeholder { 
    color: #9ca3af; 
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.dark-mode .search-input:focus { 
    background: #4b5563; 
}

/* Page Button */
.page-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) { 
    background: #1f2937;
    border-color: #4b5563;
    color: #f9fafb;
}

.page-btn.active { 
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-btn:disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
}

/* Icon Button */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover { 
    background: #1f2937; 
    border-color: #4b5563;
    color: #f9fafb;
}

/* Logo */
.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-avatar:hover { 
    opacity: 0.8; 
}

/* Skeleton Loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark-mode .skeleton { 
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%); 
}

/* Select */
select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    background: white;
    cursor: pointer;
    height: 40px;
}

.dark-mode select { 
    background: #374151; 
    border-color: #4b5563; 
    color: #f9fafb; 
}

/* Favoriten-Button – immer weißer Hintergrund, kein dunkler Rand */
.favorite-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    color: #374151;
}
.favorite-btn:hover {
    background: #ffffff !important;
}
.dark-mode .favorite-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #374151;
}
.dark-mode .favorite-btn:hover {
    background: #ffffff !important;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
}
.dark-mode footer {
    border-color: #374151;
}
