@keyframes fade {
    0%{opacity: 1;}
    100%{opacity: 0;}
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgb(206, 206, 206);
}
header{
    position: relative;
    background: linear-gradient(to top, #1e3c72, #0b61f5);
    padding: 20px;
    width: 100%;
    text-align: center;
    color: white;
    font-family: sans-serif;
}
/* Back to main page style */
.backTo{
    position: absolute;
    right: 5px;
    top: 100px;
    transform: translate(0%,-50%);
    padding: 10px;
    background: linear-gradient(135deg, #f8b500, #ff6600);
    text-decoration: none;
    color: white;
    border-radius: 30px;
}
/* container and images*/
.container {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 90%;
    max-width: 1400px;
    transition: all 0.3s ease;
    min-height: 500px;
}

.container div {
    height: 570px;
    transition: all 0.3s ease;
}
.clothes {
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease, box-shadow 0.3s ease;
    background: white;
    animation: fadeInUp 0.4s ease;
}

.favourite{
    position: absolute;
     transform: translate(-50%,-50%);
     left: 20px;
     top: 20px;
     z-index: 999;
     color: rgb(255, 0, 0);
     font-size: 40px;
     cursor: pointer;
     user-select: none;
     transition: all ease 0.5s;
}
.favourite:hover{
    font-size: 30px;
    transition: all ease 0.5s;
}

.clothes:hover {
    box-shadow: 0 20px 30px rgba(0,0,0,0.15);
}

.clothes img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.clothes::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 -50px 40px -20px rgba(0,0,0,0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clothes:hover::after {
    opacity: 1;
}

.hover-effect {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    z-index: 10;
    background: white;
    color: #333;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.clothes:hover span {
    opacity: 1;
}
/* price tag*/
.priceTag {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: linear-gradient(135deg, #f8b500, #ff6600);
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* no items styling */
.fail{
    color: white;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    display: inline-block;
    position: absolute;
    transform: translate(-50%,-50%);
    left: 50%;
    top: 50%;
    width: 90%;
    text-align: center;
    background: linear-gradient(to bottom, rgb(0, 85, 255), black);
    font-size: 30px;
    padding: 40px;
    border: 1px solid black;
    border-radius: 30px;
}
.fail a{
    color: rgba(255, 255, 255, 0.548);
}

/*Resonsive Design */
@media (max-width: 585px) {
    body{
        gap: 10px;
    }
    .container {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
    .container:has(div:hover) div:not(:hover) {
        scale: 1;
    }
    .backTo{
        position: static;
        transform: translate(0,0);
    }
    .clothes{
        margin-top: -30px;
    }

}
@media (min-width: 586px) and (max-width: 974px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
    .container:has(div:hover) div:not(:hover) {
        scale: 1;
    }
}
@media (min-width: 1772px) {
    .container div {
        height: 550px;
    }
}