/* Sidebar Cart */
/* Sidebar Cart - Fixed Desktop */
.ho-cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh !important; /* Force full height */
    background: var(--ho-bg-card);
    z-index: 1001;
    transform: translateX(100%); /* Off-screen right */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.3s; /* Smooth slide */
    box-shadow: -5px 0 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--ho-border-color);
    margin-right: 0;
    font-family: 'Inter', sans-serif;
    visibility: hidden; /* Hide when closed */
}
.ho-cart-sidebar.active {
    transform: translateX(0); /* Slide in */
    visibility: visible;
}
.ho-sidebar-header {
    padding: 20px 25px;
    background: var(--ho-bg-card);
    color: var(--ho-text-body);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ho-border-color);
    flex-shrink: 0;
}

.ho-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ho-basket-icon {
    color: var(--ho-primary, #ff4757);
    flex-shrink: 0;
}

.ho-basket-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ho-text-body);
    line-height: 1;
}

.ho-cart-count-badge {
    background: rgba(255, 71, 87, 0.1) !important;
    background: rgba(var(--ho-primary-rgb, 255, 71, 87), 0.1) !important;
    color: var(--ho-primary, #ff4757) !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

.ho-sidebar-header h3 { 
    margin: 0; 
    font-size: 1.4rem; 
    font-weight: 700; 
}

.ho-sidebar-close {
    background: none;
    border: none;
    color: var(--ho-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.ho-sidebar-close:hover { 
    opacity: 1; 
    background: rgba(0, 0, 0, 0.05);
}

.ho-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--ho-bg-card);
    /* Footer will be inside here now to scroll */
}

/* Ensure cart items are always visible (override parent visibility:hidden) */
.ho-cart-items-list,
#ho-cart-items-list {
    visibility: visible !important;
}


/* Sidebar Item Redesign */
.ho-sidebar-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ho-border-color);
    align-items: center;
}
.ho-sidebar-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.ho-sidebar-item-details {
    flex: 1;
    min-width: 0; /* Text truncation fix */
}
.ho-sidebar-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center title and qty control */
    margin-bottom: 4px;
}
.ho-sidebar-item-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--ho-text-body);
    margin-bottom: 0; /* Remove bottom margin for centering */
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1.2;
}
.ho-sidebar-item-title:hover { color: var(--ho-primary); }
.ho-sidebar-item-price {
    font-weight: 700;
    color: var(--ho-text-body);
    font-size: 1rem;
    white-space: nowrap;
    margin-left: 0;
    display: block;
    margin-top: 2px;
}

/* Quantity Control */
.ho-sidebar-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ho-border-color);
    border-radius: 20px; /* Capsule shape */
    height: 32px;
    margin-left: auto; /* Push to right */
    background: var(--ho-bg-light);
    overflow: hidden;
    white-space: nowrap; /* Prevent wrapping */
    flex-shrink: 0; /* Don't shrink */
}
.ho-sidebar-qty-btn {
    width: 30px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ho-primary);
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.2s;
}
.ho-sidebar-qty-btn:hover {
    background: var(--ho-primary);
    color: var(--ho-light);
}
.ho-sidebar-qty-btn.ho-qty-trash {
    color: #ff4d4f;
    font-size: 0.8rem;
    width: auto;
    padding: 0 5px;
}
.ho-sidebar-qty-btn.ho-qty-trash:hover {
    background: #ff4d4f;
    color: var(--ho-light);
}
.ho-sidebar-qty-val {
    width: 30px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ho-text-body);
}

.ho-sidebar-addons {
    font-size: 0.85rem;
    color: var(--ho-text-muted);
    margin-bottom: 5px;
}
.ho-sidebar-instructions {
    font-size: 0.8rem;
    color: #e67e22;
    font-style: italic;
}
.ho-item-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.ho-view-addons-link {
    font-size: 0.85rem;
    color: var(--ho-primary);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}
.ho-view-addons-link:hover { text-decoration: underline; }

/* Add More */
.ho-sidebar-add-more {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ho-text-muted);
    font-weight: 500;
    cursor: pointer;
    padding: 15px 0;
    font-size: 1rem;
}
.ho-sidebar-add-more:hover { color: var(--ho-primary); }

