.product-container {
    display: flex;
    flex-wrap: wrap; /* makes layout stack on small screens */
    gap: 30px;
    margin: 40px auto;
    max-width: 1000px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* IMAGE SECTION */
.product-image {
    flex: 1 1 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.product-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 12px;
    object-fit: cover;
}

/* DETAILS SECTION */
.product-details {
    flex: 1 1 400px;
}
.product-details h2 {
    font-size: 28px;
    margin-bottom: 10px;
}
.price-box {
    margin: 15px 0;
}
.original-price {
    text-decoration: line-through;
    color: #888;
    margin-right: 10px;
}
.discount-price {
    color: #e63946;
    font-size: 24px;
    font-weight: bold;
}

/* BUTTONS */
.action-buttons a {
    display: inline-block;
    padding: 10px 18px;
    margin: 10px 5px 0 0;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
}
.add-cart {
    background: #007bff;
    color: white;
}
.add-cart:hover {
    background: #0056b3;
}
.add-wishlist {
    background: #f1c40f;
    color: black;
}
.add-wishlist:hover {
    background: #d4ac0d;
}

/* REVIEWS */
.review-box {
    margin-top: 40px;
}
.review-box h3 {
    margin-bottom: 15px;
}
.review-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* ===========================
   🔹 RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }
    .product-image img {
        max-width: 100%;
    }
    .product-details h2 {
        font-size: 24px;
    }
    .discount-price {
        font-size: 22px;
    }
    .action-buttons a {
        width: 100%;
        margin: 8px 0;
    }
    .review-box form textarea {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-details h2 {
        font-size: 20px;
    }
    .discount-price {
        font-size: 20px;
    }
    .action-buttons a {
        font-size: 14px;
        padding: 8px 12px;
    }
}

.product-image-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 12px;
}

.thumbnail-row {
    display: flex;
    gap: 8px;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    border: 2px solid transparent;
}

.thumb-img:hover {
    border: 2px solid gold;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;   /* keeps correct hover logic */
    justify-content: flex-end;     /* ✅ forces left alignment */
    font-size: 30px;
}


.star-rating input {
    display: none;
}

.star-rating label {
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating input:checked ~ label {
    color: gold;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: gold;
}

.product-image-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.main-image {
    width: 100%;
    height: 360px;
    object-fit: contain;
    border-radius: 12px;
    background: #f7f7f7;
}

/* ✅ ARROWS */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    z-index: 10;
}

.left-arrow { left: 8px; }
.right-arrow { right: 8px; }

.nav-arrow:hover {
    background: black;
}

/* ✅ THUMBNAILS */
.thumbnail-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: 0.2s;
}

.thumb-img.active {
    border-color: gold;
}

/* ✅ MOBILE SWIPE FRIENDLY */
@media (max-width: 768px) {
    .main-image {
        height: 280px;
    }
}

.random-products-section {
    margin-top: 50px;
    padding: 20px;
    border-top: 2px solid #eee;
}

.random-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.random-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.random-product-card {
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    transition: 0.2s;
    background: white;
}

.random-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.random-product-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
}

.random-product-card h4 {
    font-size: 15px;
    margin: 8px 0 4px;
}

.random-price {
    font-weight: bold;
    color: #b8860b;
}

.share-btn {
    width: 180px;
    background: #007bff;
    color: white;
    padding: 11px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-size: 16px;
    margin-top: 10px;
    transition: 0.3s;
}

.share-btn:hover {
    background: #0056b3;
}

@media (max-width: 768px) {
.share-btn {
    width: 100%;
    padding: 9px 16px;
}
}