/* ===================================== */
/* === STICKY HEADER TOTAL STYLES ====== */
/* ===================================== */

.vibe-header-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: center;
    background: #fff;
    border: 2px solid var(--vibe-primary);
    padding: 0.45rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: auto;
    max-width: 100%;
    margin-bottom: 5px;
    margin-right: 60px;
    /* Increased to 60px to safely clear the close button */
}

.vibe-header-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--vibe-gray-900);
    line-height: 1;
}

.vibe-header-price .woocommerce-Price-amount {
    color: var(--vibe-gray-900);
}

.vibe-header-cod-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.vibe-header-cod-badge .material-icons-round {
    font-size: 16px;
}

.vibe-header-spacer {
    display: none;
}

/* ===================================== */
/* === UPSELL SLIDER CARDS STYLES ====== */
/* ===================================== */

.vibe-upsell-section {
    margin-top: 0.5rem;
    padding-top: 0.25rem;
    border-top: none;
}

.vibe-upsell-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--vibe-gray-700);
    margin-bottom: 0.35rem;
}

.vibe-upsell-header .material-icons-round {
    font-size: 16px;
    color: var(--vibe-primary);
}

.vibe-upsell-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--vibe-gray-300) transparent;
    -webkit-overflow-scrolling: touch;
}

.vibe-upsell-slider::-webkit-scrollbar {
    height: 3px;
}

.vibe-upsell-slider::-webkit-scrollbar-thumb {
    background-color: var(--vibe-gray-300);
    border-radius: 2px;
}

/* New Card Layout: Horizontal Flex */
.vibe-upsell-card {
    flex: 0 0 auto;
    width: 180px;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--vibe-gray-200);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    scroll-snap-align: start;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: visible;
    direction: ltr;
    position: relative;
}

.vibe-upsell-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* Image Wrapper (Left) */
.vibe-upsell-img-wrapper {
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    background: #f9fafb;
}

.vibe-upsell-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Name Wrapper (Middle) - Name + Price Stacked */
.vibe-upsell-name-wrapper {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.vibe-upsell-card-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vibe-gray-800);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
    white-space: normal;
    /* Allow wrapping */
    text-align: left;
    /* Ensure text aligns left in LTR mode */
}

/* Actions Column (Right) - Price Only */
.vibe-upsell-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
    min-width: auto;
}

/* Add Button - Corner Icon */
.vibe-upsell-add-btn {
    position: absolute !important;
    bottom: 4px;
    right: 4px;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--vibe-gray-500);
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: none !important;
    z-index: 2;
}

.vibe-upsell-add-btn:hover {
    background: transparent;
    transform: scale(1.1);
    color: var(--vibe-primary);
    /* Color on hover */
}

.vibe-upsell-add-btn .material-icons-round {
    font-size: 20px;
    /* Slightly larger icon since no box */
}

.vibe-upsell-add-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.vibe-upsell-add-btn.added {
    color: #2e7d32;
    /* Green check color */
}

/* Price under button */
.vibe-upsell-card-price {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--vibe-primary);
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}