/**
 * Single Product Custom Styles
 * TeachAcademy Theme - Full Width Layout
 */

/* Force full width - remove any sidebar from all WooCommerce pages */
.woocommerce #primary,
.woocommerce-page #primary,
.single-product #primary {
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce #secondary,
.woocommerce-page #secondary,
.single-product #secondary,
.woocommerce .widget-area,
.woocommerce-page .widget-area,
.single-product .widget-area,
.woocommerce aside,
.woocommerce-page aside,
.single-product aside {
    display: none !important;
}

.woocommerce .site-content,
.woocommerce-page .site-content,
.single-product .site-content {
    max-width: 100% !important;
}

/* Container default - max 1400px */
.single-product-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding-top: 8px;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* === Single-product breadcrumb (inherits global TA styles, adds spacing) === */
.single-product-container .woocommerce-breadcrumb {
    margin-top: 8px;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eceff3;
    color: #6b7280;
    font-size: 13px;
}

/* === Product Main Layout === */
.single-product-main {
    margin-bottom: 32px;
}

.single-product-main > [class*="col-"] {
    min-width: 0;
}

@media (min-width: 992px) {
    .single-product-main > .col-lg-6 + .col-lg-6 {
        border-left: 1px solid #e5e7eb;
        padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.75);
    }

    .product-summary {
        padding-left: 6px;
    }
}

/* === Vendor Info === */
.product-vendor {
    margin-bottom: 24px;
    display: flex;
}

.vendor-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid rgb(224, 224, 224);
    transition: all 0.2s;
    width: 100%;
}

.vendor-link:hover {
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border-color: #6CD3C2 !important;
    text-decoration: none;
}

.vendor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.vendor-info {
    flex: 1;
}

.vendor-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.vendor-label.vendor-label--premium {
    color: #d97706;
    font-weight: 600;
}

.vendor-name {
    font-size: 16px;
    font-weight: 600;
    color: #27282c;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-icon {
    flex-shrink: 0;
}

.vendor-arrow {
    margin-left: auto;
    flex-shrink: 0;
}

/* === Product Title === */
.product-title {
    font-size: 28px;
    font-weight: 800;
    color: #27282c;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

/* === Rating === */
.product-rating {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

/* === Price Section === */
.product-price-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.product-price-section .price {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #27282c !important;
    margin: 0 !important;
    letter-spacing: -0.01em;
}

.product-price-section .price .woocommerce-Price-currencySuffix,
.product-price-section .price .woocommerce-Price-currencySymbol {
    font-weight: 600;
    font-size: 20px;
    color: #71717a !important;
}

.product-price-section .free-price {
    font-size: 28px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    color: #6CD3C2 !important;
}

.free-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #ecfdf5;
    color: #059669;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-price-section del {
    opacity: 0.45;
    font-size: 20px;
    color: #9ca3af !important;
}

.product-price-section del .woocommerce-Price-amount {
    color: #9ca3af !important;
}

.product-price-section ins {
    text-decoration: none;
}

.product-price-section ins .woocommerce-Price-amount {
    color: #27282c !important;
}

/* === Vendor Info (below price) === */
.product-vendor {
    margin-bottom: 20px;
    display: flex;
}

/* === Product Info Card (merged ingress + file info) === */
.product-info-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

/* Badges row */
.info-card-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.info-card-badges-label {
    font-size: 13px;
    font-weight: 500;
    color: #71717a;
    margin-right: 2px;
}

/* Ingress text */
.info-card-ingress {
    /* no top border/margin by default */
}

.info-card-ingress.has-top-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.info-card-ingress .ingress-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-card-ingress .ingress-text p {
    margin: 0;
    color: #52525b;
    line-height: 1.7;
    font-size: 15px;
}

.ingress-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    color: #6CD3C2;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.ingress-read-more:hover {
    color: #27282c;
    text-decoration: none;
}

.ingress-read-more svg {
    transition: transform 0.2s ease;
}

