: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 (UNIFIED ALIGNMENT FIX)
========================================== */
.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);
}

/* Unified Flexbox Layout for ALL Sidebar Labels */
.idtm-filter-block label {
    display: flex;
    align-items: center; 
    gap: 10px; 
    padding-left: 0; 
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--idtm-white);
    position: relative;
}

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

/* Unified Custom Checkbox/Radio Styling */
.checkmark-box, .checkmark-radio {
    position: relative; 
    flex-shrink: 0; 
    height: 18px;
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    background-color: transparent; 
    border: 2px solid #6b7280; 
    border-radius: 4px;
    transition: all 0.2s ease;
}

.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: 4px;
    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 (FIXED BG & COLOR)
========================================== */
.idtm-location-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px;
    outline: none;
}

.idtm-location-search::placeholder {
    color: #64748b !important;
}

.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; }

.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;
}

.loc-label {
    display: flex;
    align-items: center;
    gap: 10px; /* Matched gap perfectly with other sidebars */
    padding: 6px 0; /* Aligns perfectly with the rest */
    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;
}

.loc-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

/* Fixed the squished line bug by forcing min-width and min-height */
.loc-label .checkmark-radio {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    flex-shrink: 0;
    height: 16px;
    width: 16px;
    min-width: 16px !important;
    min-height: 16px !important;
    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);
}

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

.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); }

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

.city-label {
    padding-left: 40px !important;
    font-size: 12px;
    color: #94a3b8;
    border-left: 2px solid transparent;
}

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

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

/* Protects the specific toggle switch from standard label flex overrides */
.idtm-filter-block label.switch {
    display: inline-block;
    margin-bottom: 0;
    padding-left: 0;
}

.switch {
    position: relative;
    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
========================================== */
.g-new-product-pricing-table-wrapper-title {
    font-weight: 900 !important;
}

.g-new-product-pricing-table-wrapper-title .red {
    color: var(--idtm-orange);
    background-color: rgba(255, 106, 43, 0.15);
    padding: 2px 10px;
    border-radius: 6px;
    display: inline-block;
}

.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;
}

.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;
}

.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: 700;
    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); }
.badge-storage { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.badge-gpu { background: linear-gradient(135deg, #14532d, #22c55e); }

/* Container holding CPU and GPU */
.card-cpu-sub {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 12px;
    width: 100%;
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: #64748b;
}

.card-cpu-sub > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Premium GPU Badge Design - Light Green & Yellow Theme */
.idtm-gpu-tag {
    display: inline-flex;
    align-items: center;
    background: #f8fbff; /* Soft Light Green */
    border: 1px solid #dfdfdf; /* Slightly darker green border */
    color: #eda600; /* Deep, readable golden-yellow */
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    max-width: 100%;
    line-height: 1.3;
}

.idtm-gpu-tag i.fa-bolt {
    color: #ffb300; /* Vibrant golden-yellow for the lightning bolt */
    margin-right: 8px;
    font-size: 1rem;
}

.idtm-gpu-tag strong {
    color: #eda600; /* Bold golden-yellow for the "GPU:" label */
    font-weight: 900;
    margin-right: 4px;
}

/* GPU Badge Hover & Tooltip Styling */
.idtm-gpu-tag.has-spec-tooltip {
    cursor: help;
    border: 1px dashed #eda600; /* Yellow dashed border to indicate hoverability */
    background: #f8fbff; /* Slightly more vibrant green */
    transition: background 0.2s ease, border-color 0.2s ease;
}

.idtm-gpu-tag.has-spec-tooltip:hover {
    background: #f8fbff; /* Deepens the green slightly on hover */
}

/* The small 'i' info circle */
.idtm-gpu-tag.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: #fff;
    background: #d48806; /* Matches the vibrant yellow */
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Force tooltip to render cleanly below the new badge */
.idtm-gpu-tag:hover .spec-tooltip {
    visibility: visible;
    opacity: 1;
    top: 130%;
    z-index: 9999;
}

/* 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;
    align-items: stretch;
}

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

.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;
}

/* FIX FOR VERTICAL SQUISHING: Use word-wrap properly */
.spec-details strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--idtm-text);
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100%;
    line-height: 1.2;
}

/* 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;
}

.price-tag {
    width: 100%;
    font-size: 3rem;
    line-height: 1;
    font-weight: 700;
    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;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: center;
    line-height: 1.2;
}

.idtm-support-add {
    font-size: 1rem;
    letter-spacing: 0em;
    margin-bottom: 5px;
    margin-top: 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 {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    min-width: 0; /* Critical for Flexbox truncation */
    cursor: help; /* Shows the user they can hover for more info */
}

