/**
 * Product Description Normalization
 * 
 * Normalizes font sizes in product descriptions to inherit from theme
 * while preserving semantic formatting (headings, bold, italic)
 */

/* Reset all font sizes to inherit from theme */
#tab-description * {
    font-size: inherit !important;
    line-height: inherit !important;
    font-family: inherit !important;
}

/* Preserve heading hierarchy with relative sizes */
#tab-description h1 {
    font-size: 2em !important;
    font-weight: bold !important;
    margin: 0.67em 0 !important;
}

#tab-description h2 {
    font-size: 1.5em !important;
    font-weight: bold !important;
    margin: 0.75em 0 !important;
}

#tab-description h3 {
    font-size: 1.17em !important;
    font-weight: bold !important;
    margin: 0.83em 0 !important;
}

#tab-description h4 {
    font-size: 1em !important;
    font-weight: bold !important;
    margin: 1.12em 0 !important;
}

#tab-description h5 {
    font-size: 0.83em !important;
    font-weight: bold !important;
    margin: 1.5em 0 !important;
}

#tab-description h6 {
    font-size: 0.67em !important;
    font-weight: bold !important;
    margin: 1.67em 0 !important;
}

/* Preserve bold and italic */
#tab-description strong,
#tab-description b {
    font-weight: bold !important;
}

#tab-description em,
#tab-description i {
    font-style: italic !important;
}

#tab-pdfs {
    opacity: 1 !important;
}

/* Table styling for consistent display */
#tab-description table {
    max-width: 100% !important;
    width: auto !important;
    border-collapse: collapse !important;
    margin: 1em 0 !important;
    border: 1px solid #ddd !important;
    table-layout: auto !important;
}

#tab-description table tr {
    height: auto !important;
}

#tab-description table td,
#tab-description table th {
    width: auto !important;
    height: auto !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    text-align: left !important;
    vertical-align: top !important;
    word-wrap: break-word !important;
}

#tab-description table th {
    background-color: #f5f5f5 !important;
    font-weight: bold !important;
}

#tab-description table tr:nth-child(even) {
    background-color: #fafafa !important;
}

/* Mobile responsive - stack rows vertically */
@media (max-width: 768px) {
    #tab-description table,
    #tab-description thead,
    #tab-description tbody {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }
    
    #tab-description thead {
        display: none !important;
    }
    
    #tab-description table tr {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 1.5em !important;
        border: 2px solid #ddd !important;
        border-radius: 4px !important;
        padding: 0.5em !important;
        background-color: #fff !important;
    }
    
    #tab-description table td {
        display: block !important;
        width: 100% !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        padding: 0.75em 0.5em !important;
        text-align: left !important;
    }
    
    #tab-description table td:last-child {
        border-bottom: none !important;
    }
}