
.manticore-live-search-container {
    position: relative;
    max-width: 500px; 
    --manticore-btn-bg: #f68a34;
    --manticore-btn-bg-hover: #e07b2f;
    --manticore-control-height: 36px; /* unified height for input and button */
}

.e-search-form {
    display: flex;
    align-items: stretch;
}

.e-search-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: stretch;
}

.manticore-live-search-container .manticore-search-input.e-search-input {
    width: 100%;
    border-radius: 10px;
    font-family: "Noto Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid #f68a3466;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    padding: 4px 10px;
    height: auto;
    min-height: 32px;
    box-sizing: border-box;
}

.manticore-live-search-container .manticore-search-input.e-search-input::placeholder {
    color: rgba(109, 103, 118, 0.37);
}

.manticore-live-search-container .manticore-search-input.e-search-input:focus {
    outline: none;
}

.manticore-live-search-container .e-search-submit {
    font-family: "Noto Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    background-color: var(--manticore-btn-bg);
    border-radius: 0 6px 6px 0;
    padding: 4px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: auto;
    min-height: 32px;
    box-sizing: border-box;
    border-top: 1px solid var(--manticore-btn-bg);
    border-right: 1px solid var(--manticore-btn-bg);
    border-bottom: 1px solid var(--manticore-btn-bg);
    border-left: 0;
}

.manticore-live-search-container .e-search-submit:hover {
    background-color: var(--manticore-btn-bg-hover);
}

.e-search-submit svg {
    width: 15px;
    height: 15px;
}

/* Dropdown Styles */
.manticore-live-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 650px;
    overflow-y: auto;
}

/* Results List */
.manticore-live-results-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.manticore-live-results-list li a {
    display: flex;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}
.manticore-live-results-list li:last-child a {
    border-bottom: none;
}
.manticore-live-results-list li a:hover {
    background-color: #f7f7f7;
}

/* Product Image in Dropdown */
.manticore-result-thumb {
    width: 50px;
    height: 50px;
    min-width: 50px;
    margin-right: 15px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.manticore-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Product Title and Price */
.manticore-live-results-list .manticore-result-content {
    flex-grow: 1;
}

.manticore-live-results-list .manticore-result-title {
    font-weight: 500;
    color: #333;
    font-size: 12px;
    line-height: 1.3;
}

.manticore-live-results-list .manticore-result-price {
    font-size: 0.7em;
    font-weight: bold;
    color: #f68a34;
    margin-left: 15px;
    white-space: nowrap;
    
}

/* "No Results" Message */
.manticore-no-results {
    padding: 15px;
    text-align: center;
    color: #888;
}

/* "View All Results" Button */
.manticore-view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f68a34 0%, #e07b2f 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(246, 138, 52, 0.3);
}

.manticore-view-all-btn:hover {
    background: linear-gradient(135deg, #e07b2f 0%, #d06a1f 100%);
    color: #fff;
    box-shadow: 0 4px 8px rgba(246, 138, 52, 0.4);
    transform: translateY(-1px);
}

.manticore-view-all-btn::after {
    content: '→';
    font-size: 14px;
}

/* Normalize input and button heights and appearance */
.manticore-live-search-container .manticore-search-input.e-search-input,
.manticore-live-search-container .e-search-submit {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    line-height: 1.2;
    box-sizing: border-box;
}

.manticore-live-search-container .e-search-submit,
.manticore-live-search-container .manticore-search-input.e-search-input {
    align-self: stretch;
}

/* Mobile: increase tap target height */
@media (max-width: 767px) {
  .manticore-live-search-container .manticore-search-input.e-search-input,
  .manticore-live-search-container .e-search-submit {
    min-height: 38px;
  }
}


/* ========================================
   Manticore Related Products Cards
   (стиль ідентичний AI агенту)
   ======================================== */

.manticore-related-section,
.elementor-shortcode .manticore-related-section,
section.manticore-related-section {
    margin: 32px 0;
    width: 100%;
}

.manticore-related-title,
.manticore-related-section h2.manticore-related-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    margin: 0 0 20px !important;
    letter-spacing: -0.02em;
    text-transform: none !important;
}

/* Product Cards Grid */
.manticore-products-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 16px !important;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Product Card */
.manticore-product-card,
.manticore-products-grid .manticore-product-card {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.manticore-product-card:hover {
    border-color: #f68a34;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.manticore-product-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.manticore-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #fff;
}

.manticore-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
    line-height: 1.4;
    color: #1d1d1f;
}

.manticore-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.manticore-card-title a:hover {
    color: #f68a34;
}

.manticore-card-brand {
    font-size: 11px;
    color: #86868b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Product Specs */
.manticore-card-specs {
    margin-bottom: 12px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 10px;
    min-height: 70px;
    max-height: 70px;
    overflow: hidden;
}

.manticore-spec-item {
    color: #6b7280;
    line-height: 1.3;
    margin-bottom: 2px;

    /* Prevent long values from blowing up the card */
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    /* no single-line truncation */
    white-space: normal;
}

.manticore-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    margin-top: auto;
    min-height: 32px;
}

.manticore-card-price {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.manticore-card-price span {
    font-size: 12px;
    font-weight: 400;
    color: #86868b;
}

.manticore-card-stock {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.manticore-card-stock.in-stock {
    background: #ecfdf5;
    color: #059669;
}

.manticore-card-stock.on-order {
    background: #fef3c7;
    color: #d97706;
}

.manticore-card-btn {
    width: 100%;
    padding: 10px 14px;
    background: #f68a34;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.manticore-card-btn:hover {
    background: #e07b2f;
}

.manticore-card-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1200px) {
    .manticore-products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .manticore-products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .manticore-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .manticore-product-card img {
        height: 120px;
        padding: 12px;
    }
    
    .manticore-card-body {
        padding: 12px;
    }
    
    .manticore-card-specs {
        min-height: 60px;
        max-height: 60px;
    }
}

/* ========================================
   Elementor/Woo fallback alignment (only when custom card is enabled)
   ======================================== */
body.manticore-custom-card-enabled .elementor-wc-products ul.products li.product {
    --button-align-display: flex !important;
    --button-align-direction: unset !important;
    --button-align-justify: unset !important;

    padding: 0 !important;
}
