/**
 * marki.css - Style dla strony listy marek
 */

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.marki-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    padding: 55px 0 60px;
    text-align: center;
    margin-bottom: 45px;
    position: relative;
    overflow: hidden;
}

.marki-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(12, 222, 208, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.marki-hero .container {
    position: relative;
    z-index: 1;
}

.marki-hero-title {
    color: #fff;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.marki-hero-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto 35px;
    line-height: 1.6;
}

.marki-hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 35px;
}

.marki-stat {
    text-align: center;
}

.marki-stat .stat-value {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.marki-stat .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search Box */
.marki-search {
    max-width: 500px;
    margin: 0 auto;
}

.marki-search .search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.marki-search .search-icon {
    position: absolute;
    left: 18px;
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
}

.marki-search input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
}

.marki-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.marki-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(12, 222, 208, 0.15);
}

/* =============================================================================
   SECTIONS
   ============================================================================= */

.marki-section {
    margin-bottom: 50px;
}

.marki-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 25px;
}

.marki-section-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.marki-section-icon svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
}

/* Color variants */
.marki-section-icon--gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.marki-section-icon--dark { background: linear-gradient(135deg, #1e293b, #0f172a); }

.marki-section-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 4px;
}

.marki-section-info p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

/* =============================================================================
   BRAND CARDS GRID (TOP BRANDS)
   ============================================================================= */

.marki-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.marka-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.marka-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.marka-card-main {
    flex: 1;
    margin-bottom: 12px;
}

.marka-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 8px;
    line-height: 1.3;
}

.marka-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.marka-type {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 10px;
}

.marka-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

.marka-products,
.marka-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
}

.marka-products svg {
    width: 14px;
    height: 14px;
}

.marka-rating svg {
    width: 14px;
    height: 14px;
}

.marka-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: #d1d5db;
    transition: all 0.2s;
}

.marka-card:hover .marka-arrow {
    stroke: var(--primary-color);
    transform: translateY(-50%) translateX(4px);
}

/* =============================================================================
   ALPHABET FILTER
   ============================================================================= */

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.alpha-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.15s;
}

.alpha-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.alpha-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* =============================================================================
   A-Z LIST
   ============================================================================= */

.marki-list {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.letter-divider {
    padding: 12px 20px;
    background: #f8fafc;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 5;
}

.marka-list-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.marka-list-item:last-child {
    border-bottom: none;
}

.marka-list-item:hover {
    background: linear-gradient(135deg, rgba(12, 222, 208, 0.03), rgba(12, 222, 208, 0.01));
}

/* Main link area */
.marka-list-main-link {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    min-width: 0;
}

.marka-list-main {
    flex: 1;
    min-width: 0;
}

.marka-list-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
    transition: color 0.15s;
}

.marka-list-main-link:hover .marka-list-name {
    color: var(--primary-color);
}

/* Badges */
.marka-list-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.marka-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
}

.marka-badge svg {
    width: 13px;
    height: 13px;
}

.marka-badge--count {
    background: #f3f4f6;
    color: var(--text-color);
}

