:root {
    --idtm-orange: #ff6a2b;
    --idtm-orange-hover: #ea5520;
    --idtm-dark: #02073e;
    --idtm-dark-2: #07123b;
    --idtm-border: #e5eaf2;
    --idtm-text: #0f172a;
    --idtm-muted: #64748b;
    --idtm-bg: #f6f8fc;
    --idtm-white: #ffffff;
    --idtm-blue: #03a9f4;
}

/* ==========================================
   PAGE WRAPPER & LAYOUT
========================================== */
html, body {
    background-color: var(--idtm-bg);
}

.idtm-wrapper {
    font-family: 'Inter', sans-serif;
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px;
    background: var(--idtm-bg);
    color: var(--idtm-text);
}

.idtm-main-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
    position: relative;
}

.idtm-top-bar {
    margin-bottom: 20px;
    background: var(--idtm-dark);
    padding: 20px;
    border-radius: 15px;
    color: var(--idtm-white);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.idtm-top-bar-p {
    font-size: 20px;
    font-weight: 700;
}

.idtm-top-bar input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--idtm-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    color: black;
}

.idtm-top-bar input:focus {
    border-color: var(--idtm-blue);
}

/* ==========================================
   FILTERS SIDEBAR
========================================== */
.idtm-filters {
    background: var(--idtm-white);
    border: 2px solid var(--idtm-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 160px;
    height: calc(100vh - 180px);
    overflow-y: auto;
    min-width: auto;
}

.idtm-filter-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

#idtm-reset {
    background: none;
    border: none;
    color: #d33400;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.idtm-filter-block {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding: 15px;
    border-radius: 15px;
    background: var(--idtm-dark);
    color: var(--idtm-white);
}

.idtm-filter-block h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--idtm-white);
}

.idtm-filter-block label {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--idtm-white);
    position: relative;
    padding-left: 25px;
}

.idtm-filter-block input[type="checkbox"], 
.idtm-filter-block input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark-box, .checkmark-radio {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--idtm-white);
    border: 2px solid #d1d5db;
    border-radius: 4px;
}

.checkmark-radio {
    border-radius: 50%;
}

.idtm-filter-block input:checked ~ .checkmark-box, 
.idtm-filter-block input:checked ~ .checkmark-radio {
    background-color: var(--idtm-orange);
    border-color: var(--idtm-orange);
}

.checkmark-box:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.idtm-filter-block input:checked ~ .checkmark-box:after {
    display: block;
}

.price-inputs-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-inputs-container input {
    width: 85px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    color: #000;
}

/* ==========================================
   LOCATION SEARCH & LIST
========================================== */
.idtm-location-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #4a5568;
    background: rgba(255,255,255,0.1);
    color: #fff; /* text visibility against dark bg */
    font-size: 13px;
    outline: none;
}

.idtm-location-search::placeholder {
    color: #a0aec0;
}

.idtm-location-search:focus {
    border-color: var(--idtm-orange);
}

.idtm-location-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--idtm-orange) var(--idtm-dark);
}

.idtm-location-list::-webkit-scrollbar {
    width: 5px;
}

.idtm-location-list::-webkit-scrollbar-track {
    background: var(--idtm-dark);
}

.idtm-location-list::-webkit-scrollbar-thumb {
    background-color: var(--idtm-orange);
    border-radius: 20px;
}

/* ==========================================
   TOGGLES & SELECTS
========================================== */
.idtm-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 5px;
}

.idtm-toggle label {
    margin-bottom: 0px;
    padding-left: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--idtm-orange);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.idtm-select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    margin-top: 5px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

.idtm-select option {
    background-color: #1C2120;
    color: #fff;
}

#sort-select {
    padding: 10px 15px;
    border: 2px solid var(--idtm-border);
    border-radius: 8px;
    background-color: var(--idtm-white);
    color: var(--idtm-text);
    font-size: 14px;
    font-weight: 500;
    width: 200px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FF6A2B%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

/* ==========================================
   PRODUCT GRID & CARDS
========================================== */
.idtm-sorting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#res-count {
    color: var(--idtm-white);
    background: #000000;
    border-radius: 15px;
    padding: 5px 10px;
}

#product-grid.idtm-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.idtm-product-card {
    display: flex;
    align-items: stretch;
    flex-direction: row;
    background: var(--idtm-white);
    border: 1px solid #dde5ef;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    z-index: 1;
    overflow: visible; /* CRITICAL: Prevents Tooltips from clipping */
}

.idtm-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    z-index: 5;
    border-color: #cbd5e1;
}

/* LEFT CONTENT AREA */
.card-info {
    flex: 1;
    background: #fff;
    padding: 26px 28px 22px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--idtm-text);
    border-radius: 22px 0 0 22px; /* Maintain rounded edges due to visible overflow */
}

