/* =========================================================
   GADGET SYSTEM FRONTEND
   Premium / Minimal / Theme-Proof
   WooCommerce-first
   ========================================================= */

.gadget-products-catalog,
.gadget-products-catalog * {
    box-sizing: border-box;
}

.gadget-products-catalog {
    width: 100%;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* PRODUCT GRID / CARDS */
.gadget-pricelist-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.gadget-pricelist-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e5e5e7;
    border-radius: 18px;
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gadget-pricelist-card:hover {
    transform: translateY(-2px);
    border-color: #d2d2d4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .035);
}

.gadget-pricelist-image-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}

.gadget-pricelist-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
}

.gadget-pricelist-image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover;
    transition: opacity .18s ease, transform .18s ease;
}

/* CONDITIONS */
.gadget-pricelist-condition,
.product-condition-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.gadget-pricelist-condition {
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 5;
    padding: 6px 9px;
}

.gadget-pricelist-condition.condition-pre-owned,
.gadget-pricelist-condition.condition-preowned,
.product-condition-badge.condition-pre-owned,
.product-condition-badge.condition-preowned {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #333;
}

/* WARRANTY LABEL — intentionally unstyled; Elementor/theme controls it. */

/* COLORS */
.gadget-pricelist-card-colors {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gadget-pricelist-colors {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    pointer-events: auto;
}

.gadget-pricelist-color,
.product-color-dot {
    position: relative;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    flex: 0 0 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(0, 0, 0, .16) !important;
    border-radius: 50% !important;
    box-shadow: inset 0 0 0 2px #fff !important;
    appearance: none !important;
    cursor: pointer;
    outline: none !important;
}

.gadget-pricelist-color.selected,
.gadget-pricelist-color:hover,
.product-color-dot.color-selected {
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px rgba(0, 0, 0, .42) !important;
}

.gadget-pricelist-color-tooltip,
.product-color-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 30;
    display: block;
    width: max-content;
    max-width: 180px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.gadget-pricelist-color-tooltip::after,
.product-color-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 8px;
    height: 8px;
    background: #111;
    transform: translateX(-50%) rotate(45deg);
}

@media (min-width: 768px) {
    .gadget-pricelist-color:hover .gadget-pricelist-color-tooltip,
    .product-color-dot:hover .product-color-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
}

.gadget-pricelist-color.tooltip-visible .gadget-pricelist-color-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* CONTENT / PRICE */
.gadget-pricelist-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.gadget-pricelist-brand {
    margin: 0 0 5px;
    color: #86868b;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gadget-pricelist-name {
    margin: 0 !important;
    color: #111;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.gadget-pricelist-name-link,
.gadget-pricelist-name-link:visited {
    color: inherit !important;
    text-decoration: none !important;
}

.gadget-pricelist-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 31px;
    margin-top: 10px;
}

.gadget-pricelist-regular-price {
    color: #8b8b90;
    font-size: 12px;
    text-decoration: line-through;
}

.gadget-pricelist-current-price {
    color: #111;
    font-size: 19px;
    font-weight: 700;
    transition: opacity .15s ease, transform .15s ease;
}

.gadget-pricelist-divider {
    width: 100%;
    height: 1px;
    margin: 17px 0;
    background: #eee;
}

/* OPTIONS */
.gadget-pricelist-option {
    margin-bottom: 16px;
}

.gadget-pricelist-option-label,
.product-option-label {
    margin-bottom: 8px;
    color: #222;
    font-size: 12px;
    font-weight: 600;
}

.gadget-pricelist-option-buttons,
.product-connectivity-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.gadget-pricelist-option-button,
.product-connectivity-option {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 6px 11px !important;
    border: 1px solid #d9d9dc !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}

.gadget-pricelist-option-button:hover,
.product-connectivity-option:hover {
    border-color: #999 !important;
}

.gadget-pricelist-option-button.selected,
.product-connectivity-option.connectivity-selected {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
}

/* ACTION BUTTONS */
.gadget-pricelist-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
    padding-top: 3px;
}