.ingress-read-more:hover svg {
    transform: translateY(2px);
}

/* File info section */
.info-card-files.has-top-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.info-card-files-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #27282c;
}

.info-card-files-header svg {
    flex-shrink: 0;
}

.info-card-files-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-detail-label {
    font-size: 14px;
    color: #71717a;
    font-weight: 500;
}

.file-detail-value {
    font-size: 14px;
    color: #27282c;
    font-weight: 600;
}

/* Tags at end of description tab */
.description-tags {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.description-tags-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #71717a;
    margin-bottom: 8px;
}

.description-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* === Add to Cart === */
.product-add-to-cart {
    margin-bottom: 24px;
}

.product-add-to-cart form.cart {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.product-add-to-cart .quantity {
    margin-bottom: 0;
    flex-shrink: 0;
}

.single_add_to_cart_button {
    flex: 1;
    min-width: 200px;
    background: #6CD3C2 !important;
    border-color: #6CD3C2 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0 32px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    border: none !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.single_add_to_cart_button:hover {
    background: #5bc2b1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 211, 194, 0.3) !important;
}

.single_add_to_cart_button:active {
    transform: translateY(0);
}

.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled {
    background: #e0e0e0 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* === Action Links (Support + Report) === */
.product-action-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.product-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #71717a;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.product-action-link:hover {
    color: #27282c;
    text-decoration: none;
}

.product-action-link--support {
    color: #27282c;
    font-weight: 600;
    padding: 8px 20px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.product-action-link--support:hover {
    border-color: #6CD3C2;
    color: #6CD3C2;
    background: rgba(108, 211, 194, 0.04);
}

.product-action-link--report {
    font-size: 12px;
    color: #a1a1aa;
    margin-left: auto;
}

.product-action-link--report:hover {
    color: #ef4444;
}

/* Hide default Dokan support button inside cart form */
.product-add-to-cart .dokan-store-support-btn-product {
    display: none !important;
}

/* Override default report-abuse inline styles */
a.dokan-report-abuse-button {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    color: #a1a1aa !important;
    font-size: 12px !important;
    margin-top: 0 !important;
}

a.dokan-report-abuse-button .fas {
    display: none;
}

/* === iziModal Support Popup Override === */
.iziModal {
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    max-width: 480px !important;
    border: none !important;
}

.iziModal .iziModal-header {
    background: #27282c !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 16px 24px !important;
}

.iziModal .iziModal-header h2 {
    font-size: 16px !important;
    font-weight: 600 !important;
}

.iziModal .iziModal-header .iziModal-header-buttons a.iziModal-button-close {
    color: #fff !important;
}

.iziModal .iziModal-content {
    padding: 24px !important;
}

.iziModal .iziModal-content .dokan-form-group {
    margin-bottom: 16px;
}

.iziModal .iziModal-content label {
    font-size: 13px;
    font-weight: 600;
    color: #27282c;
    margin-bottom: 6px;
    display: block;
}

.iziModal .iziModal-content input[type="text"],
.iziModal .iziModal-content input[type="email"],
.iziModal .iziModal-content select,
.iziModal .iziModal-content textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease !important;
    background: #fff !important;
    color: #27282c !important;
}

.iziModal .iziModal-content input[type="text"]:focus,
.iziModal .iziModal-content input[type="email"]:focus,
.iziModal .iziModal-content select:focus,
.iziModal .iziModal-content textarea:focus {
    border-color: #6CD3C2 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(108, 211, 194, 0.15) !important;
}

.iziModal .iziModal-content textarea {
    min-height: 120px;
    resize: vertical;
}

.iziModal .iziModal-content .dokan-btn-theme,
.iziModal .iziModal-content button[type="submit"],
.iziModal .iziModal-content input[type="submit"] {
    background: #6CD3C2 !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 10px 28px !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iziModal .iziModal-content .dokan-btn-theme:hover,
.iziModal .iziModal-content button[type="submit"]:hover,
.iziModal .iziModal-content input[type="submit"]:hover {
    background: #5bc2b1 !important;
    box-shadow: 0 4px 12px rgba(108, 211, 194, 0.3) !important;
}

/* Ensure dokan-hide wins inside iziModal */
.iziModal .dokan-hide,
.iziModal .iziModal-content .dokan-hide {
    display: none !important;
}

/* Hide the ugly inline close button inside support modal — iziModal header already has one */
.dokan-izimodal-close-btn {
    display: none !important;
}

/* === Quantity === */
.quantity {
    margin-bottom: 16px;
}

.quantity .qty {
    width: 80px;
    height: 50px;
    padding: 0 12px;
    border: 1px solid rgb(224, 224, 224);
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* === Product Meta === */
.product-meta {
    padding-top: 20px;
    border-top: 1px solid rgb(224, 224, 224);
}

.meta-item {
    margin-bottom: 16px;
}

.meta-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-right: 8px;
}

.meta-value {
    font-weight: 600;
    color: #27282c;
}

.meta-item-badges .meta-label {
    display: block;
    margin-bottom: 8px;
}

.meta-item-badges .meta-value {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.term-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.product-meta a {
    color: #6CD3C2;
    text-decoration: none;
    transition: color 0.2s;
}

.product-meta a:hover {
    color: #5bc2b1;
    text-decoration: underline;
}

/* === Custom Product Gallery === */
.ta-gallery {
    position: relative;
}

.ta-gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid rgb(224, 224, 224);
}

.ta-gallery-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ta-gallery-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Zoom button */
.ta-zoom-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #27282c;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    padding: 0;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ta-gallery-main:hover .ta-zoom-icon {
    opacity: 1;
}

.ta-zoom-icon:hover {
    background: #6CD3C2;
    color: white;
    transform: scale(1.1);
}

/* Gallery navigation arrows */
.ta-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #27282c;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ta-gallery-main:hover .ta-gallery-arrow {
    opacity: 1;
}