/* Upsells */
.ho-upsell-section {
    margin-top: 20px;
}
.ho-upsell-header {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--ho-text-body);
}
.ho-upsell-desc {
    font-size: 0.85rem;
    color: var(--ho-text-muted);
    margin-bottom: 15px;
    margin-top: -10px;
}
/* Horizontal Scroll Upsells */
#ho-upsell-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 15px;
    padding-left: 5px;
    padding-right: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide Scrollbar Firefox */
    -ms-overflow-style: none; /* Hide Scrollbar IE/Edge */
}
#ho-upsell-list::-webkit-scrollbar {
    display: none; /* Hide Scrollbar Chrome/Safari */
}

/* Upsell Header & Nav */
.ho-upsell-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.ho-upsell-nav {
    display: flex;
    gap: 8px;
}
.ho-upsell-arrow {
    width: 28px; height: 28px;
    background: var(--ho-bg-light);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--ho-text-muted);
    transition: all 0.2s;
}
.ho-upsell-arrow:hover {
    background: var(--ho-primary);
    color: var(--ho-light);
}

.ho-upsell-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start; /* Align inner content left */
    transition: all 0.2s;
    min-width: 140px;
    width: 140px;
    flex-shrink: 0;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}
.ho-upsell-card:hover .ho-upsell-img-box { border-color: var(--ho-primary); }

.ho-upsell-img-box {
    position: relative;
    width: 100%;
    height: 140px;
    border: 1px solid var(--ho-border-color);
    border-radius: 12px;
    background: var(--ho-bg-light);
    padding: 0; /* Remove padding to fill box */
    display: flex;
    align-items: center; justify-content: center;
    overflow: hidden;
    transition: border 0.2s;
}

.ho-upsell-img {
    width: 100%;
    height: 100%;
    border-radius: 0; /* Let parent clip it */
    object-fit: cover; /* Fill the box */
}

/* Footer Detailed */
.ho-sidebar-footer {
    padding: 24px; /* Increased padding */
    background: transparent; /* Keep transparent to blend with body */
    border-top: 1px solid var(--ho-border-color);
    margin-top: auto; /* Push to bottom if flex container allows */
}

.ho-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px; /* Increased spacing */
    font-size: 0.9375rem; /* ~15px, readable */
    color: var(--ho-text-body);
}

.ho-cart-summary-row .text-muted {
    color: var(--ho-text-muted);
}

.ho-cart-summary-row .font-medium {
    font-weight: 600;
    color: var(--ho-text-body);
}

.ho-cart-summary-row.total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--ho-border-color);
    margin-bottom: 24px;
    font-size: 1.25rem; /* Large total */
    font-weight: 800;
    color: var(--ho-text-body);
}

.ho-cart-summary-row.total .text-primary {
    color: var(--ho-primary);
}

.ho-promo-msg {
    color: var(--ho-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}
.ho-checkout-btn {
    width: 100%;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    border: none;
    padding: var(--ho-btn-padding-y) var(--ho-btn-padding-x);
    border-radius: var(--ho-btn-radius);
    font-weight: var(--ho-btn-font-weight);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.ho-checkout-btn:hover {
    background: color-mix(in srgb, var(--ho-btn-bg), black 10%);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--ho-btn-bg), transparent 70%);
}
.ho-checkout-icon { font-size: 1.2rem; }

