/*
Theme Name: IHTP Child Theme
Theme URI: 
Description: Child theme for IHTP website
Author: IHTP
Template: astra
Version: 1.0.0
*/

/* =============================================
   IHTP DATE RANGE FILTER (Data Início / Data Fim)
   PURANA ".ihtp-date-range-wrap" se le kar
   ".ihtp-date-clear:hover" tak ka POORA block
   apni style.css se DELETE kar ke, iski jagah
   ye naya block paste kar dein.
   ============================================= */
.ihtp-date-range-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ihtp-date-field {
    position: relative;
    display: inline-block;
}
.ihtp-date-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 130px;
    padding: 8px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* Subtle hover/active feel — koi bhi blue background theme/JS se
   aaye to yahan hard-override kar diya hai taake button hamesha
   white/light hi rahe, bas border/shadow se hover ka feel de. */
.ihtp-date-btn:hover,
.ihtp-date-btn:focus,
.ihtp-date-btn.is-active {
    background-color: #fafafa !important;
    border-color: #b3b3b3 !important;
    box-shadow: 0 0 0 1px #0F1829 !important;
    color: inherit !important;
}

.ihtp-date-btn:hover .ihtp-date-label,
.ihtp-date-btn:focus .ihtp-date-label,
.ihtp-date-btn.is-active .ihtp-date-label {
    color: #8a8a8a !important;
}

.ihtp-date-btn:hover .ihtp-date-value,
.ihtp-date-btn:focus .ihtp-date-value,
.ihtp-date-btn.is-active .ihtp-date-value {
    color: #1a1a2e !important;
}
.ihtp-date-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #8a8a8a;
}
.ihtp-date-value {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
}
/* IMPORTANT FIX: native date input ko poori tarah chhupa dein aur
   button ke upar overlay kar dein taake koi neechi "line/box"
   dikhayi na de. !important zaroori hai kyunki theme ka default
   input[type=date] CSS is se stronger specificity ka ho sakta hai. */
.ihtp-date-field input[type="date"].ihtp-date-input-hidden {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    -webkit-appearance: none;
    appearance: none;
    display: block !important;
}
.ihtp-date-clear {
    border: none;
    background: none;
    font-size: 12px;
    text-decoration: underline;
    color: #8a8a8a;
    cursor: pointer;
    padding: 4px 0;
}
.ihtp-date-clear:hover {
    color: #000000;
	background: none;
}




/* =============================================
   IHTP CUSTOM FILTER STYLES
   ============================================= */

.ihtp-filter-wrap {
    font-family: inherit;
    padding: 0;
}

/* ACTIVE CHIPS */
.ihtp-active-filters {
    margin-bottom: 20px;
}

.ihtp-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ihtp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f2f2f2;
    border: 1px solid #d9d9d9;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    color: #1a1a2e;
    font-weight: 500;
    cursor: pointer;
}

.ihtp-chip .ihtp-chip-remove {
    font-size: 16px;
    color: #555;
    cursor: pointer;
    line-height: 1;
}

.ihtp-chip .ihtp-chip-remove:hover {
    color: #000;
}

.ihtp-remove-all {
    background: #D1CFC9;
    color: #0F1829;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-family: 'Nexa', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 8px;
    display: block;
    transition: background 0.2s, color 0.2s;
}

.ihtp-remove-all:hover,
.ihtp-remove-all:active,
.ihtp-remove-all.is-active {
    background: #0F1829;
    color: #FFFFFF;
}

/* FILTER SECTIONS */
.ihtp-filter-section {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}

.ihtp-filter-section:last-child {
    border-bottom: none;
}

/* PRICE SECTION */
.ihtp-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ihtp-price-display {
    font-weight: 700;
    font-size: 18px;
    color: #1a1a2e;
}

/* SECTION TITLE */
.ihtp-filter-title {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a2e;
    margin-bottom: 12px;
}

/* PRICE SLIDER */
.ihtp-price-slider-wrap {
    padding: 0 2px;
}

input[type="range"]#ihtp-price-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    outline: none;
    margin-bottom: 8px;
    background: linear-gradient(to right, #0F1829 0%, #0F1829 var(--ihtp-fill, 100%), #D1CFC9 var(--ihtp-fill, 100%), #D1CFC9 100%);
}

input[type="range"]#ihtp-price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0F1829;
    cursor: pointer;
    border: none;
}

input[type="range"]#ihtp-price-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0F1829;
    cursor: pointer;
    border: none;
}

input[type="range"]#ihtp-price-range::-moz-range-track {
    height: 2px;
    background: transparent;
}

.ihtp-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* CHECKBOXES */
.ihtp-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ihtp-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.ihtp-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1a1a2e;
    cursor: pointer;
    flex-shrink: 0;
}

.ihtp-check-label:hover span {
    color: #1a1a2e;
}