.gadget-pricelist-button,
.messenger-product-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    transition: opacity .15s ease, transform .15s ease, border-color .15s ease;
}

.gadget-pricelist-button:active,
.messenger-product-button:active {
    transform: scale(.985);
}

.gadget-pricelist-inquire,
.messenger-product-button {
    gap: 7px;
    border: 1px solid #087be8 !important;
    background: #087be8 !important;
    color: #fff !important;
}

.gadget-pricelist-inquire::before,
.messenger-product-button::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.477 2 2 6.145 2 11.259c0 2.913 1.453 5.51 3.723 7.207V22l3.402-1.868c.908.251 1.873.386 2.875.386 5.523 0 10-4.145 10-9.259S17.523 2 12 2zm.994 12.469-2.547-2.718-4.969 2.718 5.465-5.804 4.906-2.718-5.465 5.804z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.477 2 2 6.145 2 11.259c0 2.913 1.453 5.51 3.723 7.207V22l3.402-1.868c.908.251 1.873.386 2.875.386 5.523 0 10-4.145 10-9.259S17.523 2 12 2zm.994 12.469-2.547-2.718-4.969 2.718 5.465-5.804z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gadget-pricelist-view,
.gadget-pricelist-view:hover {
    border: 1px solid #d8d8da !important;
    background: #fff !important;
    color: #111 !important;
}

/* CATALOG TOOLBAR */
.gadget-products-toolbar {
    width: 100%;
    margin: 0 auto 48px;
    text-align: center;
}

.gadget-products-search-wrap {
    position: relative;
    width: min(100%, 560px);
    margin: 0 auto 18px;
}

.gadget-products-search {
    width: 100%;
    height: 50px;
    margin: 0 !important;
    padding: 0 18px 0 47px !important;
    border: 1px solid #d9d9dc !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: #111 !important;
    outline: none !important;
    box-shadow: 0 3px 14px rgba(0,0,0,.025) !important;
}

.gadget-products-search:focus {
    border-color: #111 !important;
    box-shadow: 0 0 0 1px #111, 0 4px 18px rgba(0,0,0,.035) !important;
}