/* Custom Sidebar Checkout Button */
#ho-sidebar-checkout-btn,
.ho-checkout-btn-custom {
    width: 100%;
    height: 56px;
    background-color: var(--ho-btn-bg, var(--ho-primary));
    color: var(--ho-btn-text, #ffffff);
    border: none;
    border-radius: var(--ho-btn-radius, 12px);
    font-size: 1.125rem;
    font-weight: var(--ho-btn-font-weight, 700);
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    visibility: visible !important;
    opacity: 1 !important;
}

#ho-sidebar-checkout-btn:hover,
.ho-checkout-btn-custom:hover {
    background-color: color-mix(in srgb, var(--ho-btn-bg, var(--ho-primary)), black 10%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#ho-sidebar-checkout-btn:active,
.ho-checkout-btn-custom:active {
    transform: translateY(0);
}

/* Free Shipping Tracker - Simplified without color-mix for compatibility */
.ho-shipping-tracker {
    background: rgba(255, 71, 87, 0.08) !important; /* Fallback color */
    background: var(--ho-primary, #ff4757);
    background: rgba(var(--ho-primary-rgb, 255, 71, 87), 0.08) !important;
    padding: 14px !important;
    border-radius: 12px !important;
    margin-bottom: 15px !important;
    border: 1px solid rgba(255, 71, 87, 0.15) !important;
    border-color: rgba(var(--ho-primary-rgb, 255, 71, 87), 0.15) !important;
}

/* Override Tailwind bg classes */
.ho-shipping-tracker.bg-primary\/5,
.ho-shipping-tracker[class*="bg-primary"] {
    background: rgba(255, 71, 87, 0.08) !important;
    background: rgba(var(--ho-primary-rgb, 255, 71, 87), 0.08) !important;
}

.ho-shipping-tracker .flex {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}

/* Text styling - override Tailwind */
.ho-shipping-tracker .font-semibold,
.ho-shipping-tracker .text-primary,
.ho-shipping-tracker span[class*="text-primary"],
.ho-shipping-tracker span.font-semibold {
    font-weight: 600 !important;
    color: #ff4757 !important; /* Fallback */
    color: var(--ho-primary, #ff4757) !important;
    font-size: 0.875rem !important;
}

.ho-shipping-tracker .font-bold,
.ho-shipping-tracker span.font-bold {
    font-weight: 700 !important;
    color: #ff4757 !important; /* Fallback */
    color: var(--ho-primary, #ff4757) !important;
    font-size: 0.875rem !important;
}

/* Progress bar background - simple rgba */
.ho-progress-bar-bg,
.ho-shipping-tracker .ho-progress-bar-bg,
.ho-shipping-tracker div[class*="bg-primary\/20"],
.ho-shipping-tracker .w-full.h-1\.5 {
    background-color: rgba(255, 71, 87, 0.18) !important; /* Fallback */
    background-color: rgba(var(--ho-primary-rgb, 255, 71, 87), 0.18) !important;
    border-radius: 999px !important;
    height: 6px !important;
    width: 100% !important;
    overflow: hidden !important;
    display: block !important;
}

/* Progress bar fill */
.ho-progress-bar-fill,
.ho-shipping-tracker .ho-progress-bar-fill,
.ho-shipping-tracker .bg-primary,
.ho-shipping-tracker div.bg-primary {
    background-color: #ff4757 !important; /* Fallback */
    background-color: var(--ho-primary, #ff4757) !important;
    background: #ff4757 !important; /* Fallback */
    background: var(--ho-primary, #ff4757) !important;
    height: 100% !important;
    border-radius: 999px !important;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block !important;
}

/* Specific Tailwind utility overrides */
.ho-shipping-tracker .w-full {
    width: 100% !important;
}

.ho-shipping-tracker .h-1\.5 {
    height: 6px !important;
}

.ho-shipping-tracker .rounded-full {
    border-radius: 999px !important;
}

.ho-shipping-tracker .overflow-hidden {
    overflow: hidden !important;
}

/* Shipping tracker subtitle */
.ho-shipping-subtitle {
    font-size: 0.75rem !important;
    color: rgba(255, 71, 87, 0.7) !important;
    color: rgba(var(--ho-primary-rgb, 255, 71, 87), 0.7) !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Location Dropdown in Footer (Mockup shows it) */
.ho-cart-location {
    margin-top: 15px;
    border-top: 1px solid var(--ho-border-color);
    padding-top: 15px;
}
.ho-cart-loc-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--ho-border-color);
    border-radius: 6px;
    background: var(--ho-input-bg);
    color: var(--ho-input-text);
}

.ho-msg-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--ho-text-muted);
}

/* Unified Upsell Add Button */
.ho-upsell-add-btn {
    width: 28px; 
    height: 28px;
    border-radius: 50%;
    background: var(--ho-light);
    color: var(--ho-primary);
    border: 1px solid transparent; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
    position: absolute;
    bottom: 5px;
    right: 5px;
}
.ho-upsell-add-btn:hover {
    background: var(--ho-primary);
    color: var(--ho-light);
    transform: scale(1.1);
}

/* Confirmation Modal */
.ho-confirmation-card {
    background: var(--ho-light);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative;
    animation: hoFadeInUp 0.3s ease;
}
.ho-confirmation-icon {
    width: 64px;
    height: 64px;
    background: #FFF5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.ho-text-red { color: #E02424; }
.ho-confirmation-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ho-dark);
    margin-bottom: 10px;
}
.ho-confirmation-text {
    font-size: 1rem;
    color: #6B7280;
    margin-bottom: 25px;
    line-height: 1.5;
}
.ho-confirmation-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.ho-btn-secondary {
    background: #E5E7EB;
    color: #374151;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}
.ho-btn-secondary:hover { background: #D1D5DB; }
.ho-btn-danger {
    background: #E02424;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}
.ho-btn-danger:hover { background: #C81E1E; }

@keyframes hoFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