/* ACTIVE / CHECKED STATE - neutral (no blue/purple) */
.ihtp-check-label:has(input:checked) {
    background: #f2f2f2;
    border-radius: 8px;
    padding: 6px 10px;
    margin: -6px -10px;
}

.ihtp-check-label:has(input:checked) span {
    color: #1a1a2e;
    font-weight: 600;
}

/* Fallback for browsers without :has() support */
.ihtp-check-label.is-active {
    background: #f2f2f2;
    border-radius: 8px;
    padding: 6px 10px;
    margin: -6px -10px;
}

.ihtp-check-label.is-active span {
    color: #1a1a2e;
    font-weight: 600;
}
/* VER + BUTTON */
.ihtp-ver-mais {
    background: none;
    border: none;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    text-align: left;
    text-decoration: underline;
}

.ihtp-ver-mais:hover {
    color: #1a1a2e;
}

/* NO PRODUCTS */
.ihtp-no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 15px;
}

/* LOADING */
.ihtp-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* =============================================
   PAGINATION
   Matches the site's existing native "1 2 3 4"
   look: active page bold/black, others grey,
   evenly spaced, hand cursor on hover.
   ============================================= */
.ihtp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 60px 0 10px;
}

.ihtp-pagination .ihtp-page-btn,
.ihtp-pagination .ihtp-page-arrow {
    font-family: inherit;
    font-size: 16px;
    color: #999999;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    transition: color 0.2s;
}

.ihtp-pagination .ihtp-page-btn:hover,
.ihtp-pagination .ihtp-page-arrow:not(.is-disabled):hover {
    color: #1a1a2e;
}

.ihtp-pagination .ihtp-page-btn.is-active {
    color: #0F1829;
    font-weight: 700;
    cursor: default;
    pointer-events: none;
}

.ihtp-pagination .ihtp-page-arrow {
    font-size: 15px;
}

.ihtp-pagination .ihtp-page-arrow.is-disabled {
    color: #d9d9d9;
    cursor: default;
    pointer-events: none;
}

/* =============================================
   MOBILE RESPONSIVE FIX — Horizontal overflow / 
   text cut-off issue (Safe Version)
   ============================================= */

/* 1. Page ko viewport se bahar overflow hone se roko */
html, body {
    overflow-x: hidden !important;
    max-width: 100%;
}

/* 2. Sabhi elements box-sizing border-box mein rakho */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 3. Images/videos/iframes screen se bade na hon */
img, video, iframe, svg {
    max-width: 100% !important;
    height: auto;
}

/* 4. Sirf TEXT widgets (headings/paragraphs) ko safe padding do,
      poori section/container ko nahi — isse hero/full-width
      images edge-to-edge rahenge aur sirf text safe margin lega */
@media (max-width: 768px) {
    .elementor-widget-heading .elementor-widget-container,
    .elementor-widget-text-editor .elementor-widget-container {
        max-width: 100% !important;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box !important;
    }

    /* Agar text negative margin/transform se bahar nikla hua hai */
    .elementor-widget-container h1,
    .elementor-widget-container h2,
    .elementor-widget-container p {
        max-width: 100% !important;
        margin-left: 0 !important;
        transform: none !important;
    }
}




/* mobile filter Css */
/* =============================================
   NAYA: MOBILE FILTER BAR (Figma jaisa)
   Desktop par bilkul hidden, sirf <=768px par dikhega.
   ============================================= */
.ihtp-mobile-filter-bar {
    display: none;
}

@media (max-width: 768px) {

    .ihtp-mobile-filter-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
    }

  .ihtp-mobile-filter-pills {
    display: flex;
    flex-wrap: wrap;      /* CHANGED: ab 2 lines mein wrap hoga */
    gap: 8px;
    row-gap: 10px;         /* NEW: dono lines ke beech thoda extra space */
    overflow-x: visible;   /* CHANGED: scroll hata diya */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
}
.ihtp-mobile-filter-pills::-webkit-scrollbar {
    display: none;
}

    .ihtp-mobile-filter-btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 9px 16px;
        border-radius: 20px;
        border: 1px solid #0F1829;
        background: #0F1829;
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
    }
    .ihtp-mobile-filter-btn .ihtp-mobile-chevron {
        font-size: 15px;
        transition: transform .15s ease;
    }
    .ihtp-mobile-filter-btn.is-open .ihtp-mobile-chevron {
        transform: rotate(180deg);
    }

    /* Sections ko dropdown panel bana do — sirf tab dikhein
       jab unka mobile button click ho */
    .ihtp-filter-wrap {
        position: relative;
    }

    .ihtp-filter-wrap .ihtp-filter-section {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 52px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        padding: 16px;
        z-index: 50;
        max-height: 60vh;
        overflow-y: auto;
    }

    .ihtp-filter-wrap .ihtp-filter-section.ihtp-mobile-open {
        display: block;
    }
}
