@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #0f172a;
    --primary-accent: #2563eb;
    --indigo-accent: #4f46e5;
    --secondary-color: #475569;
    --accent-amber: #f59e0b;
    --success-emerald: #10b981;
    --danger-rose: #ef4444;
    --dark-color: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12);
    --shadow-hover: 0 20px 32px -6px rgba(37, 99, 235, 0.18);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    letter-spacing: -0.01em;
}

/* Glassmorphism Navbar */
.navbar-glass {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary-color) !important;
    letter-spacing: -0.03em;
}

.brand-icon-wrapper {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary-color) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-accent) !important;
    background: rgba(37, 99, 235, 0.06);
}

.cart-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(241, 245, 249, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.2s ease;
    position: relative;
}

.cart-icon-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-accent);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.45rem;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* User Menu Dropdown */
.user-dropdown-btn {
    padding: 4px 12px 4px 4px;
    border-radius: 30px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.user-dropdown-btn:hover {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.dropdown-menu {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-accent);
}

/* Modern Breadcrumb Bar */
.breadcrumb-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.55rem 1.35rem;
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.custom-breadcrumb {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.875rem;
    font-weight: 600;
}

.custom-breadcrumb-item {
    display: flex;
    align-items: center;
}

.custom-breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.custom-breadcrumb-item a:hover {
    color: var(--primary-accent);
}

.custom-breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 700;
}

.custom-breadcrumb-separator {
    color: #cbd5e1;
    margin: 0 0.6rem;
    font-size: 0.725rem;
}

/* Modern Hero Section */
.hero-banner-slide {
    height: 440px;
    min-height: 440px;
    max-height: 440px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

@media (max-width: 991.98px) {
    .hero-banner-slide {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }
}

@media (max-width: 768px) {
    .hero-banner-slide {
        height: 210px;
        min-height: 210px;
        max-height: 210px;
    }
    
    .hero-banner-slide .display-4,
    .hero-banner-slide .hero-title {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        margin-bottom: 0.3rem !important;
    }

    .hero-banner-slide .hero-subtitle {
        font-size: 0.78rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.45rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        opacity: 0.9;
    }

    .hero-banner-slide .hero-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.55rem !important;
        margin-bottom: 0.3rem !important;
    }

    .hero-banner-slide .btn {
        padding: 0.35rem 0.9rem !important;
        font-size: 0.75rem !important;
        border-radius: 50rem !important;
    }
}

@media (max-width: 480px) {
    .hero-banner-slide {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }

    .hero-banner-slide .display-4,
    .hero-banner-slide .hero-title {
        font-size: 1.05rem !important;
        margin-bottom: 0.2rem !important;
    }

    .hero-banner-slide .hero-subtitle {
        font-size: 0.72rem !important;
        -webkit-line-clamp: 1;
        margin-bottom: 0.35rem !important;
    }

    .hero-banner-slide .btn {
        padding: 0.25rem 0.75rem !important;
        font-size: 0.7rem !important;
    }
}

.hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(79, 70, 229, 0.12) 0%, transparent 40%),
                linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 5.5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}

.hero-title {
    font-weight: 800;
    font-size: 3.2rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.6;
}

.hero-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
}

.hero-search-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 6px;
    display: flex;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-search-input {
    background: transparent;
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

.hero-search-input::placeholder {
    color: #94a3b8;
}

/* Feature Cards */
.feature-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.3);
}

.feature-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.25rem;
}

/* Book Cards Overhaul */
.book-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.4);
}

.book-cover-wrapper {
    position: relative;
    width: 100%;
    padding-top: 135%; /* Aspect ratio 3:4 */
    overflow: hidden;
    background: #f1f5f9;
}

.book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-cover {
    transform: scale(1.08);
}

.book-badge-format {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
}

.book-badge-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.book-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-accent);
    margin-bottom: 0.35rem;
}

.book-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.book-card:hover .book-title {
    color: var(--primary-accent);
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.book-rating {
    color: #f59e0b;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.book-price-box {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.book-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
}

.book-old-price {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: line-through;
    display: block;
    line-height: 1;
    margin-bottom: 2px;
}

/* Detail Page Custom Styles */
.detail-cover-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #ffffff;
    position: relative;
}

