/**
 * Amazon Style UI & Mobile First Core
 * Minimalist, White, Product-Oriented
 */

:root {
    --amz-blue: #007185;
    --amz-orange: #FF9900;
    --amz-dark: #131921;
    --amz-light-gray: #f3f3f3;
    --amz-border: #ddd;
    --amz-white: #ffffff;
    --amz-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body {
    background-color: #fff;
    color: #0F1111;
    font-family: 'Inter', sans-serif;
}

/* 41. Amazon Style UI - Minimalist Header */
.ikx-header-standard {
    border-bottom: 1px solid var(--amz-border);
    box-shadow: var(--amz-shadow);
}

.h-promo { display: none; } /* Remove distracting promo bars for cleaner look */

.h-main {
    background: var(--amz-dark);
    color: #fff;
}

.h-search-bar {
    border-radius: 4px;
    overflow: hidden;
}

.h-search-btn {
    background: var(--amz-orange);
    border: none;
    border-radius: 0 4px 4px 0;
}

/* 41. Header Dropdowns (Account & Cart) */
.ikx-dropdown-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ikx-icon-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.ikx-icon-link:hover {
    border-color: #ffffff44;
}

.ikx-pro-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 100000;
    display: none;
    margin-top: 2px;
}

.ikx-dropdown-wrapper:hover .ikx-pro-dropdown {
    display: block;
}

.ikx-drop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.ikx-drop-item:hover {
    background: #f3f3f3;
    color: var(--amz-blue);
}

.ikx-drop-item i {
    font-size: 16px;
    color: #888;
}

/* 48. Amazon Style Live Search UI */
.live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    z-index: 999999;
    max-height: 500px;
    overflow-y: auto;
    display: none;
}

.live-search-dropdown.show {
    display: block;
}

.live-search-header {
    background: #f8f8f8;
    padding: 8px 15px;
    font-size: 11px;
    font-weight: 800;
    color: #888;
    border-bottom: 1px solid #eee;
    letter-spacing: 0.5px;
}

.live-search-item {
    display: flex;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.live-search-item:hover {
    background: #fcfcfc;
}

.live-item-img {
    width: 45px;
    height: 60px;
    object-fit: contain;
    background: #fff;
}

.live-item-info {
    flex: 1;
    min-width: 0;
}

.live-item-title {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-item-meta {
    font-size: 11px;
    color: #777;
    margin-bottom: 5px;
}

.live-item-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-val {
    font-weight: 800;
    color: #000;
    font-size: 14px;
}

.btn-quick-view {
    font-size: 10px;
    font-weight: 800;
    color: var(--amz-blue);
    text-transform: uppercase;
}

/* 42. Mega Menu (JSON-based & Dynamic) */
.h-nav-bar { height: 45px; position: relative; z-index: 999; }
@media (max-width: 1200px) {
    .h-nav-bar { display: none !important; }
}
.hover-blue:hover { color: var(--amz-blue) !important; }

.mega-menu-placeholder {
    display: none !important;
    position: absolute;
    top: 45px;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 99999;
    border-top: 1px solid #ddd;
    border-bottom: 2px solid #ddd;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.mega-menu-placeholder.active {
    display: block !important;
}

.mega-container {
    max-width: 1250px;
    margin: 0 auto;
    display: flex;
    height: 550px;
}

.mega-side-list {
    width: 280px;
    background: #fcfcfc;
    border-right: 1px solid #eee;
    overflow-y: auto;
    padding: 10px 0;
}

.mega-side-item { 
    padding: 12px 25px; 
    font-size: 13px; 
    font-weight: 600; 
    color: #444; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.mega-side-item:hover, .mega-side-item.active { background: #f0f2f2; color: var(--amz-blue); }

.mega-content-area {
    flex: 1;
    background: #fff;
    overflow-y: auto;
    padding: 25px 40px;
}

.mega-panel { display: none; }
.mega-panel.active { display: block; }

.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.mega-head { font-size: 14px; font-weight: 800; color: #111; text-decoration: none; margin-bottom: 15px; display: block; border-bottom: 1px solid #f0f0f0; padding-bottom: 5px; }
.mega-links a { display: block; font-size: 12px; color: #555; text-decoration: none; margin-bottom: 8px; }
.mega-links a:hover { color: var(--amz-blue); text-decoration: underline; }

.mega-featured {
    width: 320px;
    background: #f7f7f7;
    border-left: 1px solid #eee;
    padding: 25px;
    overflow-y: auto;
}

/* Scrollbar styles */
.mega-side-list::-webkit-scrollbar,
.mega-content-area::-webkit-scrollbar,
.mega-featured::-webkit-scrollbar {
    width: 5px;
}
.mega-side-list::-webkit-scrollbar-thumb,
.mega-content-area::-webkit-scrollbar-thumb,
.mega-featured::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.mega-book-card {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e7e7e7;
    margin-bottom: 15px;
    text-decoration: none;
    transition: all 0.2s;
}

.mega-book-card:hover {
    border-color: var(--amz-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.mega-book-card img {
    width: 60px;
    height: 85px;
    object-fit: contain;
}

/* 44. Mobile First - Bottom Nav Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media (min-width: 992px) {
    .mobile-bottom-nav, .ikx-mobile-menu, .ikx-mobile-overlay { display: none !important; }
}

.nav-item-m {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 10px;
    font-weight: 600;
}

.nav-item-m i {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-item-m.active {
    color: var(--amz-blue);
}

/* 45. Skeleton Loaders */
.skeleton {
    background: #eee;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 5px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

@keyframes shine {
    to { background-position-x: -200%; }
}

/* 50. Micro-Interactions */
.btn-amz {
    transition: all 0.2s ease;
}

.btn-amz:active {
    transform: scale(0.95);
}
