/* ============================================================
   CATEGORIES INDEX PAGE  (ci-*)
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.ci-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 56px 0 44px;
    text-align: center;
}

.ci-hero-content { max-width: 520px; margin: 0 auto; }

.ci-hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #0f766e;
    margin: 0 0 8px;
}

.ci-hero-title {
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.ci-hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

@media (max-width: 575px) {
    .ci-hero-title { font-size: 28px; }
    .ci-hero       { padding: 36px 0 28px; }
}

/* ── Section ───────────────────────────────────────────────── */
.ci-section {
    padding: 48px 0 64px;
}

/* ── Grid ──────────────────────────────────────────────────── */
.ci-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1199px) { .ci-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 991px)  { .ci-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .ci-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 479px)  { .ci-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ── Category card ─────────────────────────────────────────── */
.ci-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.ci-card:hover {
    box-shadow: 0 10px 28px rgba(15,23,42,0.12);
    transform: translateY(-4px);
    text-decoration: none;
}

/* Image area */
.ci-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ci-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.ci-card:hover .ci-card-image img { transform: scale(1.06); }

.ci-card-letter {
    font-size: 48px;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

@media (max-width: 575px) { .ci-card-letter { font-size: 32px; } }

/* ── Card visual wrapper (collage or fallback tile) ────────── */
.ci-card-visual {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f5f9;
}

.ci-card-visual .ci-card-image {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

/* ── Hot-product collage ───────────────────────────────────── */
.ci-collage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    background: #e2e8f0;
    transition: transform 0.35s ease;
}

.ci-card:hover .ci-collage { transform: scale(1.05); }

.ci-collage-cell {
    overflow: hidden;
    background: #f1f5f9;
}

.ci-collage-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 5 images: big tile left, 4 small tiles 2x2 right */
.ci-collage-5 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr;
}
.ci-collage-5 .ci-collage-cell:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* Degraded layouts for 1-3 images */
.ci-collage-1 .ci-collage-cell { grid-column: span 2; grid-row: span 2; }
.ci-collage-2 .ci-collage-cell { grid-row: span 2; }
.ci-collage-3 .ci-collage-cell:first-child { grid-row: span 2; }

/* ── Round category icon badge ─────────────────────────────── */
.ci-card-icon {
    position: absolute;
    left: 8px;
    bottom: 8px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15,23,42,0.25);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.ci-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ci-card-icon-letter {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

@media (max-width: 575px) {
    .ci-card-icon { width: 32px; height: 32px; left: 6px; bottom: 6px; }
    .ci-card-icon-letter { font-size: 13px; }
}

/* Product count badge */
.ci-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15,23,42,0.7);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
}

/* Info */
.ci-card-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ci-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.ci-card-sub {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Empty state ───────────────────────────────────────────── */
.ci-empty {
    text-align: center;
    padding: 72px 24px;
    color: #94a3b8;
}

.ci-empty-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    color: #cbd5e1;
}

.ci-empty h3 { font-size: 20px; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.ci-empty p  { font-size: 14px; margin: 0 0 24px; }

.ci-home-btn {
    display: inline-flex;
    padding: 11px 28px;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s;
}

.ci-home-btn:hover { background: #0f766e; color: #fff; text-decoration: none; }