.marka-badge--types {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.marka-badge--rating {
    background: rgba(251, 191, 36, 0.1);
    color: #b45309;
}

.marka-badge--rating .reviews-count {
    font-size: 0.7rem;
    color: #94a3b8;
}

.marka-badge--price-range {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.marka-badge--avg-price {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    font-size: 0.72rem;
}

/* Price trend */
.price-trend {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

.price-trend svg {
    width: 10px;
    height: 10px;
}

.trend-down {
    color: #16a34a;
}

.trend-down svg {
    stroke: #16a34a;
}

.trend-up {
    color: #dc2626;
}

.trend-up svg {
    stroke: #dc2626;
}

/* Product types */
.marka-product-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.marka-product-type {
    font-size: 0.72rem;
    font-weight: 500;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
}

/* Forms */
.marka-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.marka-form {
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    transition: opacity 0.15s;
}

.marka-form--more {
    background: transparent;
    color: #94a3b8;
    font-weight: 600;
}

/* Newest Product */
.marka-newest-product {
    width: 280px;
    flex-shrink: 0;
    padding: 12px 16px;
    background: #fafbfc;
    border-left: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.newest-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 8px;
}

.newest-label svg {
    width: 11px;
    height: 11px;
    stroke: #94a3b8;
}

.newest-product-card {
    display: flex;
    gap: 12px;
    text-decoration: none;
    flex: 1;
}

.newest-product-image {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.newest-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.newest-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.newest-product-placeholder svg {
    width: 24px;
    height: 24px;
    stroke: #d1d5db;
}

.newest-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.newest-product-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.newest-product-card:hover .newest-product-name {
    color: var(--primary-color);
}

.newest-product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.newest-product-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #15803d;
}

.newest-product-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
}

.newest-product-rating svg {
    width: 12px;
    height: 12px;
}

/* =============================================================================
   RESPONSIVE - TABLET
   ============================================================================= */

@media (max-width: 968px) {
    .marki-hero {
        padding: 45px 0 50px;
        margin-bottom: 35px;
    }

    .marki-hero-title {
        font-size: 2rem;
    }

    .marki-hero-desc {
        font-size: 1rem;
    }

    .marki-hero-stats {
        gap: 30px;
        margin-bottom: 30px;
    }

    .marki-stat .stat-value {
        font-size: 2rem;
    }

    .marki-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .marka-card {
        padding: 18px;
    }

    .marka-arrow {
        display: none;
    }

    .alphabet-filter {
        gap: 5px;
        padding: 12px 15px;
    }

    .alpha-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .marka-newest-product {
        width: 240px;
        padding: 10px 12px;
    }

    .newest-product-image {
        width: 48px;
        height: 48px;
    }

    .newest-product-name {
        font-size: 0.78rem;
    }
}

/* =============================================================================
   RESPONSIVE - MOBILE
   ============================================================================= */

@media (max-width: 640px) {
    .marki-hero {
        padding: 35px 0 40px;
        margin-bottom: 30px;
    }

    .marki-hero-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .marki-hero-desc {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }

    .marki-hero-stats {
        flex-wrap: wrap;
        gap: 15px 25px;
        margin-bottom: 25px;
    }

    .marki-stat .stat-value {
        font-size: 1.6rem;
    }

    .marki-stat .stat-label {
        font-size: 0.8rem;
    }

    .marki-search input {
        padding: 14px 16px 14px 46px;
        font-size: 0.95rem;
    }

    .marki-section {
        margin-bottom: 40px;
    }

    .marki-section-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .marki-section-icon {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

    .marki-section-icon svg {
        width: 22px;
        height: 22px;
    }

    .marki-section-info h2 {
        font-size: 1.2rem;
    }

    .marki-section-info p {
        font-size: 0.85rem;
    }

    /* Cards - 2 columns on mobile */
    .marki-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .marka-card {
        padding: 14px;
    }

    .marka-name {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .marka-types {
        display: none;
    }

    .marka-card-stats {
        gap: 8px;
        font-size: 0.8rem;
    }

    /* Alphabet */
    .alphabet-filter {
        gap: 4px;
        padding: 10px 12px;
    }

    .alpha-btn {
        min-width: 28px;
        height: 28px;
        font-size: 0.75rem;
        padding: 0 6px;
    }

    .alpha-btn[data-letter="all"] {
        flex: 0 0 100%;
        margin-bottom: 6px;
    }

    /* List - mobile - keep side by side layout */
    .marka-list-item {
        flex-direction: row;
        align-items: stretch;
    }

    .marka-list-main-link {
        padding: 12px 14px;
        flex: 1;
        min-width: 0;
    }

    .marka-list-name {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .marka-list-badges {
        gap: 4px;
        margin-bottom: 6px;
    }

    .marka-badge {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .marka-badge svg {
        width: 10px;
        height: 10px;
    }

    /* Hide some badges on mobile */
    .marka-badge--types,
    .marka-badge--avg-price {
        display: none;
    }

    /* Product types - compact */
    .marka-product-types {
        margin-bottom: 6px;
        gap: 4px;
    }

    .marka-product-type {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    /* Forms - compact on mobile */
    .marka-forms {
        gap: 4px;
    }

    .marka-form {
        font-size: 0.65rem;
        padding: 1px 6px;
    }

    /* Newest product - mobile compact */
    .marka-newest-product {
        width: 110px;
        padding: 8px;
        border-left: 1px solid #f1f5f9;
        background: #fafbfc;
    }

    .newest-label {
        font-size: 0.6rem;
        margin-bottom: 4px;
        gap: 3px;
    }

    .newest-label svg {
        width: 9px;
        height: 9px;
    }

    .newest-product-card {
        flex-direction: column;
        gap: 4px;
        align-items: center;
        text-align: center;
    }

    .newest-product-image {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }

    .newest-product-info {
        align-items: center;
    }

    .newest-product-name {
        font-size: 0.68rem;
        -webkit-line-clamp: 2;
        text-align: center;
    }

    .newest-product-meta {
        justify-content: center;
        gap: 4px;
    }

    .newest-product-price {
        font-size: 0.72rem;
    }

    .newest-product-rating {
        display: none;
    }

    .letter-divider {
        padding: 10px 16px;
        font-size: 1rem;
    }
}

/* Ultra small screens */
@media (max-width: 380px) {
    .marki-hero-stats {
        gap: 12px 20px;
    }

    .marki-stat .stat-value {
        font-size: 1.4rem;
    }

    .marki-grid {
        grid-template-columns: 1fr;
    }

    .marka-card {
        flex-direction: row;
        align-items: center;
    }

    .marka-card-main {
        flex: 1;
        margin-bottom: 0;
        margin-right: 10px;
    }

    .marka-arrow {
        display: block;
        position: static;
        transform: none;
        flex-shrink: 0;
    }

    .alpha-btn {
        min-width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    /* List - ultra small */
    .marka-list-main-link {
        padding: 10px 12px;
    }

    .marka-list-name {
        font-size: 0.85rem;
    }

    /* Hide rating and price badges on ultra small */
    .marka-badge--rating,
    .marka-badge--price-range {
        display: none;
    }

    /* Hide product types on ultra small */
    .marka-product-types {
        display: none;
    }

    /* Hide forms on ultra small */
    .marka-forms {
        display: none;
    }

    /* Hide trend on ultra small */
    .price-trend {
        display: none;
    }

    /* Newest product - ultra small */
    .marka-newest-product {
        width: 90px;
        padding: 6px;
    }

    .newest-label {
        display: none;
    }

    .newest-product-image {
        width: 38px;
        height: 38px;
    }

    .newest-product-name {
        font-size: 0.62rem;
        -webkit-line-clamp: 1;
    }

    .newest-product-price {
        font-size: 0.68rem;
    }
}
