/*
Theme Name: Temirstan25
Text Domain: Temirstan25
Version: 1.0.0
*/
hr, img {
    border: 0;
    max-width: 100%;
    max-height: 100%;
}


/* Theme CSS variables (extracted from inline header) */
html {
    --theme-base-color: #a18f0f;
    --theme-base-opacity-color: #1f36801a;
    --theme-more-color: #80501f;
    --theme-border-radius: 4px;
    --theme-text-transform: none;
    --theme-letter-spacing: normal;
    --theme-button-font-size: 0%;
    --theme-button-padding-2px: 0%;
    --theme-button-padding-1px: 0%;
    --theme-more-color-hue: 226;
    --theme-more-color-saturation: 61%;
    --theme-more-color-lightness: 31%;
    --theme-base-color-hue: 226;
    --theme-base-color-saturation: 61%;
    --theme-base-color-lightness: 31%;
    --theme-lightness-hover-diff: 6%;
}
.switcher-title { font-family: "Roboto", Arial, sans-serif; }

/* Splide: cancel theme's global ul li::before dash (track + pagination) */
.splide__list,
.splide__pagination { padding-left: 0; }
.splide__list > li::before,
.splide__list > li:before,
.splide__pagination > li::before,
.splide__pagination > li:before {
    content: none !important;
    display: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Partners logo carousels (.partners-splide used in part_pratners.php / part_pratners2.php) */
.partners-splide .splide__slide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.partners-splide .grid-list__item {
    width: 100%;
    max-width: 180px;
    height: 60px;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0 3px #d9d9d9;
    overflow: hidden;
}
.partners-splide .item-image-picture {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center center;
}
.partners-splide .splide__arrow { background: rgba(0, 0, 0, .35); }
.partners-splide .splide__pagination { bottom: -1.75rem; }
.partners-splide .splide__pagination__page {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background: #ccc;
    opacity: 1;
}
.partners-splide .splide__pagination__page.is-active {
    background: var(--theme-base-color, #a18f0f);
    transform: scale(1.2);
}

/* Global: prevent stray horizontal scroll on mobile */
html, body { overflow-x: hidden; max-width: 100%; }

/* Mobile single-product layout fixes */
@media (max-width: 768px) {
    /* Tabs: horizontal scroll, compact padding, fade-edge hint */
    .tabs-block,
    .tabs.tabs-history { max-width: 100%; min-width: 0; }
    .tabs.tabs-history .nav-tabs,
    .tabs-block .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scroll-snap-type: x mandatory;
        gap: 6px;
        padding: 0 1rem 6px 0;
        margin: 0;
        list-style: none;
    }
    .tabs.tabs-history .nav-tabs li,
    .tabs-block .nav-tabs li {
        flex: 0 0 auto;
        white-space: nowrap;
        scroll-snap-align: start;
        margin: 0;
    }
    .tabs.tabs-history .nav-tabs li a,
    .tabs-block .nav-tabs li a {
        padding: 8px 14px !important;
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
        display: inline-block;
    }
    .tabs.tabs-history .nav-tabs::-webkit-scrollbar,
    .tabs-block .nav-tabs::-webkit-scrollbar { height: 3px; }
    .tabs.tabs-history .nav-tabs::-webkit-scrollbar-thumb,
    .tabs-block .nav-tabs::-webkit-scrollbar-thumb {
        background: var(--theme-base-color, #a18f0f);
        border-radius: 2px;
    }

    /* Single-product: stack flex columns, drop fixed gallery width */
    .product-container,
    .catalog-detail,
    .catalog-detail__item,
    .catalog-detail__main,
    .catalog-detail__bottom-info { max-width: 100%; min-width: 0; box-sizing: border-box; }

    .catalog-detail.flexbox,
    .catalog-detail__top-info.flexbox,
    .catalog-detail__main-parts.line-block {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }

    .catalog-detail__gallery,
    .catalog-detail__gallery--322px,
    .catalog-detail__gallery--horizontal {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .catalog-detail__main-part--left,
    .catalog-detail__main-part--right { flex: 1 1 auto; min-width: 0; }

    /* Tables inside tabs — break long content */
    .props_block__wrapper { display: block; width: 100%; }
    .props_block__wrapper tbody,
    .props_block__wrapper tr { display: block; width: 100%; }
    .props_block__wrapper td { display: block; width: 100%; word-break: break-word; }

    /* Tab content: prevent overflow from injected post_content */
    .tab-pane img,
    .tab-pane table { max-width: 100%; height: auto; }

    /* Info-buttons (Купить/?) wrap if needed */
    .info-buttons.flexbox { flex-wrap: wrap; gap: 8px; }
}
