/* assets/css/theme.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --brand-primary: #0f172a;
    --brand-accent: #f59e0b;
    --brand-secondary: #1e293b;
    --brand-bg: #f3f5f8;
    --card-radius: 16px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--brand-bg);
    color: #0f172a;
}

.announcement-bar {
    background: linear-gradient(90deg, var(--brand-primary) 0%, #1d4ed8 50%, var(--brand-primary) 100%);
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

.main-header {
    background-color: var(--brand-primary);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
    z-index: 1030;
}

.sub-navbar {
    background-color: var(--brand-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.sub-navbar::-webkit-scrollbar { display: none; }

.sub-nav-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.sub-nav-link:hover, .sub-nav-link.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--brand-accent);
}

/* Search Bar */
.amazon-search-wrap {
    position: relative;
    flex: 1;
    max-width: 680px;
}
.amazon-search-group {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
}
.amazon-search-group:focus-within {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
}
.amazon-search-btn {
    background-color: var(--brand-accent);
    color: #0f172a;
    border: none;
    font-weight: 700;
    padding: 0 1.2rem;
}
.amazon-search-btn:hover {
    filter: brightness(0.94);
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    border: 1px solid #e2e8f0;
    z-index: 1050;
    display: none;
    overflow: hidden;
}
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}
.search-suggest-item:hover {
    background: #f8fafc;
}
.search-suggest-item img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

/* Product Cards */
.product-card {
    border-radius: var(--card-radius);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
    border-color: rgba(37, 99, 235, 0.25);
}
.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 225px;
    background: #f8fafc;
    overflow: hidden;
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.product-card:hover .card-img-wrapper img {
    transform: scale(1.06);
}
.product-card-actions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 3;
}
.icon-circle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    cursor: pointer;
}
.icon-circle-btn:hover {
    background: var(--brand-primary);
    color: #fff;
    transform: scale(1.08);
}
.icon-circle-btn.wish-active {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

.discount-ribbon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.auction-badge {
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.55; }
    100% { opacity: 1; }
}

/* Order Timeline */
.order-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 20px 0;
}
.order-timeline::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 8%;
    right: 8%;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}
.timeline-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}
.timeline-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 6px;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.timeline-step.done .timeline-dot {
    background: #10b981;
    color: #fff;
}
.timeline-step.current .timeline-dot {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2);
}

/* Category Tile */
.cat-tile {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 18px;
    text-decoration: none;
    color: #0f172a;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 10px;
}
.cat-tile:hover, .cat-tile.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-2px);
}

/* Mobile Bottom Sticky Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    z-index: 1045;
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
}
.mobile-bottom-nav a, .mobile-bottom-nav button {
    background: none;
    border: none;
    color: #475569;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    gap: 2px;
    position: relative;
}
.mobile-bottom-nav a.active {
    color: #2563eb;
}
@media (max-width: 991.98px) {
    body { padding-bottom: 62px; }
}

/* Dark Mode Theme */
body.dark-theme {
    background-color: #0b1120 !important;
    color: #e2e8f0 !important;
}
body.dark-theme .card,
body.dark-theme .bg-white,
body.dark-theme .list-group-item,
body.dark-theme .modal-content,
body.dark-theme .offcanvas,
body.dark-theme .mobile-bottom-nav,
body.dark-theme .search-dropdown {
    background-color: #111827 !important;
    color: #e2e8f0 !important;
    border-color: #1f2937 !important;
}
body.dark-theme .bg-light,
body.dark-theme .table-light {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}
body.dark-theme .text-dark { color: #f8fafc !important; }
body.dark-theme .text-muted,
body.dark-theme .text-secondary { color: #94a3b8 !important; }
body.dark-theme .form-control,
body.dark-theme .form-select {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}
body.dark-theme .cat-tile { background-color: #111827; border-color: #1f2937; color: #f8fafc; }

/* Sticky Bottom Buy Bar on Product Page */
.sticky-buy-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.08);
    z-index: 1035;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}
.sticky-buy-bar.visible { transform: translateY(0); }
body.dark-theme .sticky-buy-bar { background: rgba(17, 24, 39, 0.96); border-color: #1f2937; }
