/* Отступ для фиксированной шапки на всех страницах */
.page-content {
    padding-top: 100px;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .page-content {
        padding-top: 80px;
    }
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Общие стили для кнопок */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

    .btn-primary:hover {
        background: #764ba2;
        transform: translateY(-2px);
    }

/* ===== КАРТОЧКИ ОДИНАКОВОЙ ВЫСОТЫ ===== */
.categories-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.category-card,
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .category-card:hover,
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    /* Контент карточки */
    .category-card .category-content,
    .product-card .product-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 20px;
    }

    /* Заголовок */
    .category-card h3,
    .product-card h3 {
        margin: 0 0 10px;
        font-size: 1.2rem;
        font-weight: 600;
        color: #333;
    }

    /* Описание */
    .category-card p,
    .product-card .product-description {
        flex: 1;
        color: #666;
        line-height: 1.5;
        margin-bottom: 15px;
        font-size: 0.9rem;
    }

/* Цена */
.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
}

/* Кнопка должна быть внизу */
.btn-view-category,
.btn-view-product {
    display: block;
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    margin-top: auto;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

    .btn-view-category:hover,
    .btn-view-product:hover {
        background: #764ba2;
        transform: translateY(-2px);
    }

/* Изображение/плейсхолдер */
.category-image,
.product-image {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* Изображение будет заполнять весь контейнер, касаясь краёв */
    .category-image img,
    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Заполняет весь контейнер, обрезая лишнее */
        object-position: center; /* Центрирует изображение */
        transition: transform 0.3s ease;
    }

/* Эффект увеличения при наведении на карточку */
.category-card:hover .category-image img,
.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Для товаров можно сделать с contain */
.product-image img {
    object-fit: contain;
    background: white;
    padding: 10px;
}

.image-placeholder {
    font-size: 48px;
    color: white;
}

body.dark-theme .category-image,
body.dark-theme .product-image {
    background: linear-gradient(135deg, #4455aa 0%, #553a88 100%);
}

    body.dark-theme .product-image img {
        background: #2d2d44;
    }

/* Бейдж конфигуратора */
.configurable-badge {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    margin-bottom: 12px;
    align-self: flex-start;
}

/* Подкатегории */
.subcategories {
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.subcategory-tag {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: #666;
}

.logo img {
    height: 35px;
    width: auto;
}

@media (max-width: 768px) {
    .logo img {
        height: 25px;
    }

    .hero-logo {
        max-width: 80% !important;
    }
}