.idtm-ref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}

.ref-item {
    font-family: inherit;
    letter-spacing: 0.2px;
}

.ref-item.pid {
    color: #94a3b8;
}

.ref-item.dc {
    color: #64748b;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.card-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--idtm-dark);
    letter-spacing: -0.03em;
}

/* BADGES */
.idtm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.badge-gaming {
    background: linear-gradient(135deg, #4c1d95, #a855f7); /* Purple */
}

.badge-storage {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6); /* Blue */
}

.badge-gpu {
    background: linear-gradient(135deg, #14532d, #22c55e); /* Green */
}

.card-cpu-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: #64748b;
}

.card-cpu-sub i {
    color: #64748b;
}

/* SPECS CONTAINER */
.card-specs-container {
    width: 100%;
    background: #f8fbff;
    border: 1px solid #b9cbe7;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px; /* FIXED GAP added between spec boxes */
    align-items: stretch;
}

.spec-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 14px;
    position: relative;
    border-radius: 8px;
}

/* Optional: To keep separators alongside gaps */
.spec-box + .spec-box {
    border-left: 1px solid #e6edf5;
}

.spec-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--idtm-orange);
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.spec-details {
    min-width: 0;
}

.spec-details span {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 3px;
}

.spec-details strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--idtm-text);
    white-space: nowrap;
    overflow: hidden;         /* Hides the overflow */
    text-overflow: ellipsis;  /* Adds '...' at the end */
    max-width: 100%;          /* Ensures it doesn't push past the container */
}

/* FEATURES */
.card-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin-top: 2px;
}

.feature-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 10px;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: default;
}

.feature-tag:hover {
    transform: translateY(-1px);
    border-color: #c8d4e3;
    z-index: 20;
}

.feature-tag i {
    color: var(--idtm-orange);
    font-size: 1rem;
}

/* RIGHT ACTION PANEL */
.card-action {
    width: 280px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #050f3b 0%, #02073e 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    border-radius: 0 22px 22px 0; /* Match parent visible overflow */
}