.loc-flag img {
    width: 28px;
    height: 20px;
    border-radius: 0px; /* Removed border radius as requested */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    object-fit: cover;
    flex-shrink: 0; /* Prevents the flag from getting squished by long text */
}

.loc-flag span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.loc-flag strong {
    color: #fff;
    font-weight: 700;
}

/* ==========================================
   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: 8px;
}

.request-form-box {
    box-shadow: 0 20px 40px rgb(223 223 223) !important;
}

.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%;
}

/* GPU Tooltip Styles */
.card-cpu-sub .has-spec-tooltip {
    position: relative;
    cursor: help;
    display: inline-flex;
    align-items: center;
}

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

.card-cpu-sub .has-spec-tooltip:hover .spec-tooltip {
    visibility: visible !important;
    opacity: 1 !important;
    top: 130%;
    z-index: 9999;
}

.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;
}

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

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

.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;
}

.custom-hidden {
    display: none !important;
}

/* ==========================================
   COUPON BOX STYLING (UPDATED)
========================================== */
.idtm-coupon-box {
    background: rgba(255, 106, 43, 0.1);
    border: 1px dashed var(--idtm-orange);
    border-radius: 8px;
    padding: 8px 10px;
    width: 100%;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-bottom: 14px; 
}

.idtm-coupon-box:hover {
    background: rgba(255, 106, 43, 0.2);
    transform: translateY(-1px);
}

