/* Store Categories Section */
.store-categories {
    padding: 3rem 3.5rem;
    background-color: #ffffff;
}

.store-categories .container {
    max-width: 1400px;
    margin: 0 auto;
}

.categories-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 30px;
    padding-right: 3.5rem;
}

/* Scroll Wrapper */
.categories-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Scroll Buttons */
.scroll-btn {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.scroll-btn:hover {
    background-color: #FDB913;
    border-color: #FDB913;
    transform: scale(1.1);
}

.scroll-btn:hover svg {
    stroke: #ffffff;
}

.scroll-btn svg {
    stroke: #000;
    transition: stroke 0.3s ease;
}

.scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Categories Container */
.categories-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: 10px 0;
    flex: 1;
}

.categories-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Category Card */
.category-card {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
/* Selected Category Highlight */
/* Modern Selected Category Style - Enhanced */
.category-card.selected {
    transform: translateY(-12px) scale(1.08);
    z-index: 50;
    position: relative;
    /* Clean modern shadow with depth */
    /* box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(255, 255, 255, 0.15); */
    /* Smooth transition with bounce */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modern glass effect with border gradient */
.category-card.selected::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid;
    border-image: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8),
            rgba(255, 255, 255, 0.3)) 1;
    pointer-events: none;
    z-index: 1;
}

/* Modern gradient aura with multiple layers */
.category-card.selected::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: conic-gradient(from 0deg at 50% 50%,
            #ead666,
            #ff3c0b,
            #01b929,
            #e5ff00);
    border-radius: 18px;
    filter: blur(16px);
    opacity: 0.7;
    pointer-events: none;
    z-index: -1;
    animation: gradientRotate 8s linear infinite;
}

/* Secondary outer glow for depth */
/* .category-card.selected .glow-overlay {
    position: absolute;
    inset: -6px;
    background: radial-gradient(circle at 50% 0%,
            rgba(102, 126, 234, 0.4),
            transparent 70%);
    border-radius: 22px;
    filter: blur(8px);
    pointer-events: none;
    z-index: -2;
    opacity: 0.6;
} */

/* Enhanced icon with floating effect */
.category-card.selected .category-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.2) translateY(-4px);
    box-shadow:
        0 8px 32px rgba(102, 126, 234, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
    position: relative;
}

/* Enhanced text with gradient */
.category-card.selected .category-name {
    font-weight: 500;
    font-size: 1.1em;
}

/* Subtle floating animation */
.category-card.selected {
    animation: gentleFloat 3s ease-in-out infinite;
}

/* Keyframe animations */
@keyframes gradientRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(-12px) scale(1.08);
    }

    50% {
        transform: translateY(-15px) scale(1.08);
    }
}

/* Particle effect dots for extra modernity */
    /* .category-card.selected::particle {
        content: '';
        position: absolute;
        width: 4px;
        height: 4px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 50%;
        pointer-events: none;
        animation: particleFloat 4s linear infinite;
    } */

/* Ensure hover maintains effect but adds subtle interaction */
.category-card.selected:hover {
    transform: translateY(-15px) scale(1.1);
    /* box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 15px 30px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(255, 255, 255, 0.2); */
}


@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-30px) translateX(10px);
        opacity: 0;
    }
}

/* subtle shine effect */
.category-card.selected .shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: rotate(30deg);
    pointer-events: none;
    z-index: 1;
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {

    0%,
    100% {
        left: -100%;
    }

    50% {
        left: 100%;
    }
}

/* Category Icon */
.category-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    /* backdrop-filter: blur(10px); */
}

.category-icon img {
    width: 50px;
    height: auto;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
}

/* Category Name */
.category-name {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .category-card {
        width: 160px;
        height: 110px;
    }

    .categories-container {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .store-categories {
        padding: 40px 15px 30px;
    }

    .categories-title {
        font-size: 1.75rem;
        margin-bottom: 25px;
    }

    .categories-scroll-wrapper {
        gap: 10px;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
    }

    .scroll-btn svg {
        width: 20px;
        height: 20px;
    }

    /* On mobile, show 2.5 cards at a time */
    .category-card {
        width: calc((100vw - 120px) / 2.5);
        min-width: 140px;
        height: 100px;
        padding: 15px;
        gap: 10px;
    }

    .category-icon {
        width: 45px;
        height: 45px;
    }

    .category-icon img {
        width: 28px;
        height: 28px;
    }

    .category-name {
        font-size: 0.85rem;
    }

    .categories-container {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .category-card {
        width: calc((100vw - 100px) / 2);
        min-width: 130px;
        height: 95px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
    }

    .category-icon img {
        width: 26px;
        height: 26px;
    }

    .category-name {
        font-size: 0.8rem;
    }
}

/* Responsive Enhancements, I know I have caused a lot of code duplication buh it is fine---Herbert  */

/* Enhanced selected name - base (applies everywhere) */
.category-card.selected .category-name {
    font-size: 1.15rem;
    /* Larger on selected */
    font-weight: 700;
    /* Bolder */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Mobile & Tablet specific selected enhancements */
@media (max-width: 1024px) {

    /* Stronger lift and scale on touch devices */
    .category-card.selected {
        transform: translateY(-16px) scale(1.12);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
        animation: gentleFloatMobile 4s ease-in-out infinite;
    }

    /* Even larger and more prominent name on mobile/tablet */
    .category-card.selected .category-name {
        font-size: 1.05rem;
        /* Bigger than normal cards, very readable */
        font-weight: 800;
        color: #ffffff;
        letter-spacing: 0.5px;
    }

    /* Slightly larger icon for better visibility */
    .category-card.selected .category-icon {
        transform: scale(1.3) translateY(-6px);
    }

    /* Disable ALL hover effects on touch devices (no disappearing overlay, no extra lift) */
    .category-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        /* Revert to normal shadow */
    }

    .category-card:hover::before {
        opacity: 0;
        /* Prevent the white overlay that makes text harder to read */
    }

    .category-card.selected:hover {
        transform: translateY(-16px) scale(1.12);
        /* Keep selected transform, no extra on hover */
    }

    /* Softer floating animation for mobile */
    @keyframes gentleFloatMobile {

        0%,
        100% {
            transform: translateY(-16px) scale(1.12);
        }

        50% {
            transform: translateY(-20px) scale(1.12);
        }
    }
}

/* Extra fine-tuning for smaller phones */
@media (max-width: 768px) {
    .category-card.selected .category-name {
        font-size: 0.98rem;
        /* Still prominent but fits smaller cards */
    }
}

@media (max-width: 480px) {
    .category-card.selected .category-name {
        font-size: 0.92rem;
    }
}