/**
 * typy-produktow.css - Style dla strony typów produktów
 */

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

.typy-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;
}

.typy-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(99, 102, 241, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

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

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

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

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

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

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

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

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

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

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

.typy-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;
}

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

.typy-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
   ============================================================================= */

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

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

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

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

/* Color variants */
.typy-section-icon--teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.typy-section-icon--red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.typy-section-icon--green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.typy-section-icon--blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.typy-section-icon--pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.typy-section-icon--orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.typy-section-icon--gray { background: linear-gradient(135deg, #64748b, #475569); }
.typy-section-icon--slate { background: linear-gradient(135deg, #64748b, #475569); }
.typy-section-icon--dark { background: linear-gradient(135deg, #1e293b, #0f172a); }

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

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

/* =============================================================================
   TYPE CARDS GRID
   ============================================================================= */

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

.typ-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;
}

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

.typ-card-main {
    flex: 1;
}

.typ-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 10px;
    line-height: 1.3;
}

.typ-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
}

.typ-products,
.typ-brands {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    background: #f3f4f6;
    padding: 5px 10px;
    border-radius: 15px;
}

.typ-products svg,
.typ-brands svg {
    width: 14px;
    height: 14px;
}

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

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

/* Card color variants */
.typ-card--teal:hover { border-color: #14b8a6; }
.typ-card--teal .typ-products { background: rgba(20, 184, 166, 0.1); color: #0f766e; }

.typ-card--red:hover { border-color: #ef4444; }
.typ-card--red .typ-products { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }

.typ-card--green:hover { border-color: #22c55e; }
.typ-card--green .typ-products { background: rgba(34, 197, 94, 0.1); color: #15803d; }

.typ-card--blue:hover { border-color: #3b82f6; }
.typ-card--blue .typ-products { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; }

.typ-card--pink:hover { border-color: #ec4899; }
.typ-card--pink .typ-products { background: rgba(236, 72, 153, 0.1); color: #be185d; }

.typ-card--orange:hover { border-color: #f97316; }
.typ-card--orange .typ-products { background: rgba(249, 115, 22, 0.1); color: #c2410c; }

.typ-card--gray:hover { border-color: #64748b; }
.typ-card--gray .typ-products { background: rgba(100, 116, 139, 0.1); color: #334155; }

.typ-card--slate:hover { border-color: #64748b; }
.typ-card--slate .typ-products { background: rgba(100, 116, 139, 0.1); color: #334155; }

/* =============================================================================
   EXPAND SECTION
   ============================================================================= */

.typy-expand {
    margin-top: 20px;
    text-align: center;
}

.typy-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f3f4f6;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.typy-expand-btn:hover {
    background: #e5e7eb;
}

.typy-expand-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.typy-expand.expanded .typy-expand-btn svg {
    transform: rotate(180deg);
}

.typy-expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
}

.typy-expand-content.expanded {
    max-height: 2000px;
    padding-top: 20px;
}

/* Tags */
.typy-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.typ-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    transition: all 0.15s;
}

.typ-tag:hover {
    border-color: var(--primary-color);
    background: rgba(12, 222, 208, 0.05);
}

.typ-tag span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Tag color variants */
.typ-tag--teal:hover { border-color: #14b8a6; background: rgba(20, 184, 166, 0.05); }
.typ-tag--red:hover { border-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
.typ-tag--green:hover { border-color: #22c55e; background: rgba(34, 197, 94, 0.05); }
.typ-tag--blue:hover { border-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }
.typ-tag--pink:hover { border-color: #ec4899; background: rgba(236, 72, 153, 0.05); }
.typ-tag--orange:hover { border-color: #f97316; background: rgba(249, 115, 22, 0.05); }
.typ-tag--gray:hover { border-color: #64748b; background: rgba(100, 116, 139, 0.05); }
.typ-tag--slate:hover { border-color: #64748b; background: rgba(100, 116, 139, 0.05); }

/* =============================================================================
   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
   ============================================================================= */

.typy-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.typ-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;
}

/* Ingredients */
.typ-ingredients {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.typ-ingredients-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.typ-ingredient {
    font-size: 0.75rem;
    font-weight: 500;
    color: #0d9488;
    background: rgba(12, 222, 208, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    transition: opacity 0.15s;
}

/* Forms */
.typ-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

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

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

/* Newest Product */
.typ-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-brand {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.newest-product-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.3;
    margin: 2px 0 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) {
    .typy-hero {
        padding: 45px 0 50px;
        margin-bottom: 35px;
    }

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

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

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

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

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

    .typ-card {
        padding: 18px;
    }

    .typ-arrow {
        display: none;
    }

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

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

    .typ-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) {
    .typy-hero {
        padding: 35px 0 40px;
        margin-bottom: 30px;
    }

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

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

    .typy-hero-stats {
        flex-wrap: wrap;
        gap: 20px 30px;
        margin-bottom: 25px;
    }

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

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

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

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

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

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

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

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

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

    /* Cards - single column */
    .typy-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .typ-card {
        padding: 16px;
        flex-direction: row;
        align-items: center;
    }

    .typ-card-main {
        flex: 1;
        margin-right: 12px;
    }

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

    .typ-card-stats {
        gap: 6px;
    }

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

    .typ-card:hover .typ-arrow {
        transform: translateX(4px);
    }

    /* Expand */
    .typy-expand-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .typy-tags {
        gap: 8px;
    }

    .typ-tag {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* 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 */
    .typ-list-item {
        flex-direction: row;
        align-items: stretch;
    }

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

    .typ-list-name {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .typ-list-badges {
        gap: 4px;
    }

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

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

    /* Show badges on mobile - compact */
    .typ-badge--price-range,
    .typ-badge--avg-price,
    .typ-badge--brands {
        display: inline-flex;
    }

    /* Ingredients - compact on mobile */
    .typ-ingredients {
        margin-top: 6px;
        gap: 4px;
    }

    .typ-ingredients-label {
        font-size: 0.65rem;
    }

    .typ-ingredient {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    /* Forms - compact on mobile */
    .typ-forms {
        margin-top: 6px;
        gap: 4px;
    }

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

    /* Newest product - mobile compact */
    .typ-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-brand {
        display: none;
    }

    .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) {
    .typy-hero-stats {
        gap: 15px 25px;
    }

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

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

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

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

    /* Hide some badges on ultra small */
    .typ-badge--avg-price,
    .typ-badge--brands {
        display: none;
    }

    /* Hide ingredients on ultra small */
    .typ-ingredients {
        display: none;
    }

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

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

    /* Newest product - ultra small */
    .typ-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;
    }
}
