
/* ========================================
   SHOPTIME — Page catégorie
======================================== */

.category-page {
    margin: 0;
    padding: 0;
    color: #1f2937;
    background: #f8fafc;
    font-family: Arial, Helvetica, sans-serif;
}

.category-page *,
.category-page *::before,
.category-page *::after {
    box-sizing: border-box;
}

.category-main {
    min-height: 400px;
}

.category-container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

/* Introduction */

.category-intro {
    padding: 35px 0 25px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.category-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
}

.category-breadcrumb a {
    color: #1d4ed8;
    text-decoration: none;
}

.category-breadcrumb a:hover {
    text-decoration: underline;
}

.category-title {
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    line-height: 1.3;
}

.category-description {
    max-width: 750px;
    color: #64748b;
    font-size: 16px;
    line-height: 1.8;
}

.category-count {
    margin: 18px 0 0;
    color: #64748b;
    font-size: 14px;
}

/* Grille des produits */

.category-products {
    padding: 35px 0 55px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* Carte produit */

.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgb(15 23 42 / 5%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgb(15 23 42 / 10%);
}

.product-card__image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-card__image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
}

.product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.04);
}

.product-card__badge {
    position: absolute;
    z-index: 1;
    top: 12px;
    padding: 6px 9px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.product-card__badge--discount {
    left: 12px;
    background: #dc2626;
}

.product-card__badge--featured {
    right: 12px;
    background: #1d4ed8;
}

.product-card__badge--stock {
    right: 12px;
    top: auto;
    bottom: 12px;
    background: #475569;
}

.product-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
}

.product-card__title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.product-card__title a {
    color: #111827;
    text-decoration: none;
}

.product-card__title a:hover {
    color: #1d4ed8;
}

.product-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 15px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 9px;
    margin: 0 0 12px;
}

.product-card__price {
    color: #059669;
    font-size: 20px;
    font-weight: 800;
}

.product-card__old-price {
    color: #94a3b8;
    font-size: 14px;
    text-decoration: line-through;
}

.product-card__availability {
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
}

.product-card__availability--available {
    color: #059669;
}

.product-card__availability--out {
    color: #dc2626;
}

.product-card__button {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 12px 16px;
    border-radius: 9px;
    background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.product-card__button:hover {
    color: #fff;
    opacity: 0.9;
}

/* Aucun produit */

.category-empty {
    padding: 55px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.category-empty-icon {
    margin-bottom: 15px;
    font-size: 42px;
}

.category-empty h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-empty p {
    margin: 0 0 20px;
    color: #64748b;
    line-height: 1.7;
}

.category-back-link {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 8px;
    background: #1e40af;
    color: #fff;
    text-decoration: none;
}

/* Pagination */

.category-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 35px;
}

.pagination-link {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    text-decoration: none;
}

.pagination-link:hover,
.pagination-link.active {
    border-color: #1e40af;
    background: #1e40af;
    color: #fff;
}

.pagination-dots {
    color: #64748b;
}

/* Responsive */

@media (max-width: 1000px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 700px) {
    .category-intro {
        padding: 25px 0 20px;
    }

    .category-products {
        padding: 24px 0 35px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card__content {
        padding: 12px;
    }

    .product-card__title {
        font-size: 15px;
    }

    .product-card__price {
        font-size: 17px;
    }

    .product-card__description {
        font-size: 13px;
    }

    .product-card__badge {
        top: 8px;
        font-size: 10px;
    }

    .product-card__badge--discount {
        left: 8px;
    }

    .product-card__badge--featured {
        right: 8px;
    }

    .product-card__button {
        padding: 10px 8px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}


/* Recherche de produits */

.search-form {
    max-width: 720px;
    margin-top: 24px;
}

.search-form > label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.search-form__controls {
    display: flex;
    gap: 10px;
}

.search-form__controls input {
    flex: 1;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.search-form__controls input:focus {
    outline: 2px solid #93c5fd;
    border-color: #1e40af;
}

.search-form__controls button {
    padding: 12px 20px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 480px) {
    .search-form__controls {
        flex-direction: column;
    }

    .search-form__controls button {
        width: 100%;
    }
}


/* Recherche dans le header SHOPTIME */

.header-search {
    display: flex;
    align-items: center;
    flex: 0 1 260px;
    min-width: 180px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
}

.header-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    outline: none;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 13px;
}

.header-search button {
    flex-shrink: 0;
    padding: 8px 12px;
    border: 0;
    background: linear-gradient(135deg, #1e40af, #059669);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.header-search:focus-within {
    border-color: #1e40af;
    box-shadow: 0 0 0 2px rgb(30 64 175 / 10%);
}

@media (max-width: 900px) {
    .product-header-inner {
        flex-wrap: wrap;
    }

    .header-search {
        order: 4;
        flex: 1 1 100%;
        min-width: 0;
    }
}
