/* Product Page Layout */
.product_details_area {
    background: #f5f7fa;
}

.product_layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    gap: 28px;
    align-items: start;
}

.product-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    padding: 24px 24px 28px;
    min-width: 0;
    overflow: hidden;
}

.product_media_card {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}

.product_details_left {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

/* Product Gallery - Swiper */
.product-gallery-main {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    background: #fafafa;
    overflow: hidden;
}

.product-gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.product-gallery-main .swiper-slide img {
    max-height: 420px;
    width: 100%;
    object-fit: contain;
}

.product-gallery-thumbs {
    margin-top: 14px;
    overflow: hidden;
}

.product-gallery-thumbs .swiper-slide {
    padding: 6px;
    border: 2px solid #eee;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}

.product-gallery-thumbs .swiper-slide-thumb-active {
    border-color: #2c6ecb;
    opacity: 1;
}

.product-gallery-thumbs .swiper-slide:hover {
    opacity: 1;
}

.product-gallery-thumbs .swiper-slide img {
    height: 70px;
    width: 100%;
    object-fit: contain;
}

.product_info_card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: stretch;
}

.product-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.product-title {
    margin: 0;
}

.product-meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.meta-chip {
    background: #f0f4ff;
    color: #0d47a1;
    border: 1px solid #d9e4ff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stock-pill {
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.stock-pill.in-stock {
    background: #e6f7ec;
    color: #0f9d58;
    border: 1px solid #b7e5c8;
}

.stock-pill.out-of-stock {
    background: #fff1f0;
    color: #d93025;
    border: 1px solid #ffd4cf;
}

/* Product Details Right Section */
.product_details_right {
    padding-left: 0;
}

.cta-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-actions .btn-add-to-cart,
.product-actions .btn-alert {
    width: 100%;
}

.product-links {
    text-align: left;
}

.product-links a + a {
    margin-top: 6px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-meta-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.meta-item {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.meta-item strong {
    color: #333;
    margin-right: 5px;
}

.product-rating-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars i {
    color: #ffc107;
    font-size: 18px;
}

.rating-stars .far {
    color: #ddd;
}

.review-link {
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.review-link:hover {
    text-decoration: underline;
    color: #c0392b;
}

.product-description-details {
    margin-bottom: 20px;
}

.product-description-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

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

.product-details-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.product-details-list li:last-child {
    border-bottom: none;
}

.product-details-list li strong {
    color: #333;
    font-weight: 600;
    min-width: 150px;
}

.product-details-list li span {
    color: #666;
    flex: 1;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
}

.product-price .offer {
    color: #e74c3c;
    font-size: 20px;
    margin-right: 10px;
}

.product-price .original-price {
    color: #999;
    font-size: 16px;
    text-decoration: line-through;
}

.stock-status {
    margin-bottom: 20px;
}

.stock-status p {
    font-size: 16px;
    font-weight: 500;
}

.price-info {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.price-card {
    background: #fff7f0;
    border: 1px solid #ffe2cf;
    box-shadow: 0 8px 20px rgba(255, 138, 88, 0.12);
}

.price-text {
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.main-price {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
}

.price-note {
    font-size: 13px;
    color: #666;
}

.product-actions {
    margin-bottom: 10px;
}

.btn-add-to-cart,
.btn-alert {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover,
.btn-alert:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.product-links {
    text-align: center;
}

.wishlist-link,
.safety-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.wishlist-link:hover,
.safety-link:hover {
    color: #e74c3c;
    text-decoration: underline;
}

.spec-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
}

.spec-wrapper h4 {
    margin-bottom: 16px;
    font-weight: 600;
}

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

.spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.spec-list li span,
.spec-list li img {
    margin-left: auto;
    font-weight: 600;
}

.spec-list li:last-child {
    border-bottom: none;
}

/* =========================
   RELATED PRODUCTS SECTION
   ========================= */
.related-products-section {
    padding: 48px 0 56px;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
}

.related-products-header {
    text-align: center;
    margin-bottom: 32px;
}

.related-products-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.related-products-subtitle {
    font-size: 14px;
    color: #8896a8;
    margin: 0;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.related-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.related-product-card:hover {
    border-color: #c5d0dc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Media / Image */
.related-product-media {
    position: relative;
    padding: 16px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    min-height: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-media img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.related-product-card:hover .related-product-media img {
    transform: scale(1.04);
}

/* Badges */
.rp-badge {
    position: absolute;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.3;
}

.rp-badge-discount {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, #ff7a18 0%, #af002d 85%);
    color: #fff;
}

.rp-badge-stock {
    right: 10px;
    top: 10px;
    border: 1px solid transparent;
}

.rp-badge-stock.in {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #15803d;
}

.rp-badge-stock.out {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Body */
.related-product-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.related-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 39px;
}

.related-product-name:hover {
    color: #2563eb;
    text-decoration: none;
}

/* Rating */
.rp-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: #f59e0b;
}

.rp-rating .empty {
    color: #d1d5db;
}

.rp-rating-value {
    font-size: 12px;
    color: #8896a8;
    margin-left: 4px;
}

/* Price */
.related-product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}

.rp-price-current {
    font-size: 17px;
    font-weight: 800;
    color: #0f6fff;
}

.rp-price-old {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
}

.rp-price-unavailable {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 600;
}

/* Actions */
.related-product-actions {
    padding: 0 14px 14px;
}

/* Responsive */
@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-products-section {
        padding: 32px 0 40px;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .related-products-title {
        font-size: 20px;
    }

    .related-product-media {
        min-height: 150px;
        height: 150px;
    }

    .related-product-media img {
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .related-product-media {
        min-height: 130px;
        height: 130px;
        padding: 12px;
    }

    .related-product-media img {
        max-height: 100px;
    }

    .related-product-body {
        padding: 10px;
        gap: 6px;
    }

    .related-product-name {
        font-size: 13px;
        min-height: auto;
    }

    .rp-price-current {
        font-size: 15px;
    }

    .related-product-actions {
        padding: 0 10px 10px;
    }

    .related-product-actions .btn {
        font-size: 12px;
    }
}

/* Product Tabs Styling */
.product-tabs-wrapper {
    margin-top: 30px;
    margin-bottom: 30px;
}

.product-tabs-nav {
    border-bottom: 2px solid #e74c3c;
    margin-bottom: 0;
    gap: 10px;
}

.product-tabs-nav .nav-item {
    margin-bottom: -2px;
    margin-right: 10px;
}

.product-tabs-nav .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #666;
    font-weight: 600;
    padding: 15px 30px;
    transition: all 0.3s ease;
    text-transform: none;
}

.product-tabs-nav .nav-link:hover {
    color: #e74c3c;
    background: transparent;
    border-bottom-color: #ff9800;
}

.product-tabs-nav .nav-link.active {
    color: #ff9800;
    border-bottom-color: #ff9800;
    background: transparent;
}

.product-tabs-content {
    padding: 30px 20px;
    min-height: 200px;
}

.product-description {
    line-height: 1.8;
    color: #333;
}

/* Car Compatibility Table */
.compatibility-table {
    width: 100%;
    margin-top: 20px;
}

.compatibility-table thead {
    background: #f8f9fa;
}

.compatibility-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e74c3c;
}

.compatibility-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.compatibility-table tbody tr:hover {
    background: #f8f9fa;
}

.compatibility-group {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.compatibility-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eee;
}

.compatibility-brand-header:hover {
    background: #e9ecef;
}

.compatibility-brand-header .brand-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.compatibility-brand-header .brand-info h5 {
    color: #e74c3c;
    font-weight: 600;
    margin: 0;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.compatibility-brand-header .brand-info i {
    font-size: 20px;
    color: #e74c3c;
}

.compatibility-brand-header .badge {
    font-size: 12px;
    padding: 4px 8px;
}

.compatibility-brand-header .collapse-icon {
    color: #666;
    transition: transform 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 15px;
}

.compatibility-brand-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(90deg);
}

.compatibility-group .collapse {
    border-top: none;
}

.compatibility-group .compatibility-table {
    margin-bottom: 0;
}

.product_d_slider {
    width: 100%;
    max-width: 100%;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .product_layout {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 18px;
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product_details_right {
        padding-left: 0;
        margin-top: 30px;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .product-meta-info,
    .product-rating-section {
        padding-bottom: 15px;
    }
    
    .product-details-list li strong {
        min-width: 120px;
    }
    
    .product-tabs-nav .nav-item {
        margin-right: 5px;
    }
    
    .product-tabs-nav .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .product-tabs-content {
        padding: 20px 10px;
    }
    
    .compatibility-brand-header {
        padding: 12px 15px;
    }
    
    .compatibility-brand-header .brand-info i {
        font-size: 16px;
    }
    
    .compatibility-table {
        font-size: 14px;
    }
    
    .compatibility-table th,
    .compatibility-table td {
        padding: 8px;
    }
    
    .product_d_slider {
        margin-bottom: 20px;
    }

    .btn-add-to-cart,
    .btn-alert {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .main-price {
        font-size: 20px;
    }
}


/* ============================================
   Reviews Section - Modern Responsive
   ============================================ */
.pr_review {
    padding-top: 20px;
}

.pr_rate {
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .pr_review {
        padding-top: 10px;
    }

    .pr_rate {
        padding: 20px;
        flex-direction: column;
        display: flex;
        gap: 0;
    }

    .pr_rate .media-left {
        border-right: none;
        border-bottom: 1px solid #dcdede;
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .pr_rate .media-left span {
        font-size: 36px;
        line-height: 1;
    }

    .pr_rate .media-left span i {
        font-size: 24px;
    }

    .pr_rate .media-left p {
        font-size: 14px;
        margin-bottom: 0;
    }

    .pr_rate .media-left p br {
        display: none;
    }

    .pr_rate .media-body {
        padding-left: 0;
        flex-direction: column;
        gap: 12px;
    }

    .pr_rate .media-body .text {
        padding-right: 0;
    }

    .pr_rate .media-body h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .pr_rate .media-body .main_btn {
        width: 100%;
        text-align: center;
    }

    /* Review items */
    .pr_review_info {
        padding: 0 16px;
    }

    .pr_review_item {
        padding: 20px 0;
    }

    .pr_review_item .col-lg-12 {
        flex-direction: column;
        padding: 0;
    }

    .pr_review_item .col-lg-6 {
        padding: 0;
        max-width: 100%;
    }

    /* Tabs - vertical stack on mobile */
    .product-tabs-nav {
        flex-direction: column;
        border-bottom: none;
        gap: 0;
        background: #f8f9fa;
        border-radius: 10px;
        padding: 6px;
    }

    .product-tabs-nav .nav-item {
        margin-right: 0;
        margin-bottom: 0;
    }

    .product-tabs-nav .nav-link {
        white-space: normal;
        padding: 12px 16px;
        font-size: 14px;
        border-bottom: none;
        border-radius: 8px;
        text-align: left;
        color: #555;
        font-weight: 500;
        transition: all 0.2s;
    }

    .product-tabs-nav .nav-link:hover {
        background: #eef1f5;
        border-bottom-color: transparent;
    }

    .product-tabs-nav .nav-link.active {
        background: #fff;
        color: #e74c3c;
        border-bottom-color: transparent;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        font-weight: 600;
    }

    .product-tabs-content {
        padding: 16px 0;
    }
}
