/* Import theme colors */
@import url('theme-color.css');

/* Section Heading Style - TOP SELLERS Style */

.section-heading-component {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.section-heading-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    padding: 0 15px;
    box-sizing: border-box;
}

.section-heading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
    flex-wrap: nowrap;
}

.section-heading-line {
    flex: 1 1 auto;
    height: 1px;
    background-color: var(--text-dark);
    max-width: 200px;
    min-width: 20px;
    flex-shrink: 1;
    margin-bottom: 1rem;
}

.section-heading-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dark);
    letter-spacing: 1px;
    text-align: center;
    font-family: 'Space Grotesk', 'Arial', sans-serif;
    white-space: nowrap;
    margin-bottom: 1rem;
    padding: 0 20px;
    flex-shrink: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.section-heading-subtitle {
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: block;
}

.section-heading-subtitle a {
    color: var(--text-dark);
    text-decoration: none;
    margin-bottom: 20px;
    display: inline-block;
    position: relative;
}

.section-heading-subtitle a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

.section-heading-subtitle a:hover::after {
    height: 3px;
    background-color: var(--text-medium);
}

.section-heading-subtitle:hover {
    opacity: 0.7;
}


/* Responsive Design */
/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .section-heading-container {
        max-width: 100%;
        padding: 0 20px;
    }

    .section-heading-title {
        font-size: 38px;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .section-heading-wrapper {
        padding: 0 15px;
    }

    .section-heading-title {
        font-size: 32px;
        padding: 0 15px;
        letter-spacing: 0.8px;
    }

    .section-heading-line {
        max-width: 150px;
        min-width: 30px;
    }

    .section-heading-container {
        gap: 15px;
    }
}

/* Small Tablets and Large Phones */
@media (max-width: 768px) {
    .section-heading-wrapper {
        padding: 0 12px;
    }

    .section-heading-title {
        font-size: 26px;
        padding: 0 12px;
        letter-spacing: 0.5px;
    }

    .section-heading-line {
        max-width: 80px;
        min-width: 20px;
    }

    .section-heading-container {
        gap: 12px;
    }

    .section-heading-subtitle {
        font-size: 13px;
        margin-top: 12px;
    }
}

/* Mobile Phones */
@media (max-width: 576px) {
    .section-heading-wrapper {
        padding: 0 10px;
    }

    .section-heading-title {
        font-size: 22px;
        padding: 0 10px;
        letter-spacing: 0.3px;
        white-space: normal;
        line-height: 1.3;
        word-break: break-word;
    }

    .section-heading-line {
        max-width: 50px;
        min-width: 15px;
        display: none;
        /* Hide lines on very small screens to prevent breaking */
    }

    .section-heading-container {
        gap: 8px;
        flex-wrap: wrap;
    }

    .section-heading-subtitle {
        font-size: 12px;
        margin-top: 10px;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .section-heading-wrapper {
        padding: 0 8px;
    }

    .section-heading-title {
        font-size: 20px;
        padding: 0 8px;
        line-height: 1.2;
        white-space: normal;
    }

    .section-heading-line {
        display: none;
        /* Hide lines on very small screens */
    }

    .section-heading-container {
        gap: 6px;
        flex-direction: column;
    }

    .section-heading-subtitle {
        font-size: 11px;
        margin-top: 8px;
    }
}

/* Extra Small Mobile Phones */
@media (max-width: 360px) {
    .section-heading-wrapper {
        padding: 0 5px;
    }

    .section-heading-title {
        font-size: 18px;
        padding: 0 5px;
        line-height: 1.2;
        letter-spacing: 0.2px;
    }

    .section-heading-container {
        gap: 5px;
    }

    .section-heading-subtitle {
        font-size: 10px;
        margin-top: 6px;
    }
}

/* Very Small Screens (320px and below) */
@media (max-width: 320px) {
    .section-heading-wrapper {
        padding: 0 4px;
    }

    .section-heading-title {
        font-size: 16px;
        padding: 0 4px;
        line-height: 1.15;
    }

    .section-heading-subtitle {
        font-size: 9px;
    }
}

/* For pages where heading is standalone (no subtitle needed) */
.page-section-heading {
    margin-bottom: 50px;
}

/* Responsive margins for page headings */
@media (max-width: 992px) {
    .page-section-heading {
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .page-section-heading {
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .page-section-heading {
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .page-section-heading {
        margin-bottom: 20px;
    }
}

@media (max-width: 360px) {
    .page-section-heading {
        margin-bottom: 15px;
    }
}

/* Ensure container doesn't break layout */
.section-heading-container {
    overflow: hidden;
    min-width: 0;
    /* Allow flex items to shrink below content size */
}

/* Prevent horizontal overflow on all screen sizes */
.section-heading-component {
    max-width: 100%;
}

/* Handle very long titles on mobile */
@media (max-width: 576px) {
    .section-heading-title {
        max-width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }

    .section-heading-container {
        overflow: visible;
        /* Allow text to wrap on mobile */
    }
}

/* Prevent text from breaking layout on larger screens */
@media (min-width: 577px) {
    .section-heading-title {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}