/* ============================================
   LAC Taxonomy Archive Templates - ENHANCED
   Brands, Categories, Tags with Full Metadata
   ============================================ */

/* Main Container */
.lac-taxonomy-archive {
    padding: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

.lac-taxonomy-archive .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs */
.lac-breadcrumbs {
    margin-bottom: 30px;
}

.lac-breadcrumbs .woocommerce-breadcrumb {
    font-size: 14px;
    color: #6b7280;
}

.lac-breadcrumbs .woocommerce-breadcrumb a {
    color: #0079f3;
    text-decoration: none;
    transition: color 0.2s;
}

.lac-breadcrumbs .woocommerce-breadcrumb a:hover {
    color: #0051a8;
}

/* Archive Header */
.lac-archive-header {
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 2px 6px rgba(0, 0, 0, 0.04),
        0 6px 16px rgba(0, 0, 0, 0.06);
}

.lac-archive-header.has-image {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: center;
}

.lac-archive-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lac-archive-title {
    font-size: 36px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 15px 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

/* Archive Description Styling */
.lac-archive-description {
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    margin: 15px 0;
}

.lac-archive-description h2,
.lac-archive-description h3 {
    color: #1d1d1f;
    margin: 20px 0 12px 0;
    font-weight: 600;
}

.lac-archive-description h2 {
    font-size: 24px;
}

.lac-archive-description h3 {
    font-size: 20px;
}

.lac-archive-description ul,
.lac-archive-description ol {
    padding-left: 24px;
    margin: 12px 0;
}

.lac-archive-description li {
    margin: 8px 0;
}

.lac-archive-description strong {
    color: #1d1d1f;
    font-weight: 600;
}

.lac-archive-description p {
    margin: 12px 0;
}

.lac-archive-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.lac-product-count {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #eff6ff;
    color: #0079f3;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
}

/* Medical Badge */
.lac-medical-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
}

.lac-medical-badge svg {
    width: 14px;
    height: 14px;
}

/* Google Category */
.lac-google-category {
    margin-top: 15px;
    padding: 12px 16px;
    background: #fef3c7;
    border-left: 3px solid: #f59e0b;
    border-radius: 6px;
    font-size: 14px;
    color: #92400e;
}

.lac-google-category strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

/* Tag Badge */
.lac-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 15px;
}

.lac-tag-badge svg {
    width: 16px;
    height: 16px;
}

/* Child Categories Grid */
.lac-child-categories {
    margin-bottom: 50px;
    padding: 30px;
    background: #fafbfc;
    border-radius: 12px;
}

.lac-child-categories-title {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
}

.lac-child-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.lac-child-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.lac-child-category-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.lac-child-category-image {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.lac-child-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lac-child-category-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 5px 0;
    text-align: center;
}

.lac-child-category-count {
    font-size: 13px;
    color: #6b7280;
}

/* Shop Toolbar */
.lac-shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 30px;
}

.lac-toolbar-left,
.lac-toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.woocommerce-result-count {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.woocommerce-ordering select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #1d1d1f;
    cursor: pointer;
}

/* Products Wrapper */
.lac-products-wrapper {
    margin-bottom: 40px;
}

/* Pagination */
.lac-pagination {
    margin: 40px 0;
}

.lac-pagination .woocommerce-pagination {
    text-align: center;
}

.lac-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lac-pagination .page-numbers li {
    display: inline-block;
}

.lac-pagination .page-numbers a,
.lac-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    transition: all 0.2s;
}

.lac-pagination .page-numbers a:hover {
    background: #eff6ff;
    border-color: #0079f3;
    color: #0079f3;
}

.lac-pagination .page-numbers .current {
    background: #0079f3;
    border-color: #0079f3;
    color: #ffffff;
}

/* Second Description (After Products) */
.lac-second-description {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(to bottom, #fafbfc 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 2px 6px rgba(0, 0, 0, 0.04);
}

.lac-second-description h2,
.lac-second-description h3 {
    color: #1d1d1f;
    margin: 20px 0 12px 0;
    font-weight: 600;
}

.lac-second-description h2 {
    font-size: 28px;
}

.lac-second-description h3 {
    font-size: 22px;
}

.lac-second-description p {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    margin: 12px 0;
}

.lac-second-description ul,
.lac-second-description ol {
    padding-left: 24px;
    margin: 12px 0;
}

.lac-second-description li {
    margin: 8px 0;
    line-height: 1.6;
}

/* Size Guide */
.lac-size-guide {
    margin: 50px 0;
    padding: 40px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
}

.lac-size-guide-title {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
}

.lac-size-guide-content {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

/* Related Tags */
.lac-related-tags {
    margin-top: 50px;
    padding: 30px;
    background: #fafbfc;
    border-radius: 12px;
}

.lac-related-tags-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
}

.lac-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lac-tag-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    color: #1d1d1f;
    text-decoration: none;
    transition: all 0.2s;
}

.lac-tag-link:hover {
    background: #eff6ff;
    border-color: #0079f3;
    color: #0079f3;
}

.lac-tag-count {
    font-size: 12px;
    color: #6b7280;
}

/* No Products Message */
.lac-no-products {
    text-align: center;
    padding: 60px 20px;
    background: #fafbfc;
    border-radius: 12px;
}

