/* ========================================
   Custom Single Product Page Styles
   ======================================== */

:root {
    /* Colors are dynamic via WordPress Customizer */
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-off-white: #f8fafc;
    --border-color: #e5e7eb;
    --radius: 12px;
}

/* Base Tweaks for this design */
body.single-product {
    background-color: #f2f4f8;
    color: var(--text-dark);
}

/* --- Breadcrumb --- */
.breadcrumb {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: 13px;
    color: var(--text-gray);
}

.breadcrumb a {
    text-decoration: none;
    color: var(--text-gray);
}

.breadcrumb span {
    margin: 0 5px;
}

/* --- Single Product Layout --- */
.product-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 3%);
}

/* Left: Image Gallery */
.gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    height: 680px;
    background: #fff;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnails {
    display: flex;
    gap: 10px;
}

.thumb {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb.active {
    opacity: 1;
    border-color: var(--primary);
}

.thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Right: Product Details */
.details {
    display: flex;
    flex-direction: column;
}

.badge-stock {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 10px;
}

.product-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 20px;
}

.stars {
    color: #f59e0b;
}

.review-count {
    color: var(--text-gray);
}



.current-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.original-price {
    font-size: 16px;
    text-decoration: line-through;
    color: #9ca3af;
}

.discount-tag {
    background: #fee2e2;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    order: 3;
    margin-left: 10px;
}

.price-section,
.price-section .price,
.woocommerce-variation-price {
    display: flex;
    align-items: flex-end;
    gap: 0;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.price-section {
    margin-bottom: 20px;
}

.price-section span.woocommerce-Price-amount.amount bdi {
    /* color: var(--primary); */
    font-weight: 600;
}

.price-section ins,
.price-section .price ins,
.woocommerce-variation-price ins {
    text-decoration: none;
    font-weight: 700;
    font-size: 28px;
    /* color: var(--primary); */
    order: 1;
}

.price-section del,
.price-section .price del,
.woocommerce-variation-price del {
    opacity: 0.5;
    font-size: 16px;
    text-decoration: line-through;
    color: var(--text-gray);
    order: 2;
}

.woocommerce-variation-price {
    display: none !important;
}

.description {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

/* Options */
.option-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.weight-options {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.weight-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.weight-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    outline: none;
}

/* Actions */
.actions-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 44px;
    border: none;
    background: #f9fafb;
    cursor: pointer;
    font-size: 16px;
}

.qty-input {
    width: 50px;
    height: 44px;
    border: none;
    text-align: center;
    font-weight: 600;
    outline: none;
    font-size: 14px;
}

/* Specific fix for Woo quantity input hiding arrows */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-cart {
    flex: 1;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    padding: 0 20px;
    /* Ensure text doesn't hit edges */
}

.btn-add-cart:hover {
    background-color: var(--accent);
}

.meta-info {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-info span b {
    color: var(--text-dark);
    margin-right: 5px;
}



/* --- Related Products Section --- */
.related-section {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.section-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile like the request implies for cards */
        gap: 15px;
    }
}

@media (max-width: 400px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Tabs Section --- */




.details .price del .woocommerce-Price-amount bdi {
    font-size: 16px;
}

.details .price-section del .woocommerce-Price-amount bdi {
    font-size: 16px;
}

.details .woocommerce-Price-amount bdi {
    font-size: 28px;
}



/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .main-image {
        height: 300px;
    }


    .product-title {
        font-size: 22px;
    }

    .breadcrumb {
        padding: 0 15px;
        margin: 15px 0;
    }
}

/* WooCommerce Overrides */
.custom-add-to-cart-wrapper .quantity {
    display: none;
}

/* Hide default qty if present */
button.single_add_to_cart_button {
    width: 100%;
    /* background-color: var(--primary); */
    /* color: white; */
    background: #fed90b;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 12px;
    cursor: pointer;
}

button.single_add_to_cart_button:hover {
    background-color: var(--accent);
    color: #fff;
}

/* --- Tabs Section --- */
.product-extra-info {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
}

.tabs-header {
    display: flex;
    gap: 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 5px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
    transition: 0.3s;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Description Style */
.desc-content {
    line-height: 1.8;
    color: var(--text-gray);
    font-size: 15px;
}

.desc-list {
    margin-top: 20px;
    list-style: none;
}

.desc-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.desc-list li i {
    color: var(--primary);
    font-size: 12px;
}

/* Reviews Style */
.reviews-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
}

.rating-summary {
    background: #f9fafb;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    height: fit-content;
}

.summary-score {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-dark);
}

.progress-bar-container {
    margin-top: 20px;
    text-align: left;
}

.progress-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-gray);
}

.bar-bg {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--yellow);
}

.review-item {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.review-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.user-info b {
    font-size: 15px;
}

.review-date {
    font-size: 12px;
    color: var(--text-gray);
}

.review-text {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .reviews-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .tabs-header {
        gap: 20px;
    }
}

/* --- Review Form Styles --- */
.add-review-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px dashed var(--border-color);
}

.add-review-section h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.add-review-section p {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.user-name {
    color: var(--primary);
}

.rating-chooser {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    font-size: 18px;
    color: #d1d5db;
    cursor: pointer;
}

.rating-chooser i.active {
    color: var(--yellow);
}

.review-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-full {
    grid-column: span 2;
}

.review-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.review-form input:focus,
.review-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 62, 39, 0.05);
}

.btn-submit-review {
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    transition: 0.3s;
    font-family: inherit;
}

.btn-submit-review:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.meta-info span a {
    color: var(--text-gray);
    text-decoration: none;
}

@media (max-width: 600px) {
    .review-form {
        grid-template-columns: 1fr;
    }

    .form-group-full {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .product-container {
        max-width: 331px;
    }

    .gallery,
    .details {
        max-width: 301px;
    }

    .single-buy-now,
    .whatsapp-button {
        max-width: 48%;
    }
}

.product-extra-info tr.table-heading,
.product-extra-info td.table-heading {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 16px;
    line-height: 30px;
    font-weight: bold;
    padding: 6px 20px;
    margin: 20px 0 0;
    border-radius: 5px;
    border: none;
}

.product-extra-info tr {
    display: flex;
}

.product-extra-info tr:hover {
    background: #fafbfc;
}

.product-extra-info tr.table-heading:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.product-extra-info td {
    flex: 1 1;
    display: flex !important;
    border: none;
    border-bottom: 1px solid #ECEDEF;
    padding: 10px 20px;
}

.product-extra-info .table-heading td {
    padding: 0;
    border: none;
}

.product-extra-info table.bijlimart-table,
.product-extra-info tr.table-heading th {
    border: none;
}

.product-extra-info table.bijlimart-table {
    width: 100%;
}


.product-extra-info h1 {
    font-size: 14px;
    padding: 12px 20px;
    margin: 20px 0;
    background: #D51E0B;
    color: #fff;
    box-shadow: none;
    border-radius: 5px;
    width: fit-content;
}

.product-extra-info h2 {
    font-size: 20px;
    text-align: left;
    font-family: "Trebuchet MS", sans-serif;
}

.product-container .description ul {
    margin-left: 20px;
}

@media (max-width: 768px) {
    .product-extra-info table.bijlimart-table {
        max-width: 325px;
    }

    .product-extra-info h2 {
        font-size: 18px;
        line-height: 25px;
    }
}

.product-extra-info th {
    flex: 1 1;
    display: flex;
    border-bottom: 1px solid #ECEDEF;
}

.desc-content table {
    width: 100%;
}