:root {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', 'Helvetica Neue', Arial, sans-serif;
    --search-btn-bg: #ffffff;
    --search-btn-hover-bg: #d1d1d6;
    --search-icon-fill: #8e8e93;
}

body.theme-light {
    --modal-bg: #ffffff;
    --input-bg: #f2f2f7;
    --text-primary: #000000;
    --text-muted: #6e6e73;
    --suggestion-bg: #f2f2f7;
    --suggestion-hover-bg: #e5e5ea;
    --scrollbar-bg: #e5e5ea;
    --theme-icon-fill: #000000;
}

body.theme-dark {
    --modal-bg: #000000;
    --input-bg: #2c2c2e;
    --text-primary: #ffffff;
    --text-muted: #8e8e93;
    --suggestion-bg: #1c1c1e;
    --suggestion-hover-bg: #3a3a3c;
    --scrollbar-bg: #2c2c2e;
    --theme-icon-fill: #ffffff;
}



#menu-toggle {
    position: relative;
}

.ios-search-btn {
    background: var(--search-btn-bg);
    border: 1px solid rgba(204, 204, 204, 0.49);
    border-radius: 18%;
    width: 48px;
    height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    right: 29px;
    cursor: pointer;
    z-index: 1000;
}

.ios-search-btn:hover {
    background: var(--search-btn-hover-bg);
}

.ios-search-btn svg {
    fill: var(--search-icon-fill);
}

.ios-modal {
    position: fixed;
    inset: 0;
    background: rgb(255 255 255 / 80%);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.ios-modal.hidden {
    display: none;
    opacity: 0;
}

.ios-modal-content {
    background: var(--modal-bg);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
    position: relative;
}

@media (max-width: 640px) {
    .ios-modal-content {
        width: 95%;
        padding: 16px;
        border-radius: 16px;
    }
}

@keyframes slideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ios-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ios-close-btn:hover {
    color: var(--text-primary);
}

.ios-theme-toggle {
    margin-bottom: 16px;
}

.ios-theme-btn {
    background: var(--suggestion-bg);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ios-theme-btn.active {
    background: #007aff;
}

.ios-theme-btn svg {
    fill: var(--theme-icon-fill);
}

.ios-theme-btn:hover {
    background: var(--suggestion-hover-bg);
}

.ios-modal-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .ios-modal-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
}

body.theme-light .woo-ajax-search-input {
    color: #000000 !important;
    background: #f2f2f7 !important;
    border: 1px solid #e9e9e9 !important;
}

body.theme-dark .woo-ajax-search-input {
    color: #ffffff !important;
    background: #2c2c2e !important;
    border: 1px solid #444 !important;
}

.woo-ajax-search-input {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 18px;
    outline: none;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.woo-ajax-search-input:focus {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.woo-ajax-search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.ios-suggestions {
    margin-bottom: 16px;
}

.ios-suggestion-item {
    padding: 8px 12px;
    background: var(--suggestion-bg);
    color: var(--text-primary);
    font-size: 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ios-suggestion-item:hover {
    background: var(--suggestion-hover-bg);
}

.ios-results {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--scrollbar-bg);
}

.ios-result-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.ios-result-link {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.ios-product-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 16px;
}

.ios-product-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

.ios-price-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.ios-text-muted {
    color: var(--text-muted);
    font-size: 16px;
    margin: 4px 0 0 0;
    line-height: 1.5;
}

.ios-loading {
    text-align: center;
    padding: 10px;
}

.ios-section-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 16px 0 12px;
}

.ios-info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    line-height: 1.5;
    transition: transform 0.15s ease;
}

.ios-info-icon:hover,
.ios-info-icon:focus {
    transform: scale(1.15);
    outline: none;
}

.ios-product-img.ios-img-placeholder {
    background-color: #f0f0f0;
    min-height: 100px;
}

.ios-product-img {
    max-width: 100px;
    height: auto;
}

.ios-info-icon svg {
    stroke: var(--text-muted);
    transition: stroke 0.15s ease;
    width: 18px;
    height: 18px;
}

.ios-info-icon:hover svg,
.ios-info-icon:focus svg {
    stroke: var(--text-primary);
}

.ios-tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%) scale(0.95);
    background: var(--suggestion-bg);
    color: var(--text-primary);
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 10;
    white-space: nowrap;
    max-width: 300px;
    text-overflow: ellipsis;
    overflow: hidden;
}

.ios-tooltip strong {
    font-weight: 600;
}

@media (max-width: 768px) {
    .ios-tooltip {
        top: calc(100% + 8px);
        left: 0;
        transform: translateX(0) scale(0.95);
        white-space: normal;
        max-width: 240px;
        text-overflow: clip;
    }

    .ios-tooltip.visible {
        transform: translateX(0) scale(1);
    }
}