/* Content Single Product Styles */
.product-detailed-info {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    align-items: start;
    position: relative;
    transition: max-height 0.3s ease;
}
.product-detailed-info h2{  
    margin:0 0 10px 0;
    font-size: 1.5rem;
}
.product-detailed-info h3{  
    margin:0 0 10px 0;
    font-size: 1.3rem;
}
.product-detailed-info:not(.expanded) {
    max-height: 400px;
    overflow: hidden;
}

.product-detailed-info:not(.expanded) .product-info-sections {
    max-height: 400px;
    overflow: hidden;
}

.product-detailed-info .product-toc {
    position: sticky;
    top: 0;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    z-index: 10;
}

.product-toc {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

/* Custom scrollbar for TOC */
.product-toc::-webkit-scrollbar {
    width: 6px;
}

.product-toc::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.product-toc::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.product-toc::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.product-toc h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
    border-bottom: 2px solid #0b5ed7;
    padding-bottom: 0.5rem;
}

.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-nav li {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.4rem 0.7rem;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    color:#000;
}
.product-info-sections .term-section h4{
    margin: 0 0 .5rem 0;
    font-size: 1rem;
}
.toc-link:hover,
.toc-link.active {
    background: #d9d9d9;
    color:#000;
    transform: translateX(4px);
}

.toc-link.active {
    background: #e21736;
    color: #fff;
    font-weight: 600;
}
#product-general_info{
    margin-top: 20px;
}

#product-general_info .term-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

#product-general_info .term-section + .term-section {
    margin-top: 1rem;
}

#product-general_info .term-section h4 {
    margin: 0 0 .5rem 0;
    font-size: 1rem;
    color: #2c3e50;
}

#product-general_info .term-section ul {
    margin: 0;
    padding-left: 1.2rem;
}

#product-general_info .term-section li {
    margin-bottom: .25rem;
}

.product-detailed-info.expanded {
    max-height: none;
    overflow: visible;
}

.product-detailed-info.expanded .product-toc {
    position: sticky;
    top: 1.1rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    z-index: 10;
}

.product-detailed-info .view-more-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, #fff);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    z-index: 10;
}

.product-detailed-info.expanded .view-more-overlay {
    display: none;
}

.product-detailed-info .view-more-btn {
    background: #e21736;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* Collapse Button */
.collapse-button-wrapper {
    display: none;
    grid-column: 1 / -1;
    margin-top: 20px;
    text-align: center;
}

.product-detailed-info.expanded .collapse-button-wrapper {
    display: block;
}

.product-detailed-info .collapse-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-content-products{
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
}
.product-info-sections{
    background: #fff;
    margin-bottom: 15px;
    border:1px solid #e1e1e1;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.product-info-sections section{
    margin:10px 0 20px 0;
}
.product-info-sections .term-card{
    margin:0 0 30px 0;
}
.product-info-sections .term-section{
    display: flex;
    gap: 0.5rem;
    margin:10px 0;
}
.product-info-sections .term-section h3, .product-info-sections .file-info h3{
    margin: 0;
    font-size: 1rem;
}
.product-info-sections .term-section ul{
    margin: 0;
}
.product-info-sections .term-section li{
    margin: 0;
    font-size: 0.9rem;
}

.section-content {
    line-height: 1.7;
}

.section-content>h1,
.section-content>h2,
.section-content>h3,
.section-content>h4,
.section-content>h5,
.section-content>h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.section-content h1:first-child,
.section-content h2:first-child,
.section-content h3:first-child,
.section-content h4:first-child,
.section-content h5:first-child,
.section-content h6:first-child {
    margin-top: 0;
}

.section-content ul,
.section-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.section-content li {
    margin-bottom: 0.5rem;
}

.section-content p {
    margin-bottom: 1rem;
}

.section-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.section-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.section-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.section-content tr:hover {
    background: #f8f9fa;
}

.section-content blockquote {
    border-left: 4px solid #0b5ed7;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0 4px 4px 0;
}

.section-content code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.section-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid #e9ecef;
    margin: 1rem 0;
}

.section-content pre code {
    background: none;
    padding: 0;
    color: #2c3e50;
}

.section-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

.section-content a {
    color: #0b5ed7;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}
/* Related Products Sections */
.product-section-wrapper {
  margin-top: 3rem;
  margin-bottom: 2rem;
}


.product-section .section-title {
  margin: 0 0 1.5rem 0;
  color: #000;
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
}

.product-section .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 1rem;
}
/* No detailed info message */
.no-detailed-info {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
}

.no-detailed-info p {
    margin: 0;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detailed-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-toc {
        position: static;
        max-height: none;
        order: 2;
    }
    
    .product-info-sections { 
        order: 1; 
    }
}

@media (max-width: 768px) {
    .product-detailed-info {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .product-toc,
    .product-info-section {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .toc-nav ul {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .toc-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .section-content {
        font-size: 0.95rem;
    }
    
    .section-content ul,
    .section-content ol {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-detailed-info {
        padding: 0.5rem;
    }
    
    .product-toc,
    .product-info-section {
        padding: 0.75rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .section-content {
        font-size: 0.9rem;
    }
    
    .section-content ul,
    .section-content ol {
        padding-left: 1rem;
    }
    
    .section-content table {
        font-size: 0.85rem;
    }
    
    .section-content th,
    .section-content td {
        padding: 0.5rem;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Highlight current section */
.product-info-section:target {
    border:1px solid #e1e1e1;
    animation: highlightSection 2s ease-in-out;
    border-radius: 8px;
}


/* Print styles */
@media print {
    .product-detailed-info {
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .product-toc {
        background: none;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .product-info-section {
        background: none;
        box-shadow: none;
        border-left: 2px solid #ccc;
        page-break-inside: avoid;
    }
    
    .toc-link {
        color: #000;
        text-decoration: none;
    }
    
    .toc-link:hover {
        background: none;
        transform: none;
    }
}

/* Ingredient Info Table */
.ingredient-info {
    margin: 10px 0 20px;
    background: #fff;
}

.ingredient-info h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: #2c3e50;
}

.ingredient-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.ingredient-table th,
.ingredient-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.ingredient-table th {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ingredient-table td {
}

.ingredient-table tbody tr:hover {
    background: #f9fafb;
}

@media (max-width: 768px) {
    .ingredient-info {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    .ingredient-info h2 {
        font-size: 1.25rem;
    }
    
    .ingredient-table th,
    .ingredient-table td {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Files & Links Styles */
.product-files-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.file-item:last-child {
    border-bottom: none;
}

.file-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0b5ed7;
    transition: color 0.2s ease;
}

.file-link:hover {
    color: #0b5ed7;
}

.file-icon {
    font-size: 24px;
    color: #0b5ed7;
    flex-shrink: 0;
}

/* Material Symbols Outlined */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.file-info-content {
    flex: 1;
    min-width: 0; /* Enable text truncation */
}

.file-name {
    font-weight: 400;
    display: block;
    margin-bottom: 3px;
}

.file-url {
    font-size: 13px;
    color: #666;
    word-break: break-all;
    display: block;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .file-link {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .file-icon {
        font-size: 20px;
    }
    
    .file-name {
        font-size: 0.95rem;
    }
}

/* Section Header with Title and Button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.section-header .section-title {
    margin: 0;
    flex: 1;
}

/* View All Button */
.view-all-wrapper {
    margin-top: 20px;
    text-align: center;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: #e21736;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
}


@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-header .section-title {
        width: 100%;
    }
    
    .btn-view-all {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
}