.gadget-products-categories {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.gadget-products-category {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    border: 1px solid #d9d9dc !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer;
    box-shadow: none !important;
}

.gadget-products-category.is-active,
.gadget-products-category.is-active:hover {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
}

.gadget-products-category-select-wrap { display: none; }
.gadget-products-section { width: 100%; margin-bottom: 68px; }
.gadget-products-section-title { margin: 0 !important; color: #111; font-size: 28px !important; }
.gadget-products-section-description { margin: 7px 0 22px; color: #86868b; font-size: 14px; }
.gadget-products-empty { display: none; width: 100%; padding: 60px 20px; color: #86868b; text-align: center; }

/* HEADER SEARCH */
.gadget-header-search { position: relative; z-index: 1000; }
.gadget-header-search-trigger,
.gadget-header-search-trigger:hover,
.gadget-header-search-trigger:focus,
.gadget-header-search-trigger:active {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #111 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    transform: none !important;
}

.gadget-header-search-trigger svg { width: 20px !important; height: 20px !important; display: block; }

.gadget-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 72px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.gadget-search-overlay.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.gadget-search-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gadget-search-panel {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 40px), 760px);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 25px 80px rgba(0,0,0,.14);
    transform: translateY(-8px);
    transition: transform .18s ease;
}

.gadget-search-overlay.is-open .gadget-search-panel { transform: translateY(0); }

.gadget-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 64px;
    border-bottom: 1px solid #e5e5e7;
    background: #fff;
}

.gadget-header-search-input,
.gadget-header-search-input:hover,
.gadget-header-search-input:focus {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 60px 0 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    background: transparent !important;
    color: #111 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.gadget-header-search-input::placeholder { color: #9a9a9f !important; opacity: 1 !important; }
.gadget-header-search-input::-webkit-search-cancel-button { appearance: none; -webkit-appearance: none; }

.gadget-search-close,
.gadget-search-close:hover,
.gadget-search-close:focus,
.gadget-search-close:active {
    position: absolute !important;
    top: 50% !important;
    right: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #f5f5f7 !important;
    color: #555 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    line-height: 32px !important;
    text-align: center !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    transform: translateY(-50%) !important;
}

.gadget-search-close:hover { background: #e9e9eb !important; color: #111 !important; }

.gadget-search-results { width: 100%; padding: 14px 0 18px; background: #fff; }
.gadget-search-group { padding: 0 18px; }
.gadget-search-group + .gadget-search-group { margin-top: 12px; }
.gadget-search-group-title { margin: 8px 4px 7px; color: #86868b; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.gadget-search-result,
.gadget-search-result:hover,
.gadget-search-result:focus {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 9px 8px;
    border: 0 !important;
    border-radius: 11px;
    background: transparent;
    color: #111 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background-color .15s ease;
}

.gadget-search-result:hover { background: #f5f5f7; }
.gadget-search-result-image { display:flex; align-items:center; justify-content:center; width:46px; height:46px; flex:0 0 46px; overflow:hidden; border-radius:9px; background:#f5f5f7; }
.gadget-search-result-image img { width:100%; height:100%; object-fit:cover; }
.gadget-search-result-content { min-width:0; flex:1; }
.gadget-search-result-title { display:block; overflow:hidden; color:#111 !important; font-size:13px; font-weight:600; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.gadget-search-result-arrow { flex:0 0 auto; color:#a0a0a5; font-size:15px; }
.gadget-search-empty,.gadget-search-loading { padding:42px 25px; color:#86868b; font-size:13px; line-height:1.5; text-align:center; }
body.gadget-search-open { overflow: hidden; }

/* Elementor popup close: neutralize the loud pink accent while preserving Elementor behavior. */
.elementor-popup-modal .dialog-close-button,
.elementor-popup-modal .dialog-close-button:hover,
.elementor-popup-modal .dialog-close-button:focus,
.elementor-popup-modal .dialog-close-button:active {
    color: #555 !important;
    background: #f5f5f7 !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

@media (max-width: 1024px) {
    .gadget-pricelist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .gadget-pricelist-grid { grid-template-columns: 1fr; gap: 22px; }
    .gadget-products-toolbar { position: sticky; top: 0; z-index: 50; margin: 0 0 30px; padding: 10px 0 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .gadget-products-categories { display: none !important; }
    .gadget-products-category-select-wrap { display: block; width: 100%; }
    .gadget-products-category-select { width: 100%; height: 48px; padding: 0 15px; border: 1px solid #d9d9dc; border-radius: 11px; background: #fff; }
    .gadget-pricelist-content { padding: 17px; }
    .gadget-pricelist-color,.product-color-dot { width:24px!important; height:24px!important; min-width:24px!important; max-width:24px!important; min-height:24px!important; max-height:24px!important; }
    .gadget-pricelist-color-tooltip,.product-color-tooltip { font-size:10px; padding:6px 9px; }
    .gadget-products-section-title { font-size:25px!important; }
    .gadget-search-overlay { padding-top:62px; }
    .gadget-search-panel { width:calc(100% - 20px); max-height:calc(100vh - 80px); border-radius:15px; }
    .gadget-search-input-wrap { height:58px; }
    .gadget-header-search-input,.gadget-header-search-input:hover,.gadget-header-search-input:focus { padding:0 55px 0 17px!important; font-size:16px!important; }
    .gadget-search-close,.gadget-search-close:hover,.gadget-search-close:focus,.gadget-search-close:active { right:12px!important; width:32px!important; height:32px!important; }
    .gadget-search-group { padding:0 12px; }
    .gadget-search-result { min-height:56px; padding:8px 7px; }
    .gadget-search-result-image { width:44px; height:44px; flex-basis:44px; }
}
