/* ============================================================
   Treeno UX/UI audit overrides — treeno.shop
   Loaded after the main theme bundles; scoped where possible.
   ============================================================ */

/* ---------- 1. Prominent search bar (mobile) ---------- */
.treeno-mobile-search {
    display: none;
}

@media (max-width: 991px) {
    .treeno-mobile-search {
        display: block;
        padding: 10px 15px;
        background: #fff;
        border-bottom: 1px solid #eef1ef;
    }

    .treeno-mobile-search form {
        position: relative;
        margin: 0;
    }

    .treeno-mobile-search .treeno-ms-icon {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        inset-inline-start: 15px;
        color: #16a34a;
        display: flex;
        pointer-events: none;
    }

    .treeno-mobile-search input {
        width: 100%;
        height: 46px;
        border: 1.5px solid #dfe7e2;
        border-radius: 12px;
        background: #f4f8f5;
        padding: 0 16px 0 44px;
        font-size: 14px;
        color: #1c2b22;
        outline: none;
        transition: border-color .2s ease, background .2s ease;
    }

    .rtl .treeno-mobile-search input {
        padding: 0 44px 0 16px;
    }

    .treeno-mobile-search input:focus {
        border-color: #16a34a;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(22, 163, 74, .10);
    }

    .treeno-mobile-search input::placeholder {
        color: #8aa093;
    }
}

/* ---------- 2. Reduced slider height ---------- */
.home-section-wrap .home-slider-wrap {
    height: 400px !important;
}

@media (max-width: 991px) {
    .home-section-wrap .home-slider-wrap {
        height: 300px !important;
    }
}

@media (max-width: 767px) {
    .home-section-wrap .home-slider-wrap {
        height: 230px !important;
    }
}

/* ---------- 3. Category chips row ---------- */
.treeno-chips-wrap {
    padding: 12px 0 2px;
}

.treeno-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 15px 8px;
}

.treeno-chips::-webkit-scrollbar {
    display: none;
}

.treeno-chip {
    flex: 0 0 auto;
    padding: 8px 18px;
    border: 1px solid #d8e2dc;
    border-radius: 999px;
    background: #fff;
    color: #243b2f;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.treeno-chip:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* ---------- 4. Product cards ---------- */
/* Soften the Out of Stock badge so it stops dominating the card */
.product-card .product-badge .badge-danger {
    background: #f1f5f3 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    font-weight: 600;
}

/* Mobile: full-width Add to Cart with label */
.treeno-atc-text {
    display: none;
}

@media (max-width: 767px) {
    .product-card .product-card-bottom {
        flex-wrap: wrap;
    }

    .product-card .product-card-bottom .product-price {
        margin-bottom: 8px;
    }

    .product-card .btn-add-to-cart {
        width: 100%;
        height: 38px;
        gap: 7px;
        border-radius: 9px;
    }

    .product-card .btn-add-to-cart .treeno-atc-text {
        display: inline;
        font-size: 12.5px;
        font-weight: 600;
        letter-spacing: .2px;
    }
}

/* ---------- 6. Quick-add button on product thumbnails ---------- */
.product-card .product-card-top {
    position: relative;
}

.treeno-quick-add {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%) translateY(6px);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 16px;
    border: none;
    border-radius: 999px;
    background: rgba(22, 163, 74, .96);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(10, 40, 24, .28);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, background .2s ease, visibility .2s;
    white-space: nowrap;
}

.treeno-quick-add:hover {
    background: #15803d;
}

.product-card .product-card-top:hover .treeno-quick-add,
.treeno-quick-add:focus-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 991px) {
    .treeno-quick-add {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        height: 30px;
        padding: 0 12px;
        font-size: 11.5px;
        bottom: 8px;
    }
}

@media (max-width: 480px) {
    .treeno-quick-add span {
        display: none;
    }

    .treeno-quick-add {
        width: 32px;
        padding: 0;
        gap: 0;
    }
}

/* ---------- 7. Product care block ---------- */
.treeno-care-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 24px;
    margin: 18px 0;
    padding: 16px 22px;
    background: #f4f5ec;
    border: 1px solid #e7e9d9;
    border-radius: 14px;
}

.treeno-care-title {
    font-size: 16px;
    font-weight: 700;
    color: #1c2b22;
    line-height: 1.3;
    max-width: 140px;
}