.ta-arrow-prev {
    left: 16px;
}

.ta-arrow-next {
    right: 16px;
}

.ta-gallery-arrow:hover {
    background: #6CD3C2;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

/* Thumbnails */
.ta-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    padding-bottom: 4px;
}

.ta-gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.ta-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.ta-thumb {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.ta-thumb:hover {
    opacity: 0.9;
}

.ta-thumb.active {
    opacity: 1;
    border-color: #6CD3C2;
}

.ta-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badges */
.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.sale-badge {
    background: #f59e0b;
}

/* Download button styling (ta-fdn integration) */
.product-add-to-cart .ta-fdn-download-wrapper {
    margin: 0;
}

.product-add-to-cart .ta-fdn-download-button {
    width: 100%;
    background: #6CD3C2 !important;
    border-color: #6CD3C2 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0 32px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    border: none !important;
    height: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

.product-add-to-cart .ta-fdn-download-button:hover {
    background: #5bc2b1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 211, 194, 0.3) !important;
}

.product-add-to-cart .ta-fdn-download-count {
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Sale/Out of Stock Badges */
.woocommerce-product-gallery .onsale {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 9;
    background: #f59e0b;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.woocommerce-product-gallery .out-of-stock-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 9;
    background: #ef4444;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* === Product Tabs === */
.product-tabs-wrapper {
    margin-top: 24px;
    margin-bottom: 40px;
}

.single-product .woocommerce-tabs {
    margin-top: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* Kill the Bootscore scroll wrapper */
.single-product .woocommerce-tabs .d-flex.text-nowrap.overflow-x-auto,
.single-product .woocommerce-tabs .d-flex.mb-3 {
    display: contents !important;
    margin: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
}

/* Tab bar (ul) */
.single-product .woocommerce-tabs ul.wc-tabs.nav.nav-tabs,
.single-product .woocommerce-tabs ul.tabs.wc-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
    border-bottom: 2px solid #e5e7eb !important;
    background: transparent !important;
    overflow: visible !important;
}

/* Tab items */
.single-product .woocommerce-tabs .nav-tabs .nav-item,
.single-product .woocommerce-tabs ul.tabs.wc-tabs li {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    position: relative;
    flex-shrink: 0;
}

/* Hide WooCommerce pseudo-elements */
.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

/* Tab links */
.single-product .woocommerce-tabs .nav-tabs .nav-link,
.single-product .woocommerce-tabs ul.tabs.wc-tabs li a {
    display: block !important;
    padding: 14px 24px !important;
    color: #71717a !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    margin-bottom: -2px !important;
    border-radius: 0 !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
    white-space: nowrap;
}

/* Hover */
.single-product .woocommerce-tabs .nav-tabs .nav-link:hover,
.single-product .woocommerce-tabs .nav-tabs .nav-link:focus,
.single-product .woocommerce-tabs ul.tabs.wc-tabs li a:hover {
    color: #27282c !important;
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    border-bottom-color: #d1d5db !important;
}

/* Active */
.single-product .woocommerce-tabs .nav-tabs .nav-item.active .nav-link,
.single-product .woocommerce-tabs .nav-tabs .nav-link.active,
.single-product .woocommerce-tabs ul.tabs.wc-tabs li.active a {
    color: #27282c !important;
    border-color: transparent !important;
    border-bottom-color: #6CD3C2 !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Tab panels */
.single-product .woocommerce-tabs .wc-tab,
.single-product .woocommerce-tabs .panel {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 32px 0 !important;
    box-shadow: none !important;
}

/* Hide the duplicate heading inside tab panels */
.single-product .woocommerce-tabs .panel > h2:first-child {
    display: none;
}

/* ---- Normalize pasted description content ---- */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description *:not(.description-tags):not(.description-tags *) {
    font-family: inherit !important;
    line-height: 1.7 !important;
}

.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description {
    font-size: 15px;
    color: #3f3f46;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Reset inline styles from pasted content — exclude .description-tags */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description p:not(.description-tags p),
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description li:not(.description-tags li),
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description span:not(.description-tags span):not(.term-badge),
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description div:not(.description-tags):not(.description-tags-list),
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description td,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description th {
    font-size: inherit !important;
    color: inherit !important;
    background: transparent !important;
    background-color: transparent !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

/* Normalize headings inside descriptions */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h1,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h2,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h3,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h4,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h5,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h6 {
    font-family: inherit !important;
    color: #27282c !important;
    line-height: 1.3 !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.5em !important;
    letter-spacing: normal !important;
}

/* Force consistent heading sizes */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h1 { font-size: 24px !important; }
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h2 { font-size: 22px !important; }
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h3 { font-size: 18px !important; }
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h4 { font-size: 16px !important; }
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h5,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description h6 { font-size: 15px !important; }

/* Paragraphs */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description p {
    margin: 0 0 1em 0;
}

/* Lists */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description ul,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description ol {
    margin: 0 0 1em 0 !important;
    padding-left: 1.5em !important;
}

.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description li {
    margin-bottom: 0.35em;
}

.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description ul li {
    list-style-type: disc !important;
}

/* Links */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description a {
    color: #6CD3C2 !important;
    text-decoration: underline;
}

.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description a:hover {
    color: #27282c !important;
}

/* Images in descriptions */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 1em 0;
}

/* Tables in descriptions */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 1em 0 !important;
    font-size: 14px !important;
}

.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description table td,
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description table th {
    border: 1px solid #e5e7eb !important;
    padding: 10px 14px !important;
    text-align: left !important;
    vertical-align: top !important;
}

.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description table th {
    background: #f9fafb !important;
    font-weight: 600 !important;
}

/* Strip pasted backgrounds, borders from divs/sections — exclude .description-tags */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description div:not(.description-tags):not(.description-tags-list),
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description section {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    box-shadow: none !important;
}

/* Blockquotes */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description blockquote {
    border-left: 3px solid #6CD3C2 !important;
    margin: 1em 0 !important;
    padding: 0.5em 0 0.5em 1.2em !important;
    color: #52525b !important;
    background: transparent !important;
    font-style: italic;
}

/* Kill any pasted max-width, width, float */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description *[style*="width"],
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description *[style*="float"] {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
}

/* Emoji sizing */
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description img.emoji {
    display: inline !important;
    width: 1em !important;
    height: 1em !important;
    margin: 0 0.1em !important;
    border-radius: 0;
    vertical-align: -0.1em;
}

.single-product .woocommerce-tabs .panel h2 {
    font-size: 22px;
    font-weight: 700;
    color: #27282c;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

/* === Related Products === */
.related-products-wrapper {
    margin-top: 40px;
}

.related.products {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.related.products h2 {
    font-size: 24px;
    font-weight: 700;
    color: #27282c;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #6CD3C2;
}

/* ======================================
   Reviews – TeachAcademy
   ====================================== */

/* Outer wrapper */
.ta-reviews {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
    margin-top: 0;
}

@media (max-width: 900px) {
    .ta-reviews {
        grid-template-columns: 1fr;
    }
    .ta-reviews__form-col {
        position: static;
        order: -1; /* form on top on mobile */
    }
}

/* Section headings */
.ta-reviews__heading {
    font-size: 20px;
    font-weight: 700;
    color: #27282c;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ta-reviews__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    background: #6CD3C2;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    line-height: 1;
}

/* ── Average score summary ── */
.ta-reviews__summary {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f0faf8;
    border: 1px solid #c8ede8;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.ta-reviews__avg-score {
    font-size: 42px;
    font-weight: 800;
    color: #27282c;
    line-height: 1;
    flex-shrink: 0;
}

.ta-reviews__avg-stars-track {
    position: relative;
    display: inline-block;
    font-size: 22px;
    letter-spacing: 2px;
    color: #e5e7eb;
    line-height: 1;
}

.ta-reviews__avg-stars-track::before {
    content: '★★★★★';
}

.ta-reviews__avg-stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #f59e0b;
    white-space: nowrap;
}

.ta-reviews__avg-stars-fill::before {
    content: '★★★★★';
}

.ta-reviews__avg-label {
    font-size: 13px;
    color: #71717a;
    margin-top: 6px;
}

/* ── Empty state ── */
.ta-reviews__empty {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    color: #71717a;
}

.ta-reviews__empty-icon {
    flex-shrink: 0;
    color: #9ca3af;
    display: flex;
}

.ta-reviews__empty-text {
    margin: 0;
    font-size: 14px;
    color: #71717a;
}

/* ── Comment list reset ── */
.ta-commentlist {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Individual review card ── */
.ta-review-item {
    list-style: none !important;
}

.ta-review-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    transition: box-shadow 0.2s ease;
}

.ta-review-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

/* Card header: avatar + meta + stars */
.ta-review-card__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.ta-review-card__avatar-img {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    border: 2px solid #e5e7eb !important;
    object-fit: cover;
    flex-shrink: 0;
}

.ta-review-card__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ta-review-card__author {
    font-weight: 700;
    font-size: 15px;
    color: #27282c;
}

.ta-review-card__date {
    font-size: 13px;
    color: #9ca3af;
}

/* Stars pushed to right */
.ta-review-card__rating {
    flex-shrink: 0;
    margin-left: auto;
}

.ta-review-card__rating .woocommerce-review__rating,
.ta-review-card__rating .star-rating {
    float: none !important;
    display: flex !important;
    margin: 0 !important;
}

/* Card body */
.ta-review-card__body {
    font-size: 15px;
    color: #3f3f46;
    line-height: 1.7;
}

.ta-review-card__body .description {
    margin: 0;
}

/* ── Star rating (global override) ── */
.star-rating {
    color: #f59e0b !important;
    font-size: 14px !important;
    display: inline-flex !important;
    gap: 1px;
}

.star-rating span::before {
    color: #f59e0b !important;
}

/* ── Right column form wrapper ── */
.ta-reviews__form-col {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 28px 24px;
    position: sticky;
    top: 24px;
}

.ta-reviews__form-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #27282c !important;
    margin: 0 0 20px !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid #6CD3C2 !important;
    display: block !important;
}

/* Form fields */
#review_form .comment-form-author,
#review_form .comment-form-email,
#review_form .comment-form-comment,
#review_form .comment-form-rating {
    margin-bottom: 16px !important;
}

#review_form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #52525b;
    margin-bottom: 6px;
}

#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea,
#review_form select {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #27282c !important;
    background: #fafafa !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    resize: vertical;
    appearance: auto;
}

#review_form input[type="text"]:focus,
#review_form input[type="email"]:focus,
#review_form textarea:focus,
#review_form select:focus {
    border-color: #6CD3C2 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(108,211,194,.15) !important;
}

/* Star picker (CSS-only, reverse-order trick) */
.ta-star-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
}