.detail-cover-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .detail-cover-img {
        max-height: 300px;
        width: auto;
        margin: 0 auto;
    }
}

.spec-widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.spec-item {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.spec-value {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Category Filter Bar */
.category-pill {
    padding: 0.55rem 1.25rem;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.category-pill:hover, .category-pill.active {
    background: var(--primary-accent);
    color: #ffffff;
    border-color: var(--primary-accent);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Manuscript CTA Banner */
.cta-manuscript-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.cta-manuscript-section::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.08;
}

/* Footer Styling */
footer {
    background-color: #0b0f19;
    color: #94a3b8;
    padding: 4.5rem 0 1.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer h5 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

footer a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.social-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    background: var(--primary-accent);
    color: white;
    transform: translateY(-3px);
}

/* Customer E-Commerce Table System */
.customer-table {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #ffffff;
    width: 100%;
}

.customer-table th {
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--border-color);
}

.customer-table td {
    padding: 1.1rem 1.25rem;
    vertical-align: middle;
    font-size: 0.92rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.customer-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.02);
}

/* Buttons */
.btn-primary {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-amber {
    background: var(--accent-amber);
    color: #0f172a;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-amber:hover {
    background: #d97706;
    color: white;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* Mobile App Bottom Nav Bar */
@media (max-width: 768px) {
    body {
        padding-bottom: 75px;
    }

    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        z-index: 1040;
        justify-content: space-around;
        padding: 0.6rem 0;
        border-top: 1px solid var(--border-color);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 600;
        flex: 1;
        transition: all 0.2s ease;
    }

    .mobile-nav-item.active {
        color: var(--primary-accent);
    }

    .mobile-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 3px;
    }

    .navbar-collapse, .navbar-toggler, .nav-desktop-actions {
        display: none !important;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .mobile-scroll-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.75rem;
        padding: 0.5rem 0.25rem 1rem;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .mobile-scroll-row::-webkit-scrollbar {
        display: none;
    }

    .mobile-scroll-row > [class*="col-"] {
        flex: 0 0 155px;
        max-width: 155px;
        scroll-snap-align: start;
        padding: 0;
    }

    .book-card-body {
        padding: 0.75rem !important;
    }

    .book-category-tag {
        font-size: 0.65rem !important;
        margin-bottom: 0.2rem !important;
    }

    .book-title {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.3 !important;
    }

    .book-author {
        font-size: 0.75rem !important;
        margin-bottom: 0.4rem !important;
    }

    .book-price {
        font-size: 0.95rem !important;
    }

    .book-old-price {
        font-size: 0.68rem !important;
    }

    .book-badge-format, .book-badge-discount {
        font-size: 0.62rem !important;
        padding: 0.2rem 0.45rem !important;
    }

    .feature-card {
        padding: 1rem 0.75rem !important;
    }

    .feature-icon-wrapper {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.2rem !important;
        margin-bottom: 0.75rem !important;
    }

    .feature-card h6 {
        font-size: 0.85rem !important;
    }

    .feature-card p {
        font-size: 0.72rem !important;
    }

    /* Mobile Buttons Proportions */
    .btn {
        font-size: 0.82rem !important;
        padding: 0.4rem 0.9rem !important;
    }

    .btn-lg {
        padding: 0.5rem 1.1rem !important;
        font-size: 0.85rem !important;
    }

    .btn-sm {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .btn {
        font-size: 0.78rem !important;
        padding: 0.35rem 0.75rem !important;
    }

    .btn-lg {
        padding: 0.4rem 0.85rem !important;
        font-size: 0.8rem !important;
    }

    .btn-sm {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.72rem !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .mobile-scroll-row > [class*="col-"] {
        flex: 0 0 175px;
        max-width: 175px;
    }
}

@media (min-width: 769px) and (max-width: 991.98px) {
    .hero-title {
        font-size: 2.4rem;
    }
    .book-card-body {
        padding: 1rem;
    }
    .book-title {
        font-size: 0.95rem;
    }
    .book-price {
        font-size: 1.05rem;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}