.price-tag {
    font-size: 3.3rem;
    line-height: 1;
    font-weight: 900;
    color: var(--idtm-orange);
    letter-spacing: -0.04em;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-tag span {
    color: var(--idtm-orange) !important;
}

.idtm-support-add {
    font-size: 1rem;
    letter-spacing: 0em;
    margin-bottom: 5px;
}

.price-period {
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 22px;
}

.buy-btn {
    width: 100%;
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, #ff6a2b 0%, #ff5a1f 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(255, 106, 43, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.buy-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #ff5f21 0%, #f24f12 100%);
    box-shadow: 0 14px 28px rgba(255, 106, 43, 0.34);
}

.loc-flag {
    width: 100%;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 600;
}

.loc-flag img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* ==========================================
   TOOLTIPS
========================================== */
.spec-box.has-spec-options::after,
.feature-tag.feature-has-opts::after {
    content: "\f129";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.spec-box.has-spec-options::after {
    top: -5px;
    right: -5px;
    font-size: 10px;
    color: #4a4a4a;
    background: #fff;
    padding: 2px 4px;
    width: 20px;
    height: 20px;
    border: 1px solid #ababab;
}

.feature-tag.feature-has-opts::after {
    top: -6px;
    right: -6px;
    color: #fff;
    background: var(--idtm-orange);
    font-size: 7px;
    width: 15px;
    height: 15px;
}

.spec-box.has-spec-tooltip {
    cursor: help;
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 2px;
}

.spec-box.has-spec-tooltip:hover {
    border-bottom-color: var(--idtm-orange);
}

.custom-tooltip,
.spec-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    width: max-content;
    min-width: 180px;
    max-width: 250px;
    z-index: 9999;
    transition: .2s;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.custom-tooltip {
    bottom: 120%;
}

.spec-tooltip {
    top: 110%;
    background-color: #ffffff;
    color: #333;
    border: 1px solid var(--idtm-border);
    padding: 12px;
    border-radius: 8px;
    max-width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: left;
}

.custom-tooltip:after,
.spec-tooltip:after {
    content: "";
    position: absolute;
    left: 50%;
    margin-left: -6px;
    border-style: solid;
}

.custom-tooltip:after {
    top: 100%;
    border-width: 6px 6px 0;
    border-color: #1f2937 transparent transparent;
}

.spec-tooltip:after {
    bottom: 100%;
    border-width: 0 6px 6px;
    border-color: transparent transparent #ffffff transparent;
    filter: drop-shadow(0 -1px 0 #e2e8f0);
}

.feature-tag:hover .custom-tooltip {
    visibility: visible;
    opacity: 1;
    bottom: 130%;
}

.spec-box.has-spec-tooltip:hover .spec-tooltip {
    visibility: visible;
    opacity: 1;
    top: 120%;
}

.tt-title {
    font-weight: 700;
    color: var(--idtm-orange);
    margin-bottom: 5px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    font-size: 10px;
    text-transform: uppercase;
}

.tt-row, .st-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 3px;
}

.st-row {
    font-size: 12px;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 4px;
}
.st-row:last-child {
    border-bottom: none;
}

.tt-price {
    color: #34d399;
    font-weight: 700;
    margin-left: 10px;
}

.st-opt {
    font-weight: 600;
    color: #1f2937;
}

.st-price {
    color: var(--idtm-orange);
    font-weight: 700;
    margin-left: 5px;
}

/* ==========================================
   ACTIVE FILTERS & MISC
========================================== */
.idtm-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 5px;
}

.active-filter-tag {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.active-filter-tag:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

.active-filter-tag i {
    margin-left: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 12px;
    transition: color 0.2s;
}

.active-filter-tag i:hover {
    color: #ef4444;
}

#no-results {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    background: var(--idtm-dark);
    color: white;
    border-radius: 15px;
}

.idtm-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* ==========================================
   MEDIA QUERIES
========================================== */
@media screen and (max-width: 1550px) {
    .g-new-product-pricing-table-wrapper {
        margin-left: 1% !important;
        margin-right: 1% !important;
        margin-top: 10px !important;
    }
}

@media screen and (max-width: 1400px) {
    .card-action {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
        border-left: none;
        padding-top: 20px;
    }
    .buy-btn {
        width: max-content;
    }
    .price-period {
        margin-bottom: 0px;
    }
}

@media screen and (max-width: 1130px) {
    .idtm-filters {
        top: 100px;
        height: calc(100vh - 120px);
    }
}

@media screen and (max-width: 1120px) {
    .card-cpu-sub {
        display: flex;
        flex-direction: column;
    }
    .card-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .card-specs-container {
        width: max-content;
    }
    .card-specs {
        grid-template-columns: 1fr;
        gap: 15px;
        align-items: center;
        justify-items: center;
    }
    .spec-box + .spec-box {
        border-left: none;
        border-top: 1px solid #e6edf5;
    }
    .card-action {
        flex-wrap: wrap;
        gap: 0px 20px;
    }
}

@media screen and (max-width: 900px) {
    .idtm-main-layout {
        grid-template-columns: 1fr;
        min-width: 100%;
    }
    .idtm-filters {
        position: relative;
        height: 400px;
        top: 0;
        width: 100%;
        max-width: 459px;
        margin: 0 auto;
        display: block;
    }
    .idtm-filter-head, .idtm-filter-block {
        width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
    .idtm-product-card {
        flex-direction: column;
    }
    .card-info {
        padding: 22px;
        border-radius: 22px 22px 0 0;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .card-action {
        width: 100%;
        padding: 22px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        flex-direction: row;
        justify-content: space-between;
        border-radius: 0 0 22px 22px;
        margin-top: 0;
    }
    .price-tag {
        font-size: 2.8rem;
        align-items: flex-start;
    }
    .price-period {
        margin-bottom: 0;
        margin-left: 5px;
        display: inline-block;
    }
    .buy-btn {
        width: auto;
        max-width: 260px;
        padding: 10px 30px;
    }
}

@media screen and (max-width: 768px) {
    .g-new-product-pricing-table-wrapper-title {
        font-size: 1.8rem;
        padding: 0 15px;
    }
    .object-cover .hidden {
        display: none !important;
    }
}

@media screen and (max-width: 520px) {
    .idtm-wrapper {
        padding: 14px;
    }
    .card-title {
        font-size: 1.5rem;
    }
    .spec-box {
        padding: 10px 0;
    }
    .feature-tag {
        width: 100%;
        justify-content: flex-start;
    }
}

@media screen and (max-width: 459px) {
    .card-action {
        display: flex;
        flex-direction: column;
    }
    .idtm-sorting {
        width: 100%;
    }
    .spec-box {
        max-width: 200px;
    }
    #sort-select {
        width: 170px;
    }
    #res-count {
        font-size: 14px;
    }
}

/* ==========================================
   SIDEBAR: LOCATION LIST & FLAGS
========================================== */

/* Main List Container */
.idtm-location-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--idtm-orange) var(--idtm-dark);
}

.idtm-location-list::-webkit-scrollbar { width: 5px; }
.idtm-location-list::-webkit-scrollbar-track { background: var(--idtm-dark); }
.idtm-location-list::-webkit-scrollbar-thumb { background-color: var(--idtm-orange); border-radius: 20px; }