.ta-star-picker input[type="radio"] {
    display: none !important;
}

.ta-star-picker label {
    font-size: 28px !important;
    color: #e5e7eb !important;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
    margin: 0 !important;
    padding: 0 !important;
}

.ta-star-picker label:hover,
.ta-star-picker label:hover ~ label,
.ta-star-picker input[type="radio"]:checked ~ label {
    color: #f59e0b !important;
}

/* Submit button */
.ta-reviews__submit,
#review_form .submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 12px 24px !important;
    background: #6CD3C2 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.1s !important;
    margin-top: 4px !important;
    letter-spacing: 0.01em !important;
}

.ta-reviews__submit:hover,
#review_form .submit:hover {
    background: #50c4b1 !important;
    transform: translateY(-1px);
}

.ta-reviews__submit:active,
#review_form .submit:active {
    transform: translateY(0);
}

/* ── "Bli först" CTA block (below empty state, logged-out) ── */
.ta-reviews__be-first {
    margin-top: 20px;
    background: linear-gradient(135deg, #f0faf8 0%, #e6f7f4 100%);
    border: 1px solid #b2e4dc;
    border-radius: 16px;
    padding: 28px 28px 24px;
    text-align: center;
}

.ta-reviews__be-first-stars {
    font-size: 24px;
    color: #f59e0b;
    letter-spacing: 4px;
    margin-bottom: 12px;
    display: block;
}

.ta-reviews__be-first-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #27282c !important;
    margin: 0 0 10px !important;
    line-height: 1.4 !important;
}

