.categories-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-top: 50px;
}

.category-section {
    width: 100%;
    border-radius: 10px;
}

.products-row {
    position: relative;
    width: 100%;
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none; 
    scrollbar-width: none;
    scroll-behavior: smooth; 
    padding: 10px 0; 
}

.products-row::-webkit-scrollbar {
    display: none;
}

/* ------------------------------------- */

.product-card {
    min-width: 400px;
    max-width: 400px;
    height: 450px;
    padding: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.5s ease;
}

@media (min-width: 1200px) {
    .products-row:has(.product-card:nth-child(1):nth-last-child(-n+3)) .product-card,
    .products-row:has(.product-card:nth-child(2):nth-last-child(-n+2)) .product-card,
    .products-row:has(.product-card:nth-child(3):nth-last-child(-n+1)) .product-card {
        min-width: calc(33.33% - 15px);
        max-width: calc(33.33% - 15px);
        flex: 1 0 calc(33.33% - 15px);
    }
    .seminar-card{
        min-width: calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
        flex: 1 0 calc(50% - 15px) !important;
    }
}

@media (min-width: 1200px) {
    .products-row.three-cards-only .product-card {
        min-width: calc(33.33% - 15px);
        max-width: calc(33.33% - 15px);
        flex: 1 0 calc(33.33% - 15px);
    }

    .seminar-card{
        min-width: calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
        flex: 1 0 calc(50% - 15px) !important;
    }

}

.product-image {
    width: 100%;
    height: 370px;
    overflow: hidden;
    background: #fff;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-logo {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-details {
    flex-grow: 1;
    height: 80px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable-container {
    user-select: none;
}

.clickable-container:hover {
    filter: brightness(0.9);
}

.clickable-container:active {
    filter: brightness(0.8);
}

.order-text {
    padding-left: 30px;
    font-weight: bold;
    font-size: 1.1rem;
}

.price-container {
    width: fit-content;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column-reverse;
    gap: 10px;
    position: relative;
    padding-right: 30px;
}

.price {
    font-size: 1.2em;
    font-weight: bold;
    color: black;
}

.original-price > h2 {
    font-size: 1em;
    color: #888;
    position: relative;
    display: inline-block;
}

.original-price > h2::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    width: calc(100% + 4px);
    height: 2px;
    background-color: #888;
    transform: rotate(-10deg);
    transform-origin: center;
}

.discounted-price {
    font-size: 1.2em;
    font-weight: bold;
    color: black;
}

.discounted-price-container{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.discount-badge {
    background-color: rgba(255, 0, 0, 0.534);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}


/* --------------------------------------- */

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    color: black;
    font-size: 24px;
        border: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-arrow.disabled {
    cursor: not-allowed;
}

/* ---------------------------------------- */


.featured-card{
    border: none !important;
    position: relative;
    transition: transform 0.5s ease;
}

.featured-card:hover{
    cursor: pointer;
    filter: brightness(0.9);
}

.featured-card:active{
    filter: brightness(0.8);
}

.featured-card.carousel-item {
    transition: transform 0.5s ease;
}

.featured-image{
    height: 100% !important;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 80px !important; 
    border: 1px lightgray solid;
    border-radius: 8px;
    background-color: white !important;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%) !important;
    animation: gradientShift 8s ease-in-out infinite;
}

.featured-image::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.1) 0%, transparent 70%);
    top: -50px;
    left: -50px;
    animation: pulse 4s ease-in-out infinite;
}

.featured-image::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.08) 0%, transparent 70%);
    bottom: 60px;
    right: -30px;
    animation: pulse 4s ease-in-out infinite reverse;
}

.partnership-details{
    width: 100%;
    height: 80px;
    background-color: white;
    position: absolute !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000;
    bottom: 0;
    padding: 0 30px;
    box-shadow: inset 0 2px 4px -1px rgba(0, 0, 0, 0.15);
}

.partnership-details > .partnership-red{
    background: linear-gradient( 90deg, red, rgb(255, 85, 85));
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
}

.category-logo-featured {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 65px;
    height: 65px;
    z-index: 100;
}
.category-logo-featured > img{
    object-fit: none;
}

.d-button-container{
    width: 100%;
    height: calc(100% - 80px);
    position: absolute;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.switch {
    display: block;
    width: 150px;
    height: 195px;
    border-radius: 5px;
    padding: 20px;
    perspective: 700px;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2), 0 0 1px 2px black, inset 0 2px 2px -2px white, inset 0 0 2px 15px #47434c, inset 0 0 2px 22px black;
}

.switch input {
    display: none;
}

.switch input:checked + .button {
    transform: translateZ(20px) rotateX(25deg);
    box-shadow: 0 -10px 20px #ff1818;
}

.switch input:checked + .button .light {
    animation: flicker 0.2s infinite 0.3s;
}

.switch input:checked + .button .shine {
    opacity: 1;
}

.switch input:checked + .button .shadow {
    opacity: 0;
}

