/**
 * ApexCart Storefront Core Stylesheet
 * High Performance & Responsive E-Commerce Theme
 */

:root {
    --amazon-dark: #0F1111;
    --nav-top-bg: #131921;
    --nav-sub-bg: #232F3E;
    --accent-orange: #FF9900;
    --accent-gold: #F3A847;
    --amazon-deal: #CC0C39;
    --amazon-link: #007185;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-family, 'Plus Jakarta Sans', system-ui, sans-serif);
    background-color: #EAEDED;
    color: #0F1111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 1. TOP BAR LIVE SEARCH & HELPLINE */
.store-topbar-search {
    background-color: var(--nav-top-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1.5rem;
}

.header-search-container {
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.header-search-form {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    border: 2px solid transparent;
    transition: all 0.25s ease;
}

.header-search-form:focus-within {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35);
}

.header-search-form select {
    border: none;
    background: #F8FAFC;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    padding: 0 0.85rem;
    max-width: 145px;
    border-right: 1px solid #E2E8F0;
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
}

.header-search-form input {
    border: none;
    border-radius: 0;
    font-size: 0.925rem;
    padding: 0.55rem 1rem;
}

.header-search-form input:focus {
    box-shadow: none;
}

.header-search-btn {
    background: linear-gradient(135deg, #FF9900, #F59E0B);
    border: none;
    color: #0F1111;
    padding: 0 1.35rem;
    font-size: 1.1rem;
    transition: all 0.25s ease;
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
}

.header-search-btn:hover {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

#searchAutocompleteDropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1080;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #CBD5E1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    max-height: 420px;
    overflow-y: auto;
    margin-top: 6px;
}

#searchAutocompleteDropdown.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* 2. MAIN NAVBAR BELOW TOPBAR */
.store-main-navbar {
    background-color: var(--nav-top-bg);
    color: #ffffff;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.amazon-logo-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.amazon-logo-box:hover {
    color: var(--accent-gold);
}

/* MINIMALIST ICONLESS NAVBAR LINKS */
.store-nav-link {
    color: #CBD5E1;
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid transparent;
}

.store-nav-link:hover,
.hover-dropdown:hover > .store-nav-link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* MODERN HOVER DROPDOWN */
.hover-dropdown {
    position: relative;
}

/* Custom Premium Storefront Pagination Styling */
.pagination {
    display: flex !important;
    padding-left: 0 !important;
    list-style: none !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 1.75rem !important;
    margin-bottom: 1rem !important;
}

.pagination .page-item .page-link {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    padding: 8px 15px !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.pagination .page-item .page-link:hover {
    background: #F3F4F6 !important;
    color: #F59E0B !important;
    border-color: #F59E0B !important;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #FF9900, #F59E0B) !important;
    border-color: #FCD200 !important;
    color: #0F1111 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
}

.pagination .page-item.disabled .page-link {
    background: #F9FAFB !important;
    color: #9CA3AF !important;
    border-color: #E5E7EB !important;
    opacity: 0.65 !important;
}

.hover-dropdown > .dropdown-menu,
.dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    margin-top: 0.35rem;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.6rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
    max-width: calc(100vw - 20px);
}

.quick-cart-panel {
    width: 350px !important;
    max-width: calc(100vw - 24px) !important;
    background: #0F172A !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 18px !important;
}

#quickCartItemsList {
    overflow: visible !important;
    max-height: none !important;
}

#quickCartItemsList::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.quick-remove-pill-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    font-size: 0.725rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

.quick-remove-pill-btn:hover {
    background: #EF4444;
    border-color: #EF4444;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: scale(1.04);
}

/* FLOATING TOAST NOTIFICATION AT BOTTOM-RIGHT */
.toast-floating-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1090;
    animation: toastSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-glass-panel {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* HORIZONTAL PAYMENT BADGES BAR */
.payment-badge-pill {
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.45rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #F8FAFC;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    margin: 0.1rem 0;
}

.payment-badge-pill:hover {
    border-color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}

.payment-badge-img {
    height: 22px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    background: #FFFFFF;
    padding: 1px 3px;
}

/* 3-STEP CHECKOUT LIFECYCLE BAR & PERFECT CIRCLE BADGES */
.checkout-lifecycle-bar {
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.step-circle-badge {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.95rem;
    line-height: 1;
    transition: all 0.25s ease;
}

.step-circle-badge.active {
    background: linear-gradient(135deg, #FF9900, #F59E0B) !important;
    color: #0F1111 !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.6), 0 0 0 3.5px rgba(245, 158, 11, 0.3) !important;
}

.step-circle-badge.completed {
    background: #10B981 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.step-circle-badge.inactive {
    background: #334155 !important;
    color: #94A3B8 !important;
}

/* WISHLIST ACTION BUTTONS */
.wishlist-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.wishlist-btn-eye {
    color: #2563EB;
}

.wishlist-btn-eye:hover {
    background-color: #0F172A !important;
    color: #FFFFFF !important;
    border-color: #0F172A !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

.wishlist-btn-cart {
    color: #D97706;
}

.wishlist-btn-cart:hover {
    background-color: #FF9900 !important;
    color: #FFFFFF !important;
    border-color: #FF9900 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.wishlist-btn-delete {
    color: #EF4444;
}

.wishlist-btn-delete:hover {
    background-color: #EF4444 !important;
    color: #FFFFFF !important;
    border-color: #EF4444 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* PAYMENT SUCCESS PAGE PREMIUM STYLING */
@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    }
    70% {
        box-shadow: 0 0 0 22px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.success-pulse-ring {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: successPulse 2s infinite;
}

.delivery-timeline-track {
    height: 4px;
    background: #E2E8F0;
    position: relative;
    margin: 25px 0;
    border-radius: 2px;
}

.delivery-timeline-progress {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, #10B981, #F59E0B);
    border-radius: 2px;
}

.timeline-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748B;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-step-dot.completed {
    background: #10B981;
    border-color: #10B981;
    color: #FFFFFF;
}

.timeline-step-dot.active {
    background: #F59E0B;
    border-color: #F59E0B;
    color: #0F172A;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
}

/* PRINT MEDIA THERMAL POS RECEIPT STYLING */
@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
        padding: 10px !important;
        font-family: 'Courier New', Courier, monospace !important;
    }

    body * {
        visibility: hidden !important;
    }

    #printableThermalReceipt,
    #printableThermalReceipt *,
    .active-print-receipt,
    .active-print-receipt * {
        visibility: visible !important;
    }

    #printableThermalReceipt,
    .active-print-receipt {
        position: fixed !important;
        left: 50% !important;
        top: 0 !important;
        transform: translateX(-50%) !important;
        width: 80mm !important;
        margin: 0 auto !important;
        display: block !important;
        background: #FFFFFF !important;
        color: #000000 !important;
        z-index: 999999 !important;
    }
}

/* SLEEK AI CHATBOT SCROLLBAR & CUSTOM STYLES */
#aiChatMessages::-webkit-scrollbar,
.ai-chips-scroll::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

#aiChatMessages::-webkit-scrollbar-track,
.ai-chips-scroll::-webkit-scrollbar-track {
    background: #0B0F19;
}

#aiChatMessages::-webkit-scrollbar-thumb,
.ai-chips-scroll::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

#aiChatMessages::-webkit-scrollbar-thumb:hover,
.ai-chips-scroll::-webkit-scrollbar-thumb:hover {
    background: #6366F1;
}

/* WHITE INPUT PLACEHOLDER & GLOWING ANIMATED SUBMIT BUTTON */
#aiChatInput::placeholder {
    color: #E2E8F0 !important;
    opacity: 0.85 !important;
}

@keyframes pulseGoldGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.ai-send-btn-square {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    border: none !important;
    color: #0F172A !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
    transition: all 0.2s ease-in-out !important;
    flex-shrink: 0 !important;
}

.ai-send-btn-square:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6) !important;
}

.ai-chips-single-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
}

.ai-chips-single-row::-webkit-scrollbar {
    display: none !important;
}

.ai-chip-pill {
    white-space: nowrap !important;
    font-size: 0.725rem !important;
    padding: 5px 12px !important;
    flex-shrink: 0 !important;
}

.hover-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    color: #CBD5E1;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-gold);
    transform: translateX(4px);
}

