/* =====================================================================
   Category Tiles  (shortcode: [categorytiles])
   A row of colourful rounded tiles, each with a category image + label.
   Scoped under .ct-root — safe to load site-wide & cached.
   Per-instance desktop column count via --ct-cols (set inline).
   ===================================================================== */

.ct-root {
    --ct-cols: 7;
    padding: 40px 0;
    background: #fff;
}

.ct-container {
    max-width: 1295px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ── Optional heading ── */
.ct-heading {
    text-align: center;
    margin-bottom: 36px;
}

.ct-title {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.5px;
}

.ct-title-line {
    display: block;
    width: 60px;
    height: 3px;
    background: #c5a253;
    border-radius: 2px;
    margin: 12px auto 0;
}

/* ── Grid ── */
.ct-grid {
    display: grid;
    /* Cap each tile (max 260px) and centre the row so a few categories don't
       blow up to full-width; shrinks below 260 when many columns are present. */
    grid-template-columns: repeat(var(--ct-cols), minmax(0, 260px));
    justify-content: center;
    gap: 26px;
}

.ct-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

/* Coloured rounded square holding the product image */
.ct-tile {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ct-tile img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.ct-item:hover .ct-tile {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.ct-item:hover .ct-tile img {
    transform: scale(1.06);
}

/* Label under the tile */
.ct-label {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #2a2218;
    letter-spacing: .2px;
    text-align: center;
    line-height: 1.3;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
    .ct-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 991px) {
    .ct-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .ct-root { padding: 30px 0; }
    .ct-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
    .ct-tile {
        border-radius: 18px;
        padding: 14px;
    }
    .ct-label { font-size: 14px; }
}

@media (max-width: 480px) {
    .ct-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
