/* homepage/static/homepage/css/custom_styles.css - Pandora Inspired Theme */
/* --- General Styles --- */
body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fefefe;
    color: #555;
}
.main-content-container {
    max-width: 1320px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}
h1, h2 {
    font-family: Georgia, serif;
    text-align: center;
    color: #607d8b;
    margin-bottom: 20px;
}
h1 { font-size: 2.5em; }
h2 { font-size: 1.8em; }
/* --- Old Header and Navigation Styles --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px;
    background-color: #e0e7e9;
    color: #555;
}
.header h1 {
    margin-bottom: 0;
    color: #5a4a42;
    text-shadow: none;
    font-size: 2.5em;
}
.header .nav a {
    color: #607d8b;
    text-shadow: none;
}
/* --- General Navigation Link Styles --- */
.nav a {
    color: #607d8b;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.nav a:hover {
    color: #333;
    text-decoration: underline;
}
.main-content-container.no-navbar-padding {
    padding-top: 20px !important;
}
.main-content-container.no-navbar-padding .alert-container {
    padding: 0 20px;
    margin-top: 10px;
    margin-bottom: 20px;
}
.main-content-container.no-navbar-padding h2 {
    margin-top: 0;
    padding-top: 0;
    text-align: center;
}
/* --- Form Styles (Password Gate & Search) --- */
form {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 8px;
}
form p {
    margin-bottom: 8px;
    width: 100%;
    text-align: left;
}
form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}
/* --- Specific Styling for Back to Search buttons --- */
.back-to-search-btn {
    background-color: #e9ecef;
    color: #343a40 !important;
    border-color: #e9ecef;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    font-size: 1em;
}
.back-to-search-btn:hover {
    background-color: #dae0e5;
    border-color: #dae0e5;
    color: #343a40;
}
form button {
    background-color: #BB86FC !important;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    font-weight: bold;
    width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
    position: static !important;
    z-index: auto !important;
    height: auto !important;
    line-height: normal !important;
    box-sizing: border-box !important;
}
form button:hover {
    background-color: #A06ACC !important;
}
.search-input-group {
    width: 100%;
    margin-bottom: 0;
}
.filter-container {
    width: 100%;
    margin-bottom: 0;
}
.filter-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    flex-grow: 0; flex-shrink: 0;
}
.filter-group p {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}
.material-filters, .brand-filters {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.filter-group label {
    margin-right: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}
.filter-group label input[type="checkbox"] {
    margin-right: 5px;
    margin-bottom: 0;
}
/* --- Search Results Styles --- */
.search-results {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}
.search-results .row p.col-12 {
    text-align: center !important;
}
.main-content-container .row {
    margin-left: 0;
    margin-right: 0;
}
.main-content-container .col {
    padding-left: var(--bs-gutter-x, 0.75rem);
    padding-right: var(--bs-gutter-x, 0.75rem);
}
.search-results .row.g-0.gx-1 .col {
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
    padding-top: 0.1rem !important;
    padding-bottom: 0.1rem !important;
}
.search-results .row.g-0.gx-1 {
    margin-left: -0.1rem !important;
    margin-right: -0.1rem !important;
}
/* MODIFIED: Charm Item Styles */
.col .charm-grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    background-color: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px !important;
    height: auto;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}
