/*
 * Single Product Page Styles
 * ----------------------------------------------------------------------------
 */

/* Main Image & Gallery Styling */
.product-gallery .product-image-wrap {
    cursor: crosshair;
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}

/* Drift Zoom Pane Container & Styling */
#zoom-pane-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows hover events to pass through to the image */
    z-index: 99; /* Below the zoom pane itself */
}

.drift-zoom-pane.drift-open {
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    z-index: 101; /* Ensures the pane is on top of all other content */
}

/* --- Related Products Section --- */
.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px; /* Increased gap for better spacing */
}

.related-products .product-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; /* Ensures all cards are the same height */
}

.related-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.related-products .product-card .product-image {
    background-color: #f8f9fa;
    padding: 10px;
}

.related-products .product-card .product-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.related-products .product-card .product-info {
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows vertical alignment */
}

.related-products .product-card .product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    flex-grow: 1; /* Pushes price to the bottom */
}

.related-products .product-card .product-title a {
    color: #343a40;
    text-decoration: none;
}

.related-products .product-card .product-title a:hover {
    color: #007bff;
}

.related-products .product-card .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #d9534f;
    margin-top: auto; /* Aligns price to the bottom */
}


/* --- General Page Layout --- */

/* Main Layout & Container */
.sh_page {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9e9e9;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.sp_left_product,
.sp_right_product {
    padding: 15px;
}

/* Right Column - Product Details */
.sp_product_detail {
    padding-left: 1rem;
}

h1.h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.product-tags {
    margin-bottom: 1rem;
}

.product-tags .tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
}

.sp_price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d9534f;
    margin-bottom: 1.5rem;
}

/* Quick Info Section */
.product-quick-info {
    background-color: #f9f9f9;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.info-item i {
    color: #007bff;
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Product Description */
.product-description .card {
    border: none;
}

.product-description .card-header {
    padding: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.product-description .card-body {
    padding: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

/* Action Buttons */
.contact-actions .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.action-buttons .btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Related Products & Inquiry Form */
.related-products,
.product-inquiry {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.related-products .section-title,
.product-inquiry h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 991px) {
    .sp_product_detail {
        padding-left: 0;
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .sh_page {
        padding: 1rem;
    }

    h1.h2 {
        font-size: 1.6rem;
    }

    .sp_price {
        font-size: 1.5rem;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}