.ta-reviews__be-first-desc {
    font-size: 14px;
    color: #52525b;
    margin: 0 0 20px;
    line-height: 1.6;
}

.ta-reviews__be-first-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #27282c;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    line-height: 1;
}

.ta-reviews__be-first-btn:hover {
    background: #6CD3C2;
    transform: translateY(-1px);
    color: #fff;
}

.ta-reviews__be-first-btn:active {
    transform: translateY(0);
}

/* ── Right column logged-out login prompt ── */
.ta-reviews__form-login-prompt {
    text-align: center;
    padding: 4px 0;
}

.ta-reviews__form-login-stars {
    font-size: 28px;
    color: #f59e0b;
    letter-spacing: 4px;
    display: block;
    margin-bottom: 16px;
}

.ta-reviews__form-login-text {
    font-size: 14px;
    color: #52525b;
    margin: 0 0 20px;
    line-height: 1.6;
}

/* ── Must-purchase notice ── */
.ta-reviews__must-purchase {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 4px;
}

.ta-reviews__must-purchase-icon {
    flex-shrink: 0;
    color: #9ca3af;
    display: flex;
    margin-top: 1px;
}

.ta-reviews__must-purchase-text {
    margin: 0;
    font-size: 14px;
    color: #52525b;
    line-height: 1.6;
}

