/**
 * Główny plik CSS - Porównywarka Cen MED-LEK
 * Wspólne style dla wszystkich stron
 */

/* ==================================================
   CSS VARIABLES
   ================================================== */
:root {
    --primary-color: #0cded0;
    --secondary-color: #1a1a1a;
    --text-color: #333333;
    --text-light: #555555;
    --dark-gray: #4a4a4a;
    --gray-color: #f5f5f5;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --border-radius: 12px;
    --border-radius-card: 16px;
    --transition: all 0.3s ease;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;
}

/* ==================================================
   RESET & BASE
   ================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background: #fafafa;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: var(--font-primary);
    cursor: pointer;
}

/* ==================================================
   UTILITIES
   ================================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.stylish {
    font-family: var(--font-secondary);
    font-style: italic;
}

/* ==================================================
   TOP BAR
   ================================================== */
.top-bar {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 0;
    font-size: 14px;
}

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

.delivery-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* ==================================================
   NAVIGATION
   ================================================== */
.nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-family: var(--font-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==================================================
   HEADER SEARCH
   ================================================== */
.header-search {
    position: relative;
    flex: 1;
    max-width: 350px;
    margin: 0 25px;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 25px;
    padding: 0 4px 0 16px;
    transition: all 0.2s;
}

.header-search-form:focus-within {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.header-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    font-size: 0.9rem;
    min-width: 0;
}

.header-search-input::placeholder {
    color: #9ca3af;
}

.header-search-btn {
    background: var(--primary-color);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.header-search-btn:hover {
    background: #0bc5b8;
}

.header-search-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

/* Header search autocomplete */
.header-search .search-autocomplete {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.header-search .search-autocomplete.active {
    display: block;
}

/* Mobile search button */
.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    margin-left: 10px;
}

.mobile-search-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-color);
}

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.mobile-search-overlay.active {
    display: block;
}

.mobile-search-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-search-container.active {
    transform: translateY(0);
}

.mobile-search-container .search-input-wrapper {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 25px;
    padding: 6px 6px 6px 16px;
}

.mobile-search-container .search-icon {
    width: 20px;
    height: 20px;
    stroke: #9ca3af;
    flex-shrink: 0;
}

.mobile-search-container .search-input-large {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    font-size: 1rem;
    min-width: 0;
}

.mobile-search-container .search-btn-large {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .header-search {
        display: none;
    }

    .mobile-search-btn {
        display: flex;
    }
}

/* ==================================================
   BREADCRUMB
   ================================================== */
.breadcrumb {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-color);
    font-weight: 600;
}

.breadcrumb svg {
    color: var(--text-light);
}

/* ==================================================
   SECTIONS
   ================================================== */
.section {
    margin-bottom: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-family: var(--font-secondary);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
}

/* ==================================================
   BUTTONS
   ================================================== */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
    border: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background: #0ab8ad;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #000;
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ==================================================
   STARS RATING
   ================================================== */
.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffa41c;
    font-size: 14px;
}

.star.empty {
    color: #e0e0e0;
}

/* ==================================================
   FOOTER
   ================================================== */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 40px 0 20px;
}

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

.footer-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* ==================================================
   RESPONSIVE - TABLET
   ================================================== */
@media (max-width: 968px) {
    .top-bar {
        display: none;
    }

    .nav-links {
        gap: 20px;
        font-size: 14px;
    }

    .section-title {
        font-size: 36px;
    }
}

/* ==================================================
   RESPONSIVE - MOBILE
   ================================================== */
@media (max-width: 640px) {
    .top-bar {
        display: none;
    }

    .nav-container {
        height: 60px;
    }

    .logo {
        font-size: 22px;
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .breadcrumb {
        font-size: 11px;
        padding: 12px 0;
    }
}