.switch .button {
    display: block;
    transition: all 0.3s cubic-bezier(1, 0, 1, 1);
    transform-origin: center center -20px;
    transform: translateZ(20px) rotateX(-25deg);
    transform-style: preserve-3d;
    background-color: #9b0621;
    height: 100%;
    position: relative;
    cursor: pointer;
    background-repeat: no-repeat;
}

.switch .button::before {
    content: "";
    background: linear-gradient(rgba(255, 255, 255, 0.8) 10%, rgba(255, 255, 255, 0.3) 30%, #650000 75%, #320000) 50% 50%/97% 97%, #b10000;
    background-repeat: no-repeat;
    width: 100%;
    height: 50px;
    transform-origin: top;
    transform: rotateX(-90deg);
    position: absolute;
    top: 0;
}

.switch .button::after {
    content: "";
    background-image: linear-gradient(#650000, #320000);
    width: 100%;
    height: 50px;
    transform-origin: top;
    transform: translateY(50px) rotateX(-90deg);
    position: absolute;
    bottom: 0;
}

.switch .characters {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(90deg);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    background-repeat: no-repeat;
}

.switch .shine {
    transition: all 0.3s cubic-bezier(1, 0, 1, 1);
    opacity: 0.3;
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(white, transparent 3%) 50% 50%/97% 97%, linear-gradient(rgba(255, 255, 255, 0.5), transparent 50%, transparent 80%, rgba(255, 255, 255, 0.5)) 50% 50%/97% 97%;
    background-repeat: no-repeat;
}

.switch .shadow {
    transition: all 0.3s cubic-bezier(1, 0, 1, 1);
    opacity: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 70%, rgba(0, 0, 0, 0.8));
    background-repeat: no-repeat;
}

@keyframes flicker {
    0% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

@keyframes light-off {
    0% {
        opacity: 1;
    }

    80% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


.beans-background {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(139, 69, 19, 0.05) 0%, transparent 70%);
}

.bg-bean {
    width: 100px !important;
    height: 100px !important;
    position: absolute;
    animation: float 3s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
    filter: drop-shadow(0 0 5px rgba(139, 69, 19, 0.2));
    transform-origin: center;
}

.bg-bean:nth-child(1) {
    top: 15%;
    right: 10%;
    transform: rotate(15deg);
    animation: float1 4s ease-in-out infinite;
}

.bg-bean:nth-child(2) {
    top: 45%;
    left: 10%;
    transform: rotate(-25deg);
    animation: float2 5s ease-in-out infinite;
}

.bg-bean:nth-child(3) {
    top: 65%;
    right: 30%;
    transform: rotate(40deg);
    animation: float3 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(15deg); }
    50% { transform: translate(-10px, -15px) rotate(20deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(-25deg); }
    50% { transform: translate(15px, -20px) rotate(-20deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(40deg); }
    50% { transform: translate(-5px, -25px) rotate(45deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes gradientShift {
    0%, 100% {
        background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    }
    50% {
        background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    }
}



/* ----------------------------------------- */

.seminar-card{
    width: 50% !important;
    max-width: 50%;
    height: 300px;
}

.seminar-card > .product-image{
    height: 100% !important;
    width: 100% !important;
    object-fit: cover;
}

.seminar-card > .product-image > img{
    object-fit: cover;
}

.seminar-card > .product-image > .category-logo{
    display: none !important;
}

.seminar-card > .product-details{
    display: none !important;
}

.seminar-card .product-title-overlay {
    display: block;
    position: absolute;
    bottom: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    background: rgba(255, 255, 255, 0.829);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 4px;
}

/* -------------------------------- */

@media (max-width: 1024px) {
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .partnership-details{
        font-size: 18px;
    }
    .switch {
        width: 160px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .categories-container {
        gap: 0 !important;
    }
    
    .all-card-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 20px;
        justify-content: center;
        align-items: center;
    }
    
    .products-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 15px;
        gap: 25px;
        overflow: visible;
    }
    
    .product-card {
        width: 92% !important;
        min-width: 0 !important;
        max-width: 450px;
        min-height: 400px;
        margin: 0 auto;       
        transform: none !important;
    }
    
    .seminar-card {
        width: 92% !important;  
        max-width: 450px;    
        min-height: 200px;
    }
    .seminar-card > .product-image{
        height: 200px !important;
    }


    .carousel-arrow {
        display: none !important;
    }

    .carousel-item {
        transform: none !important;
        transition: none !important;
    }

    .product-image {
        height: 370px;
    }

    .featured-image{
        height: 400px !important;
    }

    .products-row:has(.product-card:nth-child(1):nth-last-child(-n+3)) .product-card,
    .products-row:has(.product-card:nth-child(2):nth-last-child(-n+2)) .product-card,
    .products-row:has(.product-card:nth-child(3):nth-last-child(-n+1)) .product-card,
    .products-row.three-cards-only .product-card {
        min-width: 92% !important;
        max-width: 450px !important;
        flex: 0 0 92%;
    }
}

@media (max-width: 480px) {
    .products-row {
        padding: 10px;
        gap: 10px;
    }

    .product-card {
        height: 350px;
    }

    .product-image {
        height: 370px;
    }
}