/* Grouping & Rows */
.loc-item-row {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.loc-group {
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.loc-group:last-child {
    border-bottom: none;
}

.loc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Radio Button Labels */
.loc-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 5px 8px 30px; /* 30px leaves room for the absolute checkmark */
    font-size: 14px;
    cursor: pointer;
    position: relative;
    color: #e2e8f0;
    width: 100%;
    transition: color 0.2s;
}

.loc-label:hover {
    color: #fff;
}

.loc-label.main-loc {
    font-weight: 600;
}

/* Hide default radio */
.loc-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Custom Radio Circle */
.loc-label .checkmark-radio {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    background-color: transparent;
    border: 2px solid #6b7280;
    border-radius: 50%;
}

.loc-label input:checked ~ .checkmark-radio {
    border-color: var(--idtm-orange);
    background-color: var(--idtm-orange);
}

/* Sidebar Flags */
.loc-list-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Chevron Toggle Icon */
.loc-toggle {
    color: #9ca3af;
    cursor: pointer;
    font-size: 12px;
    padding: 8px;
    margin-right: 5px;
    transition: transform 0.2s ease, color 0.2s;
    z-index: 5;
}

.loc-toggle:hover {
    color: #fff;
}

.loc-toggle.rotate {
    transform: rotate(180deg);
    color: var(--idtm-orange);
}

/* Nested Cities */
.loc-cities {
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
    border-radius: 4px;
    overflow: hidden;
}

.city-label {
    padding: 6px 5px 6px 50px; /* Extra indent for child cities */
    font-size: 12px;
    color: #94a3b8;
    border-left: 2px solid transparent;
}

.city-label:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Adjust checkmark position for the indented cities */
.city-label .checkmark-radio {
    left: 20px; 
}


/* ==========================================
   PRODUCT CARD: FLAGS & LOCATION
========================================== */
.loc-flag {
    width: 100%;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 600;
}

.loc-flag img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- FIX FOR OVERLAPPING LOCATION RADIO BUTTONS --- */

/* 1. Remove absolute positioning so Flexbox naturally spaces the circle and text */
.loc-label .checkmark-radio {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    flex-shrink: 0; /* Prevents the circle from squishing */
}

/* 2. Reset the main label padding since the circle is now inline */
.loc-label {
    padding-left: 10px !important; 
}

/* 3. Indent the nested city labels smoothly */
.city-label {
    padding-left: 40px !important; /* Adjust this value if you want more/less indent */
}

/* Ensure the H2 is extra bold */
.g-new-product-pricing-table-wrapper-title {
    font-weight: 900 !important;
}

/* Highlight the span text inside the H2 */
.g-new-product-pricing-table-wrapper-title .red {
    color: var(--idtm-orange); /* Keeps the text in your brand color */
    background-color: rgba(255, 106, 43, 0.15); /* Light orange highlight background */
    padding: 2px 10px; /* Gives the highlight some breathing room around the text */
    border-radius: 6px; /* Smooths out the corners of the highlight */
    display: inline-block; /* Ensures the padding applies cleanly without breaking line-height */
}

/* Right-aligned tooltip modifier */
.spec-tooltip.tooltip-right,
.custom-tooltip.tooltip-right {
    left: auto;
    right: 0;
    transform: none;
}

/* Moves the arrow to the right side of the tooltip */
.spec-tooltip.tooltip-right:after {
    left: auto;
    right: 15px; 
    margin-left: 0;
}

.custom-tooltip.tooltip-right:after {
    left: auto;
    right: 15px;
    margin-left: 0;
}

/* GPU Info specific styling inside the sub-header */
.card-cpu-sub .has-spec-tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed #cbd5e1;
    display: inline-flex;
    align-items: center;
    padding-bottom: 2px;
}

.card-cpu-sub .has-spec-tooltip:hover {
    border-bottom-color: var(--idtm-orange);
}

.card-cpu-sub .has-spec-options::after {
    content: "\f129";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
    color: #4a4a4a;
    background: #fff;
    padding: 2px;
    width: 18px;
    height: 18px;
    border: 1px solid #ababab;
    margin-left: 8px;
    position: relative;
    top: auto;
    right: auto;
}

/* ==========================================
   FINAL OVERRIDES (Paste at bottom of CSS)
========================================== */

/* 1. Show the GPU tooltip on hover (This was missing!) */
.card-cpu-sub .has-spec-tooltip:hover .spec-tooltip {
    visibility: visible !important;
    opacity: 1 !important;
    top: 130%;
    z-index: 9999;
}

/* 2. Allow long specs (like bandwidth) to wrap gracefully instead of cutting off with '...' */
.spec-details strong {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.3;
}

/* 3. Ensure extra-long prices and add-ons wrap nicely inside the action panel */
.price-tag {
    width: 100%;
}

.price-tag span {
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: center;
    line-height: 1.2;
}

.idtm-support-add {
    margin-top: 5px;
}