/* ========== MAIN VIEW CONTAINER ========== */
.view-container {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 65%;
    margin: 80px auto 0 auto;
    padding: 20px;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* ========== MAIN PRODUCT IMAGE ========== */
.main-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 300px;
    overflow: hidden;

    background: transparent;
}

.main-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    border-radius: 5px;
    opacity: 0;

    animation: fadeIn 0.5s ease-in-out 0.1s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== THUMBNAIL IMAGES ========== */
.thumbnails {
    display: flex;
    gap: 10px;

    margin-top: 15px;
    padding-bottom: 10px;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
}

.thumbnails::-webkit-scrollbar {
    height: 8px;
}
.thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}
.thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}
.thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.thumbnails img {
    flex: 0 0 auto;
    height: 100px;

    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;

    transition: border-color 0.3s ease;
}

.thumbnails img:hover {
    border-color: #007bff;
}

/* ========== PRODUCT DETAILS ========== */
.details {
    position: relative;

    width: 100%;
    margin-top: 0;
    
}

.label {
    font-size: 14px;
    font-weight: bold;
    color: red;
    background-color: white;
    text-align: center;
}

.name,
.price,
.stock {
    font-size: 14px;
    color: black;
    text-align: center;
}

.name {
    padding-top: 5px;
}

.price {
    padding: 5px 0 5px;
    
}

.stock {
    display: none;
    padding-top: 5px;
}

/* ========== GROUP VARIANTS ========== */
.group-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;

    width: 60%;
    margin: 5px auto 0 auto;
    text-align: center;
}

/* ========== ADD TO CART ========== */
.addtocartdiv {
    display: flex;
    justify-content: center;
    gap: 5px;

    width: 20%;
    margin: 5px auto 0 auto;
}

@media (max-width: 768px) {
    .addtocartdiv {
        width: 50%;
    }
}

/* ========== NAVIGATION BUTTONS ========== */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;

    width: 100%;
    margin: 5px auto 0 auto;
}

/* ========== PRODUCT INFO ========== */
.product-info {
    width: 100%;
    margin-top: 20px;
    height: auto;
    
}



/* ========== RELATED PRODUCTS SECTION ========== */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
}

.products-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

#topspace {
    margin-top: 75px;
}

/* ========== CARD SHARED STYLES ========== */
.category,
.product,
.banner {
    position: relative;
    display: flex;
    flex-direction: column;

    width: 200px;
    height: 330px;
    margin: 5px;
    padding: 15px;

    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product {
    justify-content: flex-end;
}

.category {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #bbb #f0f0f0;
}

.category::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.category::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}
.category::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}
.category::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}
.category::-webkit-scrollbar-corner {
    background: transparent;
}

.banner {
    justify-content: center;
    align-items: center;
}

.category:hover,
.product:hover,
.banner:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.product img {
    max-width: 100%;
    max-height: 230px;
}


.banner img {
    max-width: 100%;
    max-height: auto;
}
/* ========== PAGINATION ========== */
.pagination-wrapper {
    display: grid;
    align-items: center;
    justify-items: center;

    width: 100%;
    overflow-x: auto;
}

.pagination {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 10px;
}

.pagination a {
    flex-shrink: 0;
    padding: 6.5px 10px;

    font-size: 14px;
    color: black;
    text-decoration: none;

    border: 1px solid #ddd;
    border-radius: 5px;

    transition: background 0.3s;
}

.pagination a:hover {
    background: #f2f2f2;
}

.pagination a.active {
    color: white;
    background: var(--color-main);
    border: 1px solid var(--color-main);
}

/* ========== REVIEWS ========== */
.review-box{
    width:100%;
    margin-top:20px;
}

.review-list{
    list-style:none;
    margin:0;
    padding:0;
}

.review-list li{
    padding:10px 0;
    border-bottom:1px solid #ddd;
}

.review-meta{
    font-size:14px;
    margin-bottom:4px;
}

.review-date{
    color:#777;
    font-size:12px;
    margin-left:6px;
}

.review-text{
    font-size:14px;
    line-height:1.5;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .view-container {
        width: 87%;
        margin-top: 149px;
        padding: 10px;
    }

    .container {
        padding-top: 15px;
    }

    .products-container {
        gap: 0;
        padding: 0;
    }

    .product,
    .banner {
        width: 40%;
        height: auto;
        margin: 1.5%;
        padding: 10px;
    }

    .category {
        width: 85%;
        height: auto;
        margin: 1%;
        max-height: 300px;
    }

    .category:hover,
    .product:hover,
    .banner:hover {
        transform: scale(1.0);
    }

    iframe {
        width: 100%;
    }

    #topspace {
        margin-top: 145px;
    }
}
