/* === UnicTest BookStore - Premium Glass Theme === */

:root {
    --bg-gradient: linear-gradient(135deg, #fffbeb 0%, #ffffff 40%, #fef3c7 100%);
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    --accent-amber: #f59e0b;
    --accent-orange: #d97706;
    --accent-warm: #ea580c;
    --accent-green: #10b981;
    --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Animated Background Orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    animation: floatOrb 18s infinite ease-in-out;
}

body::before {
    width: 450px;
    height: 450px;
    background: rgba(245, 158, 11, 0.2);
    top: -180px;
    left: -80px;
}

body::after {
    width: 350px;
    height: 350px;
    background: rgba(234, 88, 12, 0.15);
    bottom: -120px;
    right: -60px;
    animation-delay: -8s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, 40px);
    }

    66% {
        transform: translate(-20px, 50px);
    }
}

/* ====== NAVBAR ====== */
.store-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}

.store-brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.store-tagline {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 50px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--accent-amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.search-wrapper i {
    color: var(--text-muted);
}

.search-wrapper input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-primary);
    width: 200px;
    font-family: var(--font-family);
}

.cart-btn {
    background: var(--gradient-amber);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    color: #fff;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    border: 2px solid #fff;
    transition: transform 0.3s ease;
}

.cart-badge.bump {
    animation: badgeBump 0.3s ease;
}

@keyframes badgeBump {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }
}

/* Mobile Search */
.mobile-search-bar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
}

/* ====== MAIN ====== */
.store-main {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    padding-bottom: 40px;
    min-height: 100vh;
}

@media (max-width: 767.98px) {
    .store-main {
        padding-top: 120px;
    }
}

/* ====== HERO ====== */
.store-hero {
    background: var(--gradient-warm);
    border-radius: 1.5rem;
    padding: 2rem 2rem 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.25);
}

.store-hero::before {
    content: '📚';
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 8rem;
    opacity: 0.12;
    transform: rotate(12deg);
}

.hero-heading {
    font-size: clamp(1.3rem, 4vw, 2.2rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.hero-heading i {
    margin-right: 8px;
}

.hero-heading .highlight {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 10px;
    border-radius: 8px;
}

.hero-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
}

.hero-stat span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.hero-stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
}

/* ====== CATEGORY CHIPS ====== */
.category-section {
    margin-bottom: 1.5rem;
}

.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1.5px solid rgba(245, 158, 11, 0.2);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--accent-amber);
    color: var(--accent-orange);
    transform: translateY(-1px);
}

.chip.active {
    background: var(--gradient-amber);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.chip i {
    font-size: 0.85rem;
}

/* ====== BOOKS GRID ====== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
}

@media (max-width: 575.98px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

/* ====== BOOK CARD ====== */
.book-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
    border-color: var(--accent-amber);
}

.book-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem;
    text-align: center;
}

.book-cover-placeholder i {
    font-size: 2.5rem;
    color: var(--accent-orange);
    opacity: 0.6;
}

.book-cover-placeholder span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-orange);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.book-info {
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.book-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.book-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    margin-top: auto;
}

.book-price {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--accent-orange);
}

.book-mrp {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 10px;
    background: var(--gradient-amber);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-to-cart-btn:hover {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.add-to-cart-btn.added {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.add-to-cart-btn.added i::before {
    content: "\f26e";
}

/* No Books */
.no-books-msg {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.no-books-msg p {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* ====== CART DRAWER ====== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.cart-header h4 {
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-img {
    width: 50px;
    height: 65px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-img i {
    font-size: 1.2rem;
    color: var(--accent-orange);
    opacity: 0.6;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin: 2px 0;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: 1.5px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    background: #fff;
    color: var(--accent-orange);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.qty-btn:hover {
    background: var(--accent-amber);
    color: #fff;
    border-color: var(--accent-amber);
}

.qty-value {
    font-size: 0.85rem;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
}

.cart-item-remove {
    border: none;
    background: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.cart-empty i {
    opacity: 0.4;
}

.cart-empty p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Cart Footer */
.cart-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(245, 158, 11, 0.15);
    background: rgba(255, 255, 255, 0.6);
}

.cart-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkout-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 800;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: #fff;
}

/* ====== FOOTER ====== */
.store-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .store-hero {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .hero-heading {
        font-size: 1.2rem;
    }

    .hero-desc {
        font-size: 0.8rem;
    }

    .store-hero::before {
        font-size: 5rem;
    }

    .hero-stat strong {
        font-size: 1rem;
    }

    .book-card {
        border-radius: 1rem;
    }

    .book-info {
        padding: 0.6rem;
    }

    .book-title {
        font-size: 0.78rem;
    }

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

    .add-to-cart-btn {
        font-size: 0.72rem;
        padding: 7px;
    }
}

/* ====== SCROLL BEHAVIOR ====== */
html {
    scroll-behavior: smooth;
}

body::-webkit-scrollbar {
    width: 6px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 3px;
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.5);
}