/* Product Section */
.product-section{
    padding: 40px 20px;
}
.product-section:nth-child(odd){
    background-color: #f9f9f9;
}
.product-section:nth-child(even){
    background-color: #ffffff;
}

.product-section h2{
    position: relative;
    font-size: 30px;
    line-height: 45px;
    margin-bottom: 30px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgb(107, 27, 64);
}
.product-section h2::after{
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: #6b1b40;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Product Cards */
.product-cards{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Product Card */
.product-card{
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
    max-width: 250px;
    font-style: italic;
    opacity: 0.7;
}
.product-card:hover{
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.product-card img{
    width: 80%;
    height: auto;
    margin-bottom: 8px;
    border-radius: 8px;
}

.product-card h4{
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-align: center;
}

.product-card p{
    font-size: 13px;
    font-weight: bold;
    color: #4d4d4d;
    margin-bottom: 8px;
}

/* Product Card Button */
.product-card button{
    font-size: 14px;
    font-weight: 700;
    color: #6b1b40;
    background: transparent;
    transition: color 0.4s ease, transform 0.3s ease;
    padding: 6px 10px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}
.product-card button::after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 5px;
    background-color: #6b1b40;
    transition: width 0.3s ease;
}
.product-card button:hover::after{
    width: 100%;
}
.product-card button:hover{
    transform: scale(1.05);
}

/* Haircare Dyson Image */
#haircare .product-card img[alt="Hair Dryer"]{
    max-width: 200px;
    max-height: 200px; 
    object-fit: contain;
    width: 100%;
    height: auto;
}

/* Popup container */
.popup{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    min-height: 500px;
    max-height: 85vh;
    background-color: #fdfdfd;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 25px;
    display: none;
    z-index: 1100;
    transition: all 0.3s ease-in-out;
}

/* Popup header */
.popup-header{
    display: flex;
    box-sizing: border-box;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 10;
    border-radius: 10px 10px 0 0;
    box-shadow: 0px 4px 10px rgba(107, 27, 64, 0.3);
}
.popup-header .close{
    color: #a3a3a3; 
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: auto;
    margin-right: 10px;
}
.popup-header .close:hover{
    color: #6b1b40;
}

/* Popup Content */
.popup-content{
    display: flex;
    flex-wrap: nowrap;
    margin-top: 15px;
    padding: 20px 0;
    gap: 20px;
    max-height: 70vh;
    overflow: hidden;
}

/* Left Side */
.popup-left{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 40%;
    justify-content: center;
    margin-top: 25px;
}

/* Popup Image */
.popup-image-container img{
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    object-fit: cover;
}

/* Popup Quantity */
#popup-quantity{
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}
#popup-quantity label{
    font-weight: 600;
    color: #6b1b40;
}
#product-quantity{
    width: 60px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

/* Add to Cart - Popup */
.add-to-cart{
    display: inline-block;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    background-color: #6b1b40;
    color: #f5c300;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease, background-color 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
    max-width: 180px;
    height: 40px;
}
.add-to-cart:hover{
    background-color: #f5c300;
    color: #6b1b40;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.add-to-cart i{
    margin-right: 8px;
    font-size: 14px;
}

/* Right Side */
.popup-right{
    flex: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 10px;
}
.popup-right::-webkit-scrollbar{
    width: 8px;
}
.popup-right::-webkit-scrollbar-thumb{
    background: #6b1b40;
    border-radius: 4px;
}
.popup-right::-webkit-scrollbar-track{
    background: #f1f1f1;
}

/* Product details */
#popup-title{
    font-size: 24px; 
    font-weight: bold;
    color: #6b1b40;
    margin-bottom: 8px;
    margin-top: 7px;
}
#popup-price{
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 11px;
}
#popup-description,
#popup-ingredients,
#popup-usage{
    font-size: 16px;
    color: #333333;
    line-height: 1.6;
    margin-bottom: 15px;
}
#popup-ingredients,
#popup-usage{
    font-style: italic;
}
.hidden{
    display: none;
}
.toggle-section{
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 10px;
}
.arrow{
    transition: transform 0.3s ease;
}
.rotated{
    transform: rotate(90deg);
}

/* Overlay effect */
.overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

/* Media Query */
@media (max-width: 768px){
    .product-section{
        padding: 30px 15px;
    }
    .product-section h2{
        font-size: 24px;
        line-height: 36px;
        margin-bottom: 20px;
    }
    .product-cards{
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .product-card{
        max-width: 220px;
        padding: 10px;
    }
    .product-card img{
        width: 90%;
        margin-bottom: 5px;
    }
    .product-card button{
        font-size: 12px;
        padding: 5px 8px;
    }
    .popup{
        width: 80%;
        min-height: auto;
        max-height: 80vh;
        padding: 15px;
    }
    .popup-header{
        height: 40px;
        padding: 0 10px;
    }
    .popup-header .close-btn{
        font-size: 20px;
    }
    .popup-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    .popup-left{
        flex: 1;
        max-width: 45%;
        text-align: center;
    }
    .popup-image-container img{
        max-height: 180px;
        width: 100%;
        object-fit: cover;
        border-radius: 8px;
    }
    .popup-right{
        flex: 1;
        max-width: 55%;
        font-size: 14px;
        overflow-y: auto;
        max-height: 70vh;
    }
    .add-to-cart {
        font-size: 12px;
        padding: 6px 12px;
        max-width: 100%;
    }
    .popup-footer{
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px){
    .product-section{
        padding: 20px 10px;
    }
    .product-section h2{
        font-size: 20px;
        line-height: 30px;
        margin-bottom: 15px;
    }
    .product-cards{
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .product-card{
        max-width: 200px;
        padding: 8px;
    }
    .product-card img{
        width: 85%;
        margin-bottom: 5px;
    }
    .product-card button{
        font-size: 12px;
        padding: 5px 8px;
    }
}