/* GRID LAYOUT */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* LEFT: Images */
.product-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
}

.product-images .main-image {
    width: 100%;
    max-width: 500px;

    /* Use aspect ratio instead of fixed height */
    aspect-ratio: 4 / 3;  /* Adjust ratio as needed */

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-images .main-image:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
    transform: scale(1.1) rotateY(5deg);
}

/* Make image fully visible inside container */
.product-images .main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ensures entire image is visible */
    display: block;
}

/* Thumbnails */
.thumbnail-list {
    width: 100%;
    max-width: 500px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.thumbnail-list::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.thumbnail-list img {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #eee;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail-list img:hover {
    transform: scale(1.1) rotateY(5deg);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* RIGHT: Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    justify-content: start;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-info:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.product-info h1 {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-price {
    font-size: 22px;
    color: #111;
    font-weight: bold;
    margin-bottom: 15px;
}

/* FORM STYLES */
.product-options label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-options select,
.product-options input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.add-to-cart {
    background: #e60000;
    color: #fff;
    font-size: 18px;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.add-to-cart:hover {
    background: #cc0000;
    text-decoration: none;
    color: #f7d794;
}

/* DESCRIPTION */
.product-description {
    display: grid;
    grid-template-columns: 1fr;
    grid-column: 1 / -1;
    margin-top: 40px;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    line-height: 1.6;
    perspective: 800px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-description:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.product-description h2,
.product-description h3 {
    margin-top: 20px;
    font-size: 20px;
}

.product-description h2:hover,
.product-description h3:hover {
    color: #ff7f50;
}

.note {
    background: #fff3d1;
    border-left: 4px solid #f7d794;
    padding: 10px;
    margin-top: 10px;
    font-style: italic;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .product-page {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 10px;
    }

    .product-images .main-image,
    .thumbnail-list {
        max-width: 100%;
    }

    .thumbnail-list {
        justify-content: flex-start;
    }

    .product-info {
        padding: 15px;
    }

    .product-info h1 {
        font-size: 22px;
    }

    .product-price {
        font-size: 20px;
    }

    .add-to-cart {
        font-size: 16px;
        padding: 10px 15px;
    }

    .product-description {
        padding: 15px;
    }

    .product-description h2,
    .product-description h3 {
        font-size: 18px;
    }

    /* Make thumbnails scrollable horizontally on mobile */
    .thumbnail-list {
        gap: 8px;
        overflow-x: auto;
    }
}
