/* Product Details Page Styles */
.product-details-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 15px;
    background: #ffffff;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 13px;
    color: #878787;
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: #878787;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #2874f0;
}

/* Main Layout */
.product-main-wrapper {
    display: flex;
    gap: 30px;
    background: #fff;
    padding-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
}

/* Left Column: Images */
.product-images-col {
    flex: 0 0 40%;
    max-width: 40%;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.image-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-frame {
    border: 1px solid #f0f0f0;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 450px;
    position: relative;
    overflow: hidden;
}

.main-image-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image-frame:hover img {
    transform: scale(1.2);
    /* Simple zoom effect */
    cursor: zoom-in;
}

.thumbnail-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumbnail-item {
    width: 64px;
    height: 64px;
    border: 1px solid #f0f0f0;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: #2874f0;
    opacity: 1;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Action Buttons (Desktop) */
.product-actions-desktop {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.action-btn {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    text-align: center;
    color: #fff;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    /* Remove fixed width if any, let flex handle it */
}

.btn-cart {
    background: #ff9f00;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .2);
}

.btn-buy {
    background: #fb641b;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .2);
}

/* Right Column: Details */
.product-info-col {
    flex: 1;
}

.product-title {
    font-size: 22px;
    font-weight: 500;
    color: #212121;
    margin-top: 0;
    margin-bottom: 10px;
}

.product-rating-box {
    display: inline-flex;
    align-items: center;
    background: #388e3c;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    gap: 3px;
    margin-right: 10px;
}

.product-reviews-count {
    color: #878787;
    font-weight: 500;
    font-size: 14px;
}

.product-price-box {
    margin: 15px 0;
}

.price-main {
    font-size: 28px;
    font-weight: 500;
    color: #212121;
}

.price-mrp {
    font-size: 16px;
    color: #878787;
    text-decoration: line-through;
    margin-left: 10px;
}

.price-discount {
    font-size: 16px;
    color: #388e3c;
    font-weight: 500;
    margin-left: 10px;
}

.stock-status {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.in-stock {
    color: #388e3c;
}

.out-stock {
    color: #d32f2f;
}

/* Info Table */
.info-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.info-table td {
    padding: 8px 0;
    font-size: 14px;
}

.label-col {
    color: #878787;
    width: 120px;
    vertical-align: top;
}

.value-col {
    color: #212121;
    font-weight: 500;
}

/* Sections (Desc, Specs etc) */
.details-section {
    border: 1px solid #f0f0f0;
    margin-top: 20px;
    border-radius: 2px;
}

.section-header {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    color: #212121;
    border-bottom: 1px solid #f0f0f0;
}

.section-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #212121;
}

/* Ensure inserted tables look good */
.section-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.section-content table td,
.section-content table th {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.section-content table tr:first-child td,
.section-content table tr:first-child th {
    /* Style headers if they exist */
    font-weight: 600;
    color: #333;
}

.section-content table td:first-child {
    color: #878787;
    width: 30%;
    font-weight: 500;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.spec-table th,
.spec-table td {
    padding: 10px;
    text-align: left;
}

.spec-table th {
    color: #878787;
    width: 30%;
    font-weight: 400;
}

/* Mobile Sticky Footer */
.mobile-sticky-actions {
    display: none;
    /* Desktop hidden */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    /* Above normal footer, below modal overlays */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-sticky-actions .btn-cart,
.mobile-sticky-actions .btn-buy {
    border-radius: 0;
    padding: 15px 0;
}


/* Responsiveness */
@media (max-width: 768px) {
    .product-main-wrapper {
        flex-direction: column;
        gap: 0;
        padding-bottom: 0;
    }

    .product-images-col {
        flex: 0 0 100%;
        max-width: 100%;
        position: static;
    }

    .main-image-frame {
        height: 350px;
        border: none;
    }

    .product-info-col {
        padding: 20px 15px;
    }

    .product-actions-desktop {
        display: none;
    }

    .mobile-sticky-actions {
        display: flex;
    }

    /* Make space for sticky footer */
    body {
        padding-bottom: 60px;
    }

    .mobile-bottom-nav {
        /* Hide global nav if present on this page, or ensure actions verify visibility */
        display: none !important;
    }
}

/* Related Card Hover Effect */
.related-card:hover {
    box-shadow: 0 3px 16px 0 rgba(0, 0, 0, 0.11);
}

/* Related card styling */
.related-products-grid::-webkit-scrollbar {
    height: 6px;
}

.related-products-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.related-products-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.related-products-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Quote Modal Styles */
.quote-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.modal-content .form-group {
    margin-bottom: 15px;
}

.modal-content label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-content .submit-btn {
    width: 100%;
    background-color: #2874f0;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-content .submit-btn:hover {
    background-color: #1a56cc;
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 60px;
    color: #388e3c;
    margin-bottom: 20px;
}

.success-screen h2 {
    color: #212121;
    font-size: 22px;
    margin-bottom: 10px;
}

.success-screen p {
    color: #666;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
    }
}

.related-product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #212121;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
    /* Approximate height for 2 lines */
    line-height: 1.4;
}