/* DNav Search UI — isolated component stylesheet. */

.dnav-modern-search-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,.02);
    box-sizing: border-box;
}

.dnav-search-box-modern {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-width: 0;
    background: var(--dnav-search-bg, #f0f0f1);
    border: 1px solid var(--dnav-search-border, transparent);
    border-radius: 12px;
    padding: 0 12px;
    height: 44px;
    box-sizing: border-box;
}

.dnav-search-box-modern > svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-inline-start: 0;
    margin-inline-end: 8px;
}

.dnav-fast-search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 100%;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #333;
    font-family: inherit;
    font-size: 14px;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.dnav-fast-search-input::placeholder {
    color: #a1a3a8;
}

.dnav-fast-search-results-container {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 101;
    min-height: 0;
    max-height: calc(100dvh - 68px);
    overflow: hidden auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
}

.dnav-fast-search-results-container::-webkit-scrollbar {
    display: none;
}

.dnav-fast-search-results {
    width: 100%;
    box-sizing: border-box;
}

.dnav-search-loading {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    padding: 30px;
    box-sizing: border-box;
}

.dnav-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(239,64,86,.2);
    border-top-color: #ef4056;
    border-radius: 50%;
    animation: dnav-spin 1s linear infinite;
}

.dnav-search-results-list {
    width: 100%;
    padding: 0 0 calc(95px + var(--dnav-margin-bottom, 0px));
    box-sizing: border-box;
}

.dnav-fast-search-results {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 0;
    align-items: stretch;
    box-sizing: border-box;
}

.dnav-search-state-message,
.dnav-p-no-results {
    padding: 30px 20px;
    color: #62666d;
    text-align: center;
    font-size: 14px;
}

.dnav-p-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 15px;
    width: 100%;
    min-height: 148px;
    padding: 14px 15px;
    margin: 0;
    border-bottom: 1px solid #f0f0f1;
    color: inherit;
    text-decoration: none;
    direction: rtl;
    box-sizing: border-box;
    background: #fff;
}

.dnav-p-card:active {
    background: #fafafa;
}

.dnav-p-special-offer {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 52px;
    height: auto;
    z-index: 2;
    pointer-events: none;
}

.dnav-p-image {
    width: 145px;
    height: 120px;
    flex: 0 0 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 13px;
}

.dnav-p-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.dnav-p-details {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 4px 0 0;
}

.dnav-p-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 12px;
    color: #424750;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.8;
    text-align: right;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dnav-p-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    min-height: 22px;
    margin: 0 0 8px;
    direction: rtl;
    font-size: 12px;
    line-height: 1.4;
}

.dnav-p-stock {
    color: #ef4056;
    white-space: nowrap;
}

.dnav-p-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: 0;
    direction: ltr;
    color: #424750;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.dnav-p-rating svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: #f9bc00;
}

.dnav-p-price-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
    direction: ltr;
    text-align: left;
}

.dnav-p-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 28px;
}

.dnav-p-current-price {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    direction: rtl;
    color: #232933;
    white-space: nowrap;
}

.dnav-p-current-value {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.dnav-p-currency {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.dnav-p-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 30px;
    padding: 0 7px;
    border-radius: 15px;
    background: #ef4056;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 30px;
    direction: rtl;
    white-space: nowrap;
    box-sizing: border-box;
}

.dnav-p-old-price-line {
    min-height: 18px;
    margin-top: 2px;
    direction: rtl;
    text-align: left;
}

.dnav-p-old-price-value {
    color: #a1a3a8;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.dnav-p-price-box .price,
.dnav-p-price-box .price ins,
.dnav-p-price-box .price del {
    margin: 0;
}

@media (min-width: 1025px) {
    .dnav-fast-search-results-container {
        overflow-x: hidden;
    }

    .dnav-fast-search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dnav-p-card {
        width: 100%;
        min-width: 0;
        min-height: 148px;
        padding: 14px 15px;
        border-left: 1px solid #f0f0f1;
    }

    .dnav-p-special-offer {
        top: 10px;
        right: 12px;
        width: 52px;
    }

    .dnav-p-image {
        width: 145px;
        height: 120px;
        flex-basis: 145px;
    }
}

@media (min-width: 1200px) {
    .dnav-fast-search-results {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .dnav-spinner {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
