/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-hover: #1a1a28;
    --text: #e8e8ed;
    --text-muted: #8888a0;
    --accent: #c9a84c;
    --accent-light: #e0c56a;
    --accent-dark: #a88832;
    --border: #2a2a3a;
    --success: #4caf50;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: #0a0a0f;
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-buy {
    background: var(--accent);
    color: #0a0a0f;
    font-size: 0.82rem;
    padding: 8px 18px;
}
.btn-buy:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-bundle { background: var(--success); color: #fff; }
.btn-bundle:hover { background: #5cc360; }
.btn-notify {
    background: var(--accent);
    color: #0a0a0f;
    font-size: 0.82rem;
    padding: 8px 18px;
}
.btn-checkout {
    width: 100%;
    background: var(--accent);
    color: #0a0a0f;
    padding: 14px;
    font-size: 1rem;
}
.btn-checkout:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-checkout:not(:disabled):hover { background: var(--accent-light); }

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    height: 44px;
    width: auto;
    border-radius: 4px;
}
.logo-text { display: flex; flex-direction: column; }
.logo-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
}
.logo-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.main-nav a:hover { color: var(--accent); }
.cart-link { color: var(--accent) !important; font-weight: 600 !important; }
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, rgba(201,168,76,0.06) 0%, transparent 100%);
}
.hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 20px;
}
.accent { color: var(--accent); }
.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 36px;
}

/* ===== BOOKS ===== */
.books-section { padding: 60px 0 80px; }
.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--accent);
}

.book-card {
    display: flex;
    gap: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 40px;
    transition: border-color 0.3s;
}
.book-card:hover { border-color: var(--accent-dark); }
.book-card.coming-soon { opacity: 0.85; }

.book-cover {
    flex-shrink: 0;
    width: 220px;
    position: relative;
}
.book-cover img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.coming-soon-badge {
    position: absolute;
    top: 12px;
    right: -8px;
    background: var(--accent);
    color: #0a0a0f;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

.book-info h3 {
    font-size: 1.6rem;
    margin-bottom: 6px;
}
.book-subtitle {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 14px;
}
.book-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 12px;
    line-height: 1.7;
}

/* Format options */
.book-formats { margin-top: 20px; }
.format-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.format-option:last-child { border-bottom: none; }
.format-option.bundle {
    background: rgba(76,175,80,0.08);
    border: 1px solid rgba(76,175,80,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 8px;
}
.format-label { flex: 1; font-size: 0.9rem; }
.format-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    min-width: 60px;
    text-align: right;
}

.coming-soon-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.notify-email {
    flex: 1;
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}
.notify-email:focus { outline: none; border-color: var(--accent); }

/* ===== INTERNATIONAL EDITIONS ===== */
.intl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.intl-edition {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
}
.intl-edition em { color: var(--accent); }
.intl-gloss {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== ABOUT ===== */
.about-section {
    padding: 80px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.about-content { max-width: 700px; margin: 0 auto; }
.about-text p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 18px;
    line-height: 1.8;
}

/* ===== CART SIDEBAR ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.cart-sidebar.open { right: 0; }
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
}
.cart-overlay.open { display: block; }
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 1.3rem; }
.cart-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}
.cart-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item-name { font-size: 0.88rem; flex: 1; padding-right: 12px; }
.cart-item-price { font-weight: 600; color: var(--accent); margin-right: 12px; }
.cart-item-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
}
.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}
#cart-total-amount { color: var(--accent); }

/* ===== FOOTER ===== */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent); }
.footer-security { text-align: right; }
.footer-security p { color: var(--text-muted); font-size: 0.82rem; }

/* ===== ADDED TO CART ANIMATION ===== */
.btn-buy.added {
    background: var(--success) !important;
    color: #fff !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero-sub { font-size: 1rem; }
    .book-card { flex-direction: column; padding: 24px; gap: 24px; }
    .book-cover { width: 160px; margin: 0 auto; }
    .format-option { flex-wrap: wrap; gap: 8px; }
    .format-label { width: 100%; }
    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        padding: 20px;
        border-bottom: 1px solid var(--border);
    }
    .mobile-menu-btn { display: block; }
    .cart-sidebar { width: 100%; right: -100%; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    .footer-security { text-align: center; }
}