/* ── Must-login notice (keep for compat) ── */
.ta-reviews__must-login {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f0faf8;
    border: 1px solid #c8ede8;
    border-radius: 12px;
    padding: 20px;
}

.ta-reviews__must-login-icon {
    flex-shrink: 0;
    color: #6CD3C2;
    display: flex;
    margin-top: 1px;
}

.ta-reviews__must-login-text {
    margin: 0;
    font-size: 15px;
    color: #3f3f46;
    line-height: 1.6;
}

.ta-reviews__must-login-text a {
    color: #6CD3C2;
    font-weight: 600;
    text-decoration: underline;
}

.ta-reviews__must-login-text a:hover {
    color: #27282c;
}

/* ── Pagination ── */
.ta-reviews__pagination {
    margin-top: 24px;
}

/* Keep WooCommerce compat for hidden meta (verified buyer etc.) */
.woocommerce-review__verified,
.woocommerce-review__dash {
    display: none !important;
}

/* Hide the default WC meta block so we show our own layout */
.ta-review-card .woocommerce-review__author {
    display: none !important;
}

.ta-review-card .woocommerce-review__published-date {
    display: none !important;
}

/* === Sale Badge === */
.onsale {
    background: #f59e0b !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

/* === Out of Stock Badge === */
.out-of-stock-badge {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

/* === Responsive === */
@media (max-width: 991px) {
    .single-product-container {
        max-width: 960px !important;
        padding-left: var(--bs-gutter-x, 0.75rem) !important;
        padding-right: var(--bs-gutter-x, 0.75rem) !important;
    }

    .single-product-container > .container {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .single-product-main {
        margin-bottom: 24px;
    }

    .single-product-container .woocommerce-breadcrumb {
        margin-bottom: 24px;
        padding-bottom: 10px;
    }

    .product-title {
        font-size: 24px !important;
    }

    .product-breadcrumb-wrapper {
        padding: 16px 0;
    }

    .woocommerce-breadcrumb.custom-breadcrumb {
        font-size: 13px;
    }

    .file-content-box {
        padding: 16px;
    }

    .file-content-header h3 {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .single-product-container {
        max-width: 576px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: var(--bs-gutter-x, 0.75rem) !important;
        padding-right: var(--bs-gutter-x, 0.75rem) !important;
    }

    .single-product-container > .container {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .single-product-main {
        margin-bottom: 20px;
    }

    .single-product-container .woocommerce-breadcrumb {
        margin-bottom: 20px;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .product-summary {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .product-title {
        font-size: 22px !important;
    }

    .product-price-section .price,
    .product-price-section .free-price {
        font-size: 24px !important;
    }

    .vendor-link {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 10px;
        padding: 10px 12px;
    }

    .vendor-avatar {
        width: 44px;
        height: 44px;
    }

    .vendor-info {
        min-width: 0;
    }

    .vendor-name {
        font-size: 15px;
    }

    .vendor-arrow {
        display: block;
        margin-left: auto;
    }

    .single-product .woocommerce-tabs .nav-tabs .nav-link,
    .single-product .woocommerce-tabs ul.tabs.wc-tabs li a {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }

    .single-product .woocommerce-tabs .panel {
        padding: 24px 0 !important;
    }

    .ta-thumb {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }

    .ta-gallery-arrow {
        width: 36px;
        height: 36px;
        opacity: 0.7;
    }

    .ta-gallery-main:hover .ta-gallery-arrow {
        opacity: 0.9;
    }

    .ta-arrow-prev {
        left: 8px;
    }

    .ta-arrow-next {
        right: 8px;
    }

    .woocommerce-breadcrumb.custom-breadcrumb {
        font-size: 12px;
    }

    .file-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .product-action-links {
        gap: 10px;
    }

    .product-action-link--support {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
    }

    .product-action-link--report {
        margin-left: 0;
    }
}