.treeno-care-items {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.treeno-care-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.treeno-care-icon {
    flex: 0 0 auto;
    display: flex;
}

.treeno-care-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.treeno-care-text strong {
    font-size: 14.5px;
    font-weight: 700;
    color: #1c2b22;
}

.treeno-care-text small {
    font-size: 12.5px;
    color: #6b7a70;
}

.treeno-care-divider {
    width: 1px;
    height: 38px;
    background: #d6dac4;
}

@media (max-width: 576px) {
    .treeno-care-block {
        padding: 14px 16px;
        gap: 12px 16px;
    }

    .treeno-care-title {
        max-width: none;
        width: 100%;
    }

    .treeno-care-items {
        justify-content: space-between;
        width: 100%;
        gap: 12px;
    }
}

/* ---------- 8. Guarantee / delivery estimate block ---------- */
.treeno-assurance {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0;
}

.treeno-assurance-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.treeno-assurance-guarantee {
    background: #ffd84d;
}

.treeno-assurance-support {
    background: #ffe98f;
    justify-content: space-between;
}

.treeno-assurance-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.treeno-assurance-text {
    font-size: 14.5px;
    font-weight: 700;
    color: #1c2b22;
}

.treeno-assurance-tnc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-inline-start: auto;
    font-size: 13px;
    font-weight: 600;
    color: #1c2b22;
    text-decoration: none;
}

.treeno-assurance-tnc:hover {
    text-decoration: underline;
}

.treeno-assurance-pair {
    display: flex;
    align-items: center;
    gap: 12px;
}

.treeno-estimate {
    margin-top: 6px;
}

.treeno-estimate-title {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: #1c2b22;
    margin-bottom: 8px;
}

.treeno-estimate-row {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.treeno-estimate-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    border: none;
    outline: none;
    padding: 0 16px;
    font-size: 14px;
    color: #1c2b22;
}

.treeno-estimate-input::placeholder {
    color: #98a2b3;
}

.treeno-estimate-btn {
    flex: 0 0 auto;
    border: none;
    background: #fff;
    color: #15803d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .8px;
    padding: 0 20px;
    cursor: pointer;
    border-inline-start: 1px solid #e2e8f0;
    transition: background .2s ease;
}

.treeno-estimate-btn:hover {
    background: #f0fdf4;
}

.treeno-estimate-result {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #15803d;
}

.treeno-estimate-result.show {
    display: block;
}

.treeno-estimate-result.error {
    color: #e04438;
}

/* ---------- 9. Sidebar category menu (icon rows) ---------- */
.sidebar-menu-wrap .tab-content {
    background: #fbfaf6;
}

#category-menu .sidebar-menu {
    padding: 10px 0 18px;
}

#category-menu .sidebar-menu li {
    display: flex;
    align-items: center;
    position: relative;
    margin: 1px 10px;
    padding: 0 12px 0 10px;
    min-height: 50px;
    border-radius: 12px;
    transition: background .15s ease;
}

#category-menu .sidebar-menu li:hover,
#category-menu .sidebar-menu li.active {
    background: #f0f5f1;
}

#category-menu .sidebar-menu li a.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0 !important;
    padding: 8px 0;
    line-height: 1.3 !important;
    font-size: 14.5px;
    font-weight: 500;
    color: #243b2f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#category-menu .sidebar-menu .menu-item-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e7f2ea;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

#category-menu .sidebar-menu li > i.las {
    flex: 0 0 auto;
    margin-inline-start: auto;
    padding-inline-start: 10px;
    color: #9aa8a0;
    font-size: 13px;
}

#category-menu .sidebar-menu li ul {
    margin: 0 !important;
    padding: 0 0 6px 44px;
}

#category-menu .sidebar-menu li ul li {
    margin: 0;
    padding: 0 8px 0 0;
    min-height: 38px;
}

#category-menu .sidebar-menu li ul li a.menu-item {
    font-size: 13.5px;
    font-weight: 400;
    padding: 6px 0;
}

/* ---------- 5. Mobile bottom navigation ---------- */
.treeno-bottom-nav {
    display: none;
}

@media (max-width: 991px) {
    body {
        padding-bottom: 62px;
    }

    .treeno-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        background: #fff;
        border-top: 1px solid #e8ecea;
        box-shadow: 0 -2px 14px rgba(15, 40, 26, .07);
    }

    .treeno-bottom-nav .treeno-bn-item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 0 7px;
        border: none;
        background: none;
        color: #5f6f66;
        font-size: 10.5px;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
        position: relative;
    }

    .treeno-bottom-nav .treeno-bn-item.active {
        color: #16a34a;
    }

    .treeno-bottom-nav .treeno-bn-item svg {
        width: 21px;
        height: 21px;
    }

    .treeno-bottom-nav .treeno-bn-count {
        position: absolute;
        top: 3px;
        inset-inline-end: calc(50% - 22px);
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        background: #16a34a;
        color: #fff;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
    }
}