.lac-no-products p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .lac-archive-header.has-image {
        grid-template-columns: 150px 1fr;
        gap: 20px;
    }

    .lac-archive-title {
        font-size: 28px;
    }

    .lac-child-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .lac-taxonomy-archive {
        padding: 20px 0;
    }

    .lac-archive-header {
        padding: 25px 20px;
    }

    .lac-archive-header.has-image {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .lac-archive-image {
        margin: 0 auto 20px;
        max-width: 150px;
    }

    .lac-archive-title {
        font-size: 24px;
    }

    .lac-shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .lac-toolbar-left,
    .lac-toolbar-right {
        justify-content: center;
    }

    .lac-child-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lac-child-categories,
    .lac-second-description,
    .lac-size-guide {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .lac-child-categories-grid {
        grid-template-columns: 1fr;
    }

    .lac-archive-description {
        font-size: 14px;
    }
}
/* ============================================
   SEO Enhancements CSS
   FAQ, Trust Signals, Freshness Indicators
   ============================================ */

/* Freshness/Last Updated */
.lac-taxonomy-freshness {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: #f0f9ff;
    border-left: 3px solid #0079f3;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 14px;
    color: #1e40af;
}

.lac-last-updated,
.lac-product-count-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lac-last-updated svg {
    color: #0079f3;
}

/* FAQ Section */
.lac-faq-section {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 2px 6px rgba(0, 0, 0, 0.04);
}

.lac-faq-title {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 30px 0;
    letter-spacing: -0.02em;
}

.lac-faq-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lac-faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lac-faq-item:hover {
    border-color: #0079f3;
    box-shadow: 0 4px 12px rgba(0, 121, 243, 0.1);
}

.lac-faq-question {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
}

.lac-faq-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    transition: background-color 0.2s;
}

.lac-faq-toggle:hover {
    background: #f9fafb;
}

.lac-faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: #6b7280;
}

.lac-faq-toggle[aria-expanded="true"] .lac-faq-icon {
    transform: rotate(180deg);
    color: #0079f3;
}

.lac-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
}

.lac-faq-toggle[aria-expanded="true"] + .lac-faq-answer {
    max-height: 500px;
    padding: 0 24px 20px 24px;
}

.lac-faq-answer div {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

.lac-faq-answer p {
    margin: 10px 0;
}

.lac-faq-answer ul,
.lac-faq-answer ol {
    padding-left: 24px;
    margin: 10px 0;
}

/* Trust Signals */
.lac-trust-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
    margin: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.trust-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.trust-badge.shipping {
    background: #dbeafe;
    color: #1e40af;
}

.trust-badge.certified {
    background: #fef3c7;
    color: #92400e;
}

/* Popular Products Widget */
.lac-popular-products {
    margin: 40px 0;
    padding: 30px;
    background: #fafbfc;
    border-radius: 12px;
}

.lac-popular-products h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
}

.lac-popular-products ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.lac-popular-products li {
    margin: 0;
}

.lac-popular-products a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #1d1d1f;
    transition: all 0.2s;
}

.lac-popular-products a:hover {
    border-color: #0079f3;
    box-shadow: 0 4px 12px rgba(0, 121, 243, 0.1);
    transform: translateY(-2px);
}

.popular-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    margin-left: auto;
}

/* Related Categories */
.lac-related-categories {
    margin: 40px 0;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.lac-related-categories h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
}

.lac-related-categories a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    margin: 6px 6px 6px 0;
    background: #f3f4f6;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.lac-related-categories a:hover {
    background: #eff6ff;
    color: #0079f3;
    transform: translateX(4px);
}

.lac-related-categories a::before {
    content: '→';
    color: #6b7280;
}

/* Brands in Category */
.lac-brands-in-category {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px;
}

.lac-brands-in-category h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
}

.lac-brands-in-category a {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    margin: 6px 6px 6px 0;
    background: #ffffff;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.lac-brands-in-category a:hover {
    border-color: #0079f3;
    color: #0079f3;
    box-shadow: 0 2px 8px rgba(0, 121, 243, 0.15);
}

/* Category Stats */
.lac-category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.lac-category-stats .stat {
    text-align: center;
    padding: 20px;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.lac-category-stats .stat strong {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #0079f3;
    margin-bottom: 8px;
    line-height: 1;
}

.lac-category-stats .stat span {
    display: block;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Download Resources */
.lac-downloads {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    text-align: center;
}

.lac-downloads h3 {
    font-size: 22px;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 20px 0;
}

.lac-downloads p {
    font-size: 14px;
    color: #78350f;
    margin: 15px 0 0 0;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #ffffff;
    color: #92400e;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.download-btn svg {
    font-size: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .lac-trust-signals {
        flex-direction: column;
        align-items: stretch;
    }

    .trust-badge {
        justify-content: center;
    }

    .lac-category-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .lac-faq-section {
        padding: 25px 20px;
    }

    .lac-faq-title {
        font-size: 22px;
    }

    .lac-faq-toggle {
        padding: 16px 18px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lac-category-stats {
        grid-template-columns: 1fr;
    }

    .lac-taxonomy-freshness {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
