 /* ==========================================================================
   Стили для страницы каталога (catalog.php)
   ========================================================================== */

/* Секция категорий */
.categories {
    padding: 80px 0;
    /* background: var(--light-gray); */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.category-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
}

.category-card:hover {
    transform: var(--hover-transform);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.category-image {
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-title {
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
}

/* Секция шаблонов */
.templates-section {
    padding: 80px 0;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 20px;
    justify-items: center;
}

.template-card {
    position: relative;
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* iPhone 16 стилизация */
.iphone-frame {
    position: relative;
    width: 280px;
    height: 580px;
    background: var(--white);
    border-radius: 45px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 12px solid #1a1a1a;
}

/* Dynamic Island */
.iphone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 35px;
    background: #1a1a1a;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 2;
}

.template-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 33px;
}

.template-image img {
    width: 100%;
    height: 200%;
    object-fit: cover;
    animation: scrollImage 10s linear infinite;
}

@keyframes scrollImage {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.template-content {
    text-align: center;
    padding: 0 20px;
}

.template-title {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.price {
    font-size: 1rem;
    margin-bottom: 10px;
}

.template-content .btn {
    background: var(--price-btn);
    color: var(--text-color);
    padding: 2px 15px;
    border-radius: 30px;
    font-size: 1rem;
    border: none;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.template-content .btn:hover {
    background: var(--price_btn_hover);
    color: var(--white);
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    scale: 1.1;
}

/* Медиа запросы */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .templates-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 30px;
    }

    .template-card {
        width: 240px;
    }

    .iphone-frame {
        width: 240px;
        height: 500px;
        border-radius: 40px;
    }

    .template-image {
        border-radius: 28px;
    }
}

@media (max-width: 480px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }

    .template-card {
        width: 220px;
    }

    .iphone-frame {
        width: 220px;
        height: 460px;
        border-radius: 35px;
    }

    .template-image {
        border-radius: 23px;
    }
} 