.col .charm-grid-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #c0c0c0;
}
/* --- THE FINAL IMAGE BOX FIX --- */
.charm-image-wrapper {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 250px; /* NEW: Forces the box to exist regardless of aspect-ratio logic */
    position: relative;
    overflow: hidden;
    display: block !important;
    background-color: #f8f9fa; 
}
.charm-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    /* 'contain' ensures the whole charm is visible without cropping */
    object-fit: cover !important; 
    padding: 2px; /* Adds breathing room inside the square */
}
/* --- Button Colors --- */
.add-want, .add-want-detail { background-color: #fff; color: #BB86FC; border: 1px solid #BB86FC; }
.add-want:hover, .add-want-detail:hover { background-color: #f0f0f0; color: #BB86FC; border-color: #BB86FC; }
.remove-want, .remove-want-detail { background-color: #BB86FC; color: #fff; border: 1px solid #BB86FC; }
.remove-want:hover, .remove-want-detail:hover { background-color: #A06ACC; color: #fff; border-color: #A06ACC; }
.add-have, .add-have-detail { background-color: #fff; color: #64B5F6; border: 1px solid #64B5F6; }
.add-have:hover, .add-have-detail:hover { background-color: #f0f0f0; color: #64B5F6; border-color: #64B5F6; }
.remove-have, .remove-have-detail { background-color: #64B5F6; color: #fff; border: 1px solid #64B5F6; }
.remove-have:hover, .remove-have-detail:hover { background-color: #42A5F5; color: #fff; border-color: #42A5F5; }
/* --- Charm Detail Page Styles --- */
.charm-detail-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.charm-detail-image {
    max-width: 300px;
    width: 100%;
    margin-bottom: 20px;
    order: 1;
    text-align: center;
}
.charm-detail-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.charm-detail-data { flex-grow: 1; order: 2; width: 100%; margin-top: 0; }
.charm-detail-data table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.charm-detail-data th, .charm-detail-data td { padding: 10px 0; text-align: left; border-bottom: 1px dotted #eee; }
.charm-detail-data th { width: 180px; font-weight: bold; color: #607d8b; }
.charm-detail-data td { color: #555; }
/* --- Helpful Links --- */
.helpful-links ul { list-style: none; padding-left: 0; margin-bottom: 10px; text-align: center; }
.helpful-links li { margin-bottom: 10px; }
.helpful-links a { color: #007bff; text-decoration: underline; transition: color 0.3s ease; font-weight: bold; font-size: 1.1em; }
.helpful-links a:hover { color: #0056b3; text-decoration: underline; }
/* ===== NEW HEADER AND FOOTER STYLES ===== */
.site-header { background-color: #4B0082; }
.site-header .navbar-brand { font-weight: bold; font-size: 1.5rem; color: #ffffff; }
.site-header .navbar-brand:hover { color: #e0e0e0; }
.site-header .navbar-brand .total-charms-count { font-size: 0.8rem !important; margin-left: 0.6em; font-weight: normal; color: rgba(255, 255, 255, 0.7) !important; }
.site-header .nav-link { color: #f0f0f0 !important; padding: 0.75rem 0.75rem; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: #ffffff !important; }
.site-header .navbar-text { color: #d0d0d0 !important; margin-right: 0.5rem; font-weight: bold; padding-left: 0.75rem; padding-right: 0.75rem; }
.site-header .logout-button { color: #f0f0f0 !important; text-decoration: none !important; background-color: transparent !important; border: none !important; outline: none !important; box-shadow: none !important; padding: 0.75rem 0.5rem !important; text-align: left; display: block; width: 100%; cursor: pointer; }
.site-header .logout-button:hover { color: #ffffff !important; background-color: transparent !important; }
.site-header .navbar-nav .nav-item { border-right: 1px solid rgba(255, 255, 255, 0.2); }
.site-header .navbar-nav .nav-item:last-child { border-right: none; }
.site-header .navbar-nav .nav-item #logout-form { display: flex; align-items: center; height: 100%; }
.site-header .navbar-nav .nav-item #logout-form .logout-button { padding-left: 0.75rem !important; padding-right: 0.75rem !important; height: 100%; display: flex; align-items: center; }
@media (max-width: 991.98px) {
    .site-header .navbar-nav .nav-item { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .site-header .navbar-nav .nav-item:last-child { border-bottom: none; }
}
#logout-form { background-color: transparent !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; display: flex; align-items: center; width: 100%; }
.site-header .navbar-toggler { border-color: rgba(255, 255, 255, 0.25); }
.site-footer { background-color: #4B0082; color: #f0f0f0; font-size: 0.9rem; }
.site-footer p { margin-bottom: 0; }
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { color: #e0e0e0; text-decoration: underline; }
/* --- Responsive Styles --- */
@media (min-width: 576px) {
    .search-form { padding: 20px; }
    .search-input-group, .filter-container { width: 100%; margin-bottom: 0; }
    .filter-group { flex-direction: column; margin-bottom: 0; }
    .material-filters, .brand-filters { display: flex; flex-direction: column; gap: 5px; }
    .filter-group p { margin-right: 10px; margin-bottom: 0; }
    .search-form button { margin-top: 0; margin-left: auto; margin-right: auto; }
    .search-results .row.g-1 > .col { padding-left: 1px !important; padding-right: 1px !important; }
    .search-results .row.g-1 { margin-left: -1px !important; margin-right: -1px !important; }
    .col .charm-grid-item { display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
}
.search-form .form-control-lg { padding: 0.75rem 1.25rem; font-size: .8em; height: auto; }
.filter-card { border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.filter-card .card-header { background-color: #ede4fb; border-bottom: 1px solid #d0c0f0; padding: 0; }
.filter-card .card-header button.filter-toggle { color: #fff; font-weight: bold; padding: 1rem 1.25rem; font-size: 1em; background-color: transparent; border: none; cursor: pointer; text-align: center; }
.filter-card .card-header button.filter-toggle:hover { color: #4b0082; background-color: #d0c0f0; }
.filter-toggle .filter-icon { font-size: 0.8em; transition: transform 0.3s ease-in-out; }
.filter-toggle[aria-expanded="true"] .filter-icon { transform: rotate(180deg); }
.filter-card .card-body { padding: 1.5rem; }
.filter-group { margin-bottom: 1rem; }
.filter-group:last-child { margin-bottom: 0; }
.filter-title { font-weight: bold; color: #555; margin-bottom: 0.8rem; font-size: 1.05em; border-bottom: 1px dashed #eee; padding-bottom: 0.4rem; }
.filter-options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.5rem; }
.filter-options-grid .form-check { margin-bottom: 0; }
.filter-options-grid .form-check-input { margin-top: 0.35rem; }
.filter-options-grid .form-check-label { margin-left: 0.25rem; }
.search-form .btn-lg { padding: 0.75rem 1.5rem; font-size: 1.25rem; background-color: #BB86FC !important; border-color: #BB86FC !important; }
.search-form .btn-lg:hover { background-color: #A06ACC !important; border-color: #A06ACC !important; }
@media (max-width: 767.98px) {
    .filter-card .card-body .row.g-3 { flex-direction: column; }
    .filter-group { margin-bottom: 1.5rem; }
}
@media (min-width: 768px) { .filter-card .card-body .row.g-3 { gap: 2rem; } }
/* Further adjustments for very small screens (phones) */
@media (max-width: 480px) {
    .search-form { gap: 10px; padding: 15px; }
    .search-input-group, .filter-container, .filter-group { margin-bottom: 10px; }
    .filter-group label { margin-bottom: 5px; }
    .material-filters, .brand-filters { gap: 5px; }

    /* Restoration of the tighter grid spacing */
    .search-results .row.g-1 > .col { 
        padding-left: 1px !important; 
        padding-right: 1px !important; 
    }
    .search-results .row.g-1 { 
        margin-left: -1px !important; 
        margin-right: -1px !important; 
    }

    /* THE FIX: Reverting to the responsive square method */
    .charm-image-wrapper {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        min-height: 250px; /* NEW: Forces the box to exist regardless of aspect-ratio logic */
        position: relative;
        overflow: hidden;
        display: block !important;
        background-color: #f8f9fa; 
    }
    .charm-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Keeps the charm filling the box */
        padding: 2px !important; /* Larger charm look */
    }

    .charm-detail-image { 
        max-width: 250px !important; /* Doubled from 125px for detail */
        width: 90% !important;
        margin: 0 auto 20px auto !important; /* Centers the charm */
        display: block !important;
    }

    .charm-detail-image img {
        width: 100% !important;
        height: auto !important;
        border: 1px solid #eee !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important; /* Adds depth */
    }
    .charm-detail-data th { width: 120px; }
    .charm-detail-data th, .charm-detail-data td { padding: 8px 0; }

    .col .charm-grid-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
    }
/* Shrink and clamp long titles like 'Monsters Inc. Door' */
    .charm-grid-item a strong,
    .charm-grid-item .card-title {
        font-size: 0.75rem !important; /* Smaller, readable footprint */
        line-height: 1.2 !important;
        height: 2.4em !important; /* Forces exactly two lines of height */
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-align: center !important;
    }
    .want-have-bar {
        height: 70px !important;
    }

    /* 2. Make the inner container stretch the full height */
    .qty-column-inner {
        justify-content: space-between !important;
        height: calc(100% - 4px) !important;
    }

    /* 3. Stretch the stepper to fill the box */
    .stepper {
        flex-grow: 1 !important;
        height: 40px !important;
        border-radius: 0 0 4px 4px !important; /* Flush with the bottom of the card */
    }

    /* 4. Increase button tap area for mobile */
    .stepper button {
        height: 100% !important;
        font-size: 1.2rem !important;
        flex-grow: 1 !important;
    }
    .vault-manager .qty-column .stepper {
        flex-direction: row !important; /* Forces horizontal regardless of other rules */
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 40px !important;
    }

    /* Ensure buttons don't stack on top of each other */
    .vault-manager .qty-column .stepper button {
        width: 35px !important;
        height: 100% !important;
        flex: none !important;
    }

    /* Center the number horizontally */
    .vault-manager .qty-column .quantity-display {
        flex-grow: 1 !important;
        text-align: center !important;
    }
}

/* --- Conditional Stepper Labels & Tints --- */
.qty-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 54px; 
    transition: background-color 0.3s ease; /* Smooth fade for the tint */
}

/* Background Tints: These now fill the whole cell */
.qty-column:has(.stepper.want) { background-color: rgba(187, 134, 252, 0.08) !important; }
.qty-column:has(.stepper.have) { background-color: rgba(100, 181, 246, 0.08) !important; }

/* REFINED LABEL SYSTEM: Forcibly remove pseudo-labels from image_f7a1e9.png */
.qty-column::before, .qty-column:has(.stepper)::before,
.qty-column:first-child:has(.stepper)::before,
.qty-column:last-child:has(.stepper)::before {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
}

/* Force the base "Want/Have" buttons to fill the entire column height */
.qty-column .charm-list-button {
    flex-grow: 1; 
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important; 
    border: none !important;
    padding: 0;
    margin: 0;
}

/* Explicit HTML Label Styling */
.qty-column-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.stepper-label {
    font-size: 0.65rem;
    font-weight: bold;
    margin-bottom: 2px;
    text-align: center;
    display: block !important; /* Ensures visibility across all views */
    visibility: visible !important;
}

.want-label { color: #BB86FC; }
.have-label { color: #64B5F6; }

.qty-column:first-child { border-right: 1px solid #eee; }

/* Stepper Internal Layout */
.stepper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 36px !important;
    width: 100% !important;
    font-size: 0.9rem !important;
    overflow: hidden !important;
    background-color: transparent !important;
    /* ADD THESE TWO LINES HERE */
    border: 1px solid transparent !important;
    border-radius: 4px !important;
}

.stepper button { 
    border: none; 
    background: rgba(0, 0, 0, 0.03); 
    width: 30px; 
    height: 100%; 
    cursor: pointer; 
    font-weight: bold; 
    transition: background 0.2s ease; 
}

.stepper button:hover { background: rgba(0, 0, 0, 0.08); }

/* Color-coding for the Numbers */
.stepper.want { 
    color: #BB86FC !important; 
    /* ADD THESE TWO LINES */
    border-color: #BB86FC !important;
    background-color: rgba(187, 134, 252, 0.05) !important;
}
.stepper.have { 
    color: #64B5F6 !important; 
    /* ADD THESE TWO LINES */
    border-color: #64B5F6 !important;
    background-color: rgba(100, 181, 246, 0.05) !important;
}

.quantity-display { 
    font-weight: bold; 
    flex-grow: 1;
    text-align: center;
    background-color: transparent !important; 
}
/* --- Ensure Detail Buttons Match Search Style --- */

/* Purple style for WANT buttons */
.qty-column .charm-list-button.want {
    color: #BB86FC !important;
    border: none !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Blue style for HAVE buttons */
.qty-column .charm-list-button.have {
    color: #64B5F6 !important;
    border: none !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Force buttons to be as tall as the stepper containers */
.qty-column .charm-list-button {
    height: 100% !important;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: bold;
    border-radius: 4px; 
}
/* Fix Table Alignment for Inventory/Wishlist */
.table {
    table-layout: fixed; 
    width: 100%;
}

/* Vertical center everything in the row */
.table td, .table th {
    vertical-align: middle !important;
}

/* Lock the interaction columns so they never shift */
.table td.qty-column, 
.table th:nth-child(3), 
.table th:nth-child(4) {
    width: 160px !important; 
    text-align: center;
    padding: 0 !important; 
}

/* Ensure the stepper buttons stay centered under the headers */
.table td.qty-column .stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70px; 
    margin: 0;
}

/* Allow the Name column to take up all remaining space */
.table th:nth-child(2), .table td:nth-child(2) {
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ============================================================
   VAULT GRID LOCKDOWN
   ============================================================ */

/* 1. Shrink the card container */
.main-content-container .card {
    max-width: 250px !important; 
    margin-left: auto !important; 
    margin-right: auto !important; 
    height: 100% !important;
}

/* 2. Tighten the Image Box */
.main-content-container .card-img-top {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    background-color: #f8f9fa !important;
    padding: 10px !important; 
}

.main-content-container .card-img-top img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important; 
}

/* 3. Tighten text for smaller footprint */
.main-content-container .card-body {
    padding: 0.5rem !important;
    flex-grow: 1 !important;
}

.main-content-container .card-title {
    font-size: 0.85rem !important; 
    margin-bottom: 0.25rem !important;
}

/* 4. Ensure buttons stay aligned at the bottom */
.main-content-container .card-footer {
    margin-top: auto !important;
    padding: 0 !important;
}

/* Isolated Table Styles - Single Stepper Mode */
.vault-manager table.table {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Precise Widths for Desktop */
.vault-manager .col-photo { width: 80px !important; text-align: center; }
.vault-manager .col-name  { width: auto !important; }
.vault-manager .col-qty   { width: 180px !important; text-align: center; }

.vault-manager .qty-column {
    display: table-cell !important;
    padding: 0 !important; 
    height: 1px !important; /* The 'stretch' trigger */
    vertical-align: stretch !important;
}

.vault-manager .qty-column .qty-column-inner {
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important; /* Flush edges */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important; 
    padding: 8px 5px !important;
}

/* Keep the Stepper centered and horizontal */
.vault-manager .qty-column .stepper {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: space-between !important;
    height: 40px !important;
    width: 100% !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .vault-manager table.table { table-layout: auto !important; }
    .vault-manager .col-qty { width: 100px !important; }
    .vault-manager .qty-column {
        display: table-cell !important; 
        height: 1px !important; /* Forces the cell to recognize row height */
        padding: 0 !important;
        vertical-align: stretch !important;
    }

    /* 2. Force the colored box to fill the entire cell height */
    .vault-manager .qty-column .qty-column-inner {
        height: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        /* Pushes label to top and stepper to bottom to fill the space */
        justify-content: center !important; 
        padding: 8px 5px !important;
        margin: 0 !important;
        border-radius: 0 !important; /* Flush with table borders */
    }

    /* 3. Keep the stepper horizontal and centered */
    .vault-manager .qty-column .stepper {
        flex-direction: row !important;
        height: 40px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* 4. Ensure buttons stay consistent */
    .vault-manager .qty-column .stepper button {
        width: 35px !important;
        height: 100% !important;
        flex: none !important;
    }
    .vault-manager .qty-column .quantity-display {
        flex-grow: 1 !important;
        line-height: 40px !important;
    }
}
/* ============================================================
   FINAL UNIFIED INTERACTION BAR - HEIGHT LOCK
   ============================================================ */

/* 1. The Main Container: Forced Height and Flex alignment */
.want-have-bar {
    width: 100% !important;
    display: flex !important;
    border-top: 1px solid #eee !important;
    background: #fff !important;
    height: 64px !important; /* Forces uniform height across the grid */
    margin-top: 0 !important;
}

/* 2. Column Logic: Vertical stacking for labels + buttons */
.qty-column, .qty-column-inner {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
}

.qty-column-inner {
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    margin: 2px !important; /* Provides the 'flush' gap between columns */
    height: calc(100% - 4px) !important; /* Offsets the margin */
    transition: all 0.2s ease;
}

.qty-column-inner:has(.want), .qty-column-inner:has(.want-label) {
    border-color: #BB86FC !important;
    background-color: rgba(187, 134, 252, 0.05) !important;
}

.qty-column-inner:has(.have), .qty-column-inner:has(.have-label) {
    border-color: #64B5F6 !important;
    background-color: rgba(100, 181, 246, 0.05) !important;
}

.qty-column:first-child { border-right: 1px solid #eee !important; }

/* 3. The Interactive Elements: Locked to the same height */
.charm-list-button, .stepper {
    width: 100% !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important; /* Border is now handled by the parent */
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
}

.stepper.want {
    color: #BB86FC !important;
    background-color: rgba(187, 134, 252, 0.05) !important;
}

.stepper.have {
    color: #64B5F6 !important;
    background-color: rgba(100, 181, 246, 0.05) !important;
}

/* 4. The Labels: Forced Visibility */
.stepper-label {
    display: block !important;
    font-size: 0.6rem !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    margin-bottom: 2px !important;
    line-height: 1 !important;
}

.want-label { color: #BB86FC !important; }
.have-label { color: #64B5F6 !important; }

/* 5. Stepper UI Stability */
.stepper button {
    width: 30px !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.04) !important;
    cursor: pointer !important;
    border: none !important; /* Ensure internal buttons don't have borders */
}

.quantity-display {
    font-weight: bold !important;
    flex-grow: 1 !important;
    text-align: center !important;
}
/* If only ONE column is present (Inventory/Wishlist), force it to fill 100% */
.want-have-bar:not(:has(.qty-column + .qty-column)) .qty-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    border-right: none !important;
}

/* Ensure labels stay visible in single-column mode */
.want-have-bar:not(:has(.qty-column + .qty-column)) .stepper-label {
    display: block !important;
    visibility: visible !important;
}
/* Ensure the stepper fills the 100% width */
.want-have-bar:not(:has(.qty-column + .qty-column)) .qty-column-inner {
    width: 100% !important;
}
