/* Bento Grid Categories - Modern Asymmetric Layout */

:root {
    --bento-primary: var(--primary, #6366f1);
    --bento-text: #ffffff;
    --bento-radius: 1.5rem;
    --bento-gap: 1.25rem;
}

/* Section */
.bento-categories {
    font-family: var(--shop-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    padding: 5rem 0;
    background: transparent;
}

.bento-categories__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.bento-categories__header {
    margin-bottom: 3rem;
}

.bento-categories__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--bento-primary);
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: color-mix(in srgb, var(--bento-primary) 10%, transparent);
    border-radius: 2rem;
}

.bento-categories__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -0.03em;
}

/* Bento Grid */
.bento-categories__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: var(--bento-gap);
}

/* Card Base */
.bento-categories__card {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: var(--bento-radius);
    overflow: hidden;
    cursor: pointer;
}

.bento-categories__card:focus-visible {
    outline: 3px solid var(--bento-primary);
    outline-offset: 4px;
}

/* Card Sizes */
.bento-categories__card--large {
    grid-column: span 7;
}

.bento-categories__card--medium {
    grid-column: span 5;
}

/* Background Image */
.bento-categories__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.bento-categories__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-categories__card:hover .bento-categories__image {
    transform: scale(1.08);
}

/* Overlay Gradient */
.bento-categories__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 30%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
    transition: background 0.4s ease;
}

.bento-categories__card:hover .bento-categories__overlay {
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 20%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* Content */
.bento-categories__content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

/* Number Badge */
.bento-categories__number {
    align-self: flex-end;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bento-text);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.bento-categories__card:hover .bento-categories__number {
    background: var(--bento-primary);
    border-color: var(--bento-primary);
}

/* Info Section */
.bento-categories__info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bento-categories__name {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--bento-text);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-categories__card:hover .bento-categories__name {
    transform: translateY(-4px);
}

/* CTA */
.bento-categories__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bento-text);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-categories__card:hover .bento-categories__cta {
    opacity: 1;
    transform: translateY(0);
}

.bento-categories__cta svg {
    transition: transform 0.3s ease;
}

.bento-categories__card:hover .bento-categories__cta svg {
    transform: translateX(4px);
}

/* Shine Effect */
.bento-categories__shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    z-index: 4;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.bento-categories__card:hover .bento-categories__shine {
    left: 150%;
}

/* Border glow on hover */
.bento-categories__card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: var(--bento-radius);
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.bento-categories__card:hover::before {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1200px) {
    .bento-categories__grid {
        grid-template-rows: repeat(2, 260px);
    }

    .bento-categories__card--large {
        grid-column: span 7;
    }

    .bento-categories__card--medium {
        grid-column: span 5;
    }
}

@media (max-width: 991px) {
    .bento-categories {
        padding: 4rem 0;
    }

    .bento-categories__container {
        padding: 0 1.5rem;
    }

    .bento-categories__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 240px);
    }

    .bento-categories__card--large,
    .bento-categories__card--medium {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .bento-categories {
        padding: 3rem 0;
    }

    .bento-categories__header {
        margin-bottom: 2rem;
    }

    .bento-categories__grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 200px);
        gap: 1rem;
    }

    .bento-categories__content {
        padding: 1.25rem;
    }

    .bento-categories__cta {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .bento-categories__container {
        padding: 0 1rem;
    }

    .bento-categories__grid {
        grid-template-rows: repeat(4, 180px);
    }

    .bento-categories__number {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .bento-categories__content {
        padding: 1rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .bento-categories__image,
    .bento-categories__overlay,
    .bento-categories__name,
    .bento-categories__cta,
    .bento-categories__number,
    .bento-categories__shine {
        transition: none;
    }

    .bento-categories__card:hover .bento-categories__image {
        transform: none;
    }

    .bento-categories__cta {
        opacity: 1;
        transform: translateY(0);
    }

    .bento-categories__card:hover .bento-categories__shine {
        left: -100%;
    }
}
