/* ===== ОСНОВНЫЕ СТИЛИ PHARMANEXT ===== */

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Переменные */
:root {
    --primary-color: #08A9AA;
    --primary-dark: #067a7b;
    --secondary-color: #FF6032;
    --secondary-dark: #e5542b;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 10px rgba(8, 169, 170, 0.1);
    --shadow-medium: 0 8px 25px rgba(8, 169, 170, 0.15);
    --shadow-heavy: 0 20px 40px rgba(8, 169, 170, 0.2);
    --border-radius: 8px;
    --border-radius-large: 15px;
    --transition: all 0.3s ease;
    --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Основные элементы */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #FFFFFF 0%, var(--light-color) 0%, #FFFFFF 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Загрузчик приложения */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.loader-text {
    font-size: 1.2rem;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Шапка */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
}

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

/* Основной контент */
.main {
    margin-top: 160px; /* чтобы контент не перекрывался */
}

/* Hero секция */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    padding: 2rem; /* уменьшить отступы */
    text-align: center;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-heavy);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-family);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-medium);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--secondary-dark);
}

/* Статус панель */
.status-panel {
    background: #e8f5e8;
    border: 2px solid var(--success-color);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    transition: var(--transition);
}

.status-panel.loading {
    background: #fff3cd;
    border-color: var(--warning-color);
}

.status-panel.error {
    background: #f8d7da;
    border-color: var(--error-color);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    display: inline-block;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.status-description {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* Секции */
.section {
    margin-bottom: 4rem;
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

/* Загрузка товаров */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--primary-color);
}

.loading-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Кнопка "Загрузить еще" */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(8, 169, 170, 0.3);
    transition: var(--transition);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 169, 170, 0.4);
}

/* Подвал */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* Уведомления */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
}

.notification {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-medium);
    border-left: 4px solid var(--primary-color);
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Утилиты */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }


/* Компактная строка поиска в шапке */
.search-bar-compact {
    flex: 1;
    max-width: 400px;
    min-width: 200px;
    position: relative;
    margin: 0 20px;
}

.search-bar-compact input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-light);
}

.search-bar-compact .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
}