.idtm-coupon-box .coupon-lbl {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

.idtm-coupon-box .coupon-code-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.idtm-coupon-box .coupon-code {
    font-size: 15px;
    color: var(--idtm-orange);
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
}

.idtm-coupon-box i {
    font-size: 13px;
    color: var(--idtm-orange);
    transition: color 0.2s ease;
}

.idtm-results {
    min-width: 0; /* Crucial: Allows the grid column to shrink below its content's intrinsic size */
    width: 100%;
}

/* ==========================================
   cPANEL HIGHLIGHT STYLING
========================================== */
.idtm-cpanel-highlight {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    margin-top: -10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.idtm-cpanel-highlight i {
    color: var(--idtm-orange);
}

.idtm-cpanel-highlight strong {
    color: #fff;
    font-weight: 800;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES (Cleaned & Unified)
========================================== */

/* --- 1560px --- */
@media screen and (max-width: 1560px) {
    .g-new-product-pricing-table-wrapper {
        margin-left: 1% !important;
        margin-right: 1% !important;
        margin-top: 10px !important;
    }
    .idtm-main-layout {
        grid-template-columns: 300px 1fr;
        gap: 20px;
    }
    .card-info {
        padding: 20px;
    }
    .card-action {
        width: 240px; 
        padding: 20px 15px;
    }
    .card-specs {
        gap: 10px; 
    }
    .spec-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        font-size: 16px;
    }
}

/* --- 1440px --- */
@media screen and (max-width: 1440px) {
    .idtm-main-layout {
        grid-template-columns: 250px 1fr;
    }
    .price-inputs-container input {
        width: 70px;
        font-size: 12px;
    }
    .card-action {
        width: 220px;
    }
    .card-specs {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .price-tag {
        font-size: 2.5rem;
    }
    .buy-btn {
        padding: 12px 14px;
        font-size: 1rem;
    }
}

/* --- 1280px (STACK THE LAYOUT) --- */
@media screen and (max-width: 1280px) {
    .idtm-product-card {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    .card-info {
        border-radius: 22px 22px 0 0;
        border-right: none;
        border-bottom: 1px solid #dde5ef;
    }
    .card-action {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap; /* NEW: Allows price and button to wrap instead of forcing a wider container */
        justify-content: center;
        align-items: center;
        border-left: none;
        border-radius: 0 0 22px 22px;
        padding: 20px 30px;
        background: linear-gradient(90deg, #050f3b 0%, #02073e 100%); 
        gap: 20px;
    }
    .price-tag {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 0;
        width: auto;
    }
    .price-period {
        margin-bottom: 0;
        margin-left: 10px;
    }
    .buy-btn {
        width: auto;
        min-width: 200px;
        margin: 0 15px;
    }
    .loc-flag {
        margin-top: 0;
        border-top: none;
        width: auto;
        border-left: 1px solid rgba(255,255,255,0.14);
        padding-left: 20px;
    }
    .idtm-coupon-box {
        margin-bottom: 0;
        width: auto;
    }
    .idtm-results {
        max-width: 100%;
        min-width: 0; /* Back-up assertion to ensure shrinking */
    }
}

/* --- 1200px --- */
@media screen and (max-width: 1200px) {
    .idtm-main-layout {
        grid-template-columns: 240px 1fr; 
    }
    .card-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .card-cpu-sub {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- 900px (Sidebar Moves Top) --- */
@media screen and (max-width: 900px) {
    .idtm-main-layout {
        grid-template-columns: 1fr;
    }
    .idtm-filters {
        position: relative;
        top: 0;
        height: auto;
        max-height: 450px;
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 15px;
        overflow-y: auto;
    }
    .idtm-filter-head {
        grid-column: 1 / -1;
        width: 100%;
    }
    .idtm-filter-block {
        margin-bottom: 0;
        width: 100%;
    }
    .card-action {
        flex-wrap: wrap;
        gap: 15px;
    }
    .price-inputs-container input {
        width: 85px;
        font-size: 16px;
    }
}

/* --- 768px --- */
@media screen and (max-width: 768px) {
    .g-new-product-pricing-table-wrapper-title {
        font-size: 1.8rem;
        padding: 0 15px;
    }
}

/* --- 720px --- */
@media screen and (max-width: 720px) {
    .idtm-filters {
        grid-template-columns: 1fr; 
    }
    .card-specs {
        grid-template-columns: 1fr; 
    }
    .card-action {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .price-tag {
        justify-content: center;
    }
    .loc-flag {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.14);
        padding-left: 0;
        padding-top: 15px;
        width: 100%;
    }
    .buy-btn, .idtm-coupon-box {
        width: 100%;
        max-width: 300px;
    }
    .load-more-wrapper {
        flex-direction: column;
    }
}

/* --- 450px --- */
@media screen and (max-width: 450px) {
    .idtm-wrapper {
        padding: 10px;
    }
    .card-info {
        padding: 15px;
    }
    .card-title {
        font-size: 1.5rem;
    }
    .price-tag {
        font-size: 2.2rem;
    }
    .buy-btn {
        max-width: calc(100% - 50px);
    }
    .feature-tag {
        width: 100%;
        justify-content: flex-start;
    }
    .idtm-sorting {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        max-width: calc(100vw - 50px);
    }
    #sort-select {
        width: 100%;
    }
    .idtm-filters {
        max-width: calc(100vw - 50px);
    }
    .idtm-product-card {
        max-width: calc(100vw - 50px);
    }
}

/* --- 320px --- */
@media screen and (max-width: 320px) {
    .price-tag {
        font-size: 1.8rem;
    }
    .card-action {
        padding: 15px;
    }
    .spec-icon {
        display: none; 
    }
}

.location-box .container {
    padding-top: 80px !important;
}

/* ==========================================
   BILLING CYCLE LIGHT TOOLTIP (BOTTOM RIGHT ALIGNED)
========================================== */
.billing-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: -85%; /* Sets the base position so it doesn't jump */
    top: 150%; 
    background: #ffffff;
    color: #1f2937;
    padding: 12px;
    border: 1px solid var(--idtm-border);
    border-radius: 8px;
    width: max-content;
    min-width: 180px;
    max-width: 250px;
    z-index: 9999;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: left;
}

/* Upward pointing arrow perfectly centered under the icon */
.billing-tooltip:after {
    content: "";
    position: absolute;
    bottom: 100%;
    /* Use left instead of right to align it with your -85% shift */
    left: 10%; 
    transform: translateX(-50%); /* Centers the arrow exactly on that 85% mark */
    border-style: solid;
    border-width: 0 6px 6px;
    border-color: transparent transparent #ffffff transparent;
    filter: drop-shadow(0 -1px 0 #e2e8f0);
}

/* Hover state to show the tooltip */
.has-tooltip:hover .billing-tooltip {
    visibility: visible;
    opacity: 1;
    top: 130%; 
    left: -85%;
}

/* Light Theme Inner Styles */
.billing-tooltip .tt-title {
    color: var(--idtm-orange);
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
}

.billing-tooltip .tt-opt {
    color: #475569; 
    font-weight: 600;
}

.billing-tooltip .tt-price {
    color: #10b981; 
    font-weight: 800;
}