.amazon-nav-item {
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.25rem 0.6rem;
    transition: border-color 0.2s ease;
}

.amazon-nav-item:hover {
    border-color: #ffffff;
    color: #ffffff;
}

/* 3D POP-OUT CARD SHELF */
.card-3d-wrapper {
    perspective: 1000px;
}

.card-3d {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.card-3d:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.product-img-floating {
    transition: transform 0.4s ease;
    cursor: zoom-in;
}

.card-3d:hover .product-img-floating {
    transform: scale(1.08);
}

.amazon-btn-primary {
    background: linear-gradient(135deg, #FF9900, #F59E0B);
    border: 1px solid #FCD200;
    color: #0F1111;
    font-weight: 800;
    border-radius: 25px;
    padding: 0.55rem 1.35rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    transition: all 0.2s ease;
}

.amazon-btn-primary:hover {
    background: linear-gradient(135deg, #F3A847, #D97706);
    color: #0F1111;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.amazon-btn-secondary {
    background: linear-gradient(135deg, #FFA41C, #EA580C);
    border: 1px solid #E67A00;
    color: #ffffff;
    font-weight: 800;
    border-radius: 25px;
    padding: 0.55rem 1.35rem;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
    transition: all 0.2s ease;
}

.amazon-btn-secondary:hover {
    background: linear-gradient(135deg, #FA8900, #C2410C);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35);
}

.badge-deal {
    background-color: var(--amazon-deal);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

.badge-bestseller {
    background-color: #EA580C;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.725rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-prime {
    color: #0284C7;
    font-weight: 800;
    font-style: italic;
}

.stars-gold {
    color: #F59E0B;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #0B0F19;
    color: #F8FAFC !important;
}

.footer-top-btn {
    background-color: #111827;
    color: #F8FAFC !important;
    text-align: center;
    padding: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    display: block;
    border-top: 1px solid #1F2937;
    transition: background 0.2s ease;
}

.footer-top-btn:hover {
    background-color: #1F2937;
    color: #FFFFFF !important;
}

.footer-link {
    color: #94A3B8 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-gold) !important;
}

.quick-remove-icon-btn {
    color: #94A3B8 !important;
    transition: all 0.2s ease;
    border-radius: 4px;
    box-shadow: none !important;
}

.quick-remove-icon-btn:hover {
    color: #FFFFFF !important;
    background: rgba(239, 68, 68, 0.25) !important;
}
