﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    --primary: #5146e5;
    --primary-dark: #4338ca;

    --dark: #101829;

    --text: #172033;
    --text-secondary: #64748b;

    --border: #dce3ed;

    --background: #f8f9fc;
    --white: #ffffff;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f8f9fc;
    color: #172033;
}

a {
    text-decoration: none;
    color: inherit;
}

.user-header {
    height: 80px;
    background: #ffffff;
    border-bottom: 1px solid #e5e9f2;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 1280px;
    margin: auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Logo */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 215px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #5146e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #172033;
}

/* Navigation */

.user-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #29364d;
    transition: 0.2s;
}

.nav-link:hover {
    color: #5146e5;
}

/* Cart */

.cart-link {
    padding-left: 22px;
    border-left: 1px solid #dce3ed;
    font-size: 22px;
    color: #29364d;
    svg {
        fill: var(--dark);
    }
}

/* Profile */

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

/* Mobile menu */

.mobile-menu {
    display: none;
    border: none;
    background: transparent;
    font-size: 25px;
    color: #172033;
    cursor: pointer;
}

.user-main {
    min-height: calc(100vh - 80px);
}

.user-footer {
    background: #101829;
    color: white;
    padding: 75px 0 25px;
}

.footer-container {
    width: 100%;
    max-width: 1280px;
    margin: auto;
    padding: 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 65px;
}

/* Footer Brand */

.footer-brand {
    max-width: 390px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #5146e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.footer-logo-name {
    font-size: 19px;
    font-weight: 700;
}

.footer-description {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

/* Footer columns */

.footer-column h3 {
    font-size: 14px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-column a {
    color: #94a3b8;
    font-size: 14px;
    transition: 0.2s;
}

.footer-column a:hover {
    color: white;
}

/* Footer Bottom */

.footer-bottom {
    border-top: 1px solid #202b40;
    padding-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copyright {
    color: #94a3b8;
    font-size: 13px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-links a {
    color: #94a3b8;
    font-size: 20px;
    transition: 0.2s;
}

.social-links a:hover {
    color: white;
}

@media (max-width: 900px) {
    .header-container {
        padding: 0 20px;
    }

    .brand {
        min-width: auto;
    }

    .header-search {
        display: none;
    }

    .user-nav {
        gap: 18px;
    }

    .nav-link {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .user-header {
        height: 70px;
    }

    .header-container {
        padding: 0 15px;
    }

    .brand-name {
        font-size: 18px;
    }

    .cart-link {
        border-left: none;
        padding-left: 0;
    }

    .profile-name {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .user-footer {
        padding: 50px 0 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

.notification {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
}

/* hero section */
.home-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}
.home-hero {
    position: relative;
    overflow: hidden;
    min-height: 460px;
    padding: 32px 0;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(81, 70, 229, 0.08),
            transparent 25%
        ),
        linear-gradient(135deg, #f4f2ff 0%, #eef1ff 35%, #f9f8ff 100%);
    color: var(--text);
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 36px;
}

.hero-text {
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(81, 70, 229, 0.08);
    border: 1px solid rgba(81, 70, 229, 0.12);
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 16px;
}

.hero-text h1 {
    margin: 0;
    font-size: clamp(38px, 4.8vw, 62px);
    line-height: 1.05;
    letter-spacing: -1.5px;
    font-weight: 700;
}

.hero-text h1 span {
    display: block;
    color: var(--primary);
}

.hero-text p {
    max-width: 560px;
    margin: 18px 0 24px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
    box-shadow: 0 12px 25px rgba(81, 70, 229, 0.22);
}

.hero-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 16px 30px rgba(81, 70, 229, 0.28);
}

.hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border: 1px solid rgba(81, 70, 229, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.hero-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(81, 70, 229, 0.3);
    transform: translateY(-1px);
}

.hero-visual {
    position: relative;
    height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-circle {
    position: absolute;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: rgba(81, 70, 229, 0.08);
    box-shadow: 0 0 100px rgba(81, 70, 229, 0.08);
}

.hero-book {
    position: relative;
    z-index: 2;
    width: 210px;
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-radius: 6px 14px 14px 6px;
    background: linear-gradient(135deg, #5f54ee, #4138c6);
    color: #ffffff;
    box-shadow: 25px 25px 50px rgba(81, 70, 229, 0.22);
    transform: rotate(-7deg);
    transition: 0.4s ease;
}

.hero-book:hover {
    transform: rotate(0deg) translateY(-8px);
}

.hero-book i {
    font-size: 60px;
}

.hero-book span {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 4px;
    text-align: center;
}

.floating-book {
    position: absolute;
    z-index: 3;
    width: 70px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: #f3f4ff;
    color: var(--primary);
    box-shadow: 0 15px 30px rgba(81, 70, 229, 0.15);
    font-size: 24px;
}

.book-one {
    top: 55px;
    right: 70px;
    transform: rotate(12deg);
}

.book-two {
    bottom: 55px;
    left: 70px;
    transform: rotate(-14deg);
}

/* ================================
       BEST SELLER
    ================================= */

.best-section {
    padding: 90px 0;
    background: #faf9f7;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 35px;
}

.section-label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.section-heading h2,
.why-heading h2 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -1px;
    color: #202020;
}

.section-heading p {
    margin: 8px 0 0;
    color: #777;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.view-all:hover {
    color: var(--primary);
}

/* ================================
       BOOK GRID
    ================================= */

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.book-card {
    overflow: hidden;
    background: white;
    border: 1px solid #eee;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: 0.3s ease;
}

.book-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.1);
}

.book-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: #eee;
}

.book-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: 0.4s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.04);
}

.book-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #202020;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.book-info {
    padding: 18px;
}

.book-info h3 {
    margin: 0;
    color: #202020;
    font-size: 16px;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    margin: 7px 0 17px;
    color: #888;
    font-size: 13px;
}

.book-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
}

.book-price {
    display: block;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
}

.book-bottom small {
    display: block;
    margin-top: 4px;
    color: #999;
    font-size: 11px;
}

.book-cart {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #202020;
    color: white;
    text-decoration: none;
    transition: 0.25s ease;
}

.book-cart:hover {
    background: var(--primary-dark);
    color: #202020;
}

.empty-books {
    grid-column: 1 / -1;
    padding: 70px 20px;
    text-align: center;
    color: #888;
}

.empty-books i {
    font-size: 45px;
    color: var(--primary-dark);
}

.empty-books h3 {
    margin: 15px 0 5px;
    color: #333;
}

/* ================================
       WHY BOOK-KU
    ================================= */

.why-section {
    padding: 90px 0;
    background: #fff;
}

.why-heading {
    max-width: 600px;
    margin-bottom: 45px;
}

.why-heading h2 {
    font-size: 32px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.why-card {
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
    transition: 0.3s ease;
}

.why-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.why-card h3 {
    margin: 0 0 8px;
    color: #222;
    font-size: 17px;
}

.why-card p {
    margin: 0;
    color: #777;
    line-height: 1.7;
    font-size: 14px;
}

/* ================================
       RESPONSIVE
    ================================= */

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        margin: 0 auto;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .home-hero {
        min-height: 500px;
        padding: 56px 0;
    }

    .hero-text h1 {
        font-size: clamp(34px, 8vw, 42px);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-button,
    .hero-secondary {
        width: 100%;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .book-image {
        height: 360px;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }
}

/* catalog */

.catalog-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 50px;
    color: #26352d;
    font-family: Arial, Helvetica, sans-serif;
}

.catalog-page .catalog-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.catalog-page .catalog-sidebar {
    width: 100%;
}

.catalog-page .filter-box {
    padding: 20px 0;
    border-bottom: 1px solid #e8eee9;
}

.catalog-page .filter-box:first-child {
    padding-top: 0;
}

.catalog-page .filter-title {
    margin: 0 0 15px;

    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;

    color: #26352d;
}

.catalog-page .category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-page .category-item {
    display: flex;
    align-items: center;
    gap: 7px;

    cursor: pointer;

    font-size: 12px;
    color: #555f59;
}

.catalog-page .category-item input {
    width: 14px;
    height: 14px;

    accent-color: #267344;

    cursor: pointer;
}

.catalog-page .category-item span:first-of-type {
    flex: 1;
}

.catalog-page .category-count {
    min-width: 22px;
    padding: 2px 6px;

    border-radius: 10px;

    background: #edf5ef;
    color: #398052;

    font-size: 10px;
    text-align: center;
}

.catalog-page .author-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.catalog-page .author-search input {
    width: 100%;
    height: 34px;

    padding: 0 10px;

    border: 1px solid #dfe7e1;
    border-radius: 5px;

    outline: none;

    font-size: 12px;
}

.catalog-page .author-search input:focus {
    border-color: #267344;
}

.catalog-page .author-buttons {
    display: flex;
    gap: 6px;
}

.catalog-page .author-buttons button,
.catalog-page .author-buttons a {
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 10px;

    border-radius: 5px;

    font-size: 11px;
    text-decoration: none;
}

.catalog-page .author-buttons button {
    border: none;

    background: #1f6138;
    color: white;

    cursor: pointer;
}

.catalog-page .author-buttons a {
    border: 1px solid #dfe7e1;

    color: #59635d;
    background: white;
}

.catalog-page .price-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-page .price-item {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 12px;
    color: #59635d;

    cursor: pointer;
}

.catalog-page .price-item input {
    accent-color: #267344;
}

.catalog-page .clear-filter {
    margin-top: 20px;
}

.catalog-page .clear-filter a {
    display: inline-block;

    font-size: 11px;
    color: #c34b4b;

    text-decoration: none;
}

.catalog-page .clear-filter a:hover {
    text-decoration: underline;
}

.catalog-page .catalog-content {
    min-width: 0;
}

.catalog-page .catalog-header {
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
    padding: 0 4px;
}

.catalog-page .catalog-heading h1 {
    margin: 0;

    font-size: 22px;
    font-weight: 700;

    color: #26352d;
}

.catalog-page .catalog-heading p {
    margin: 5px 0 0;

    font-size: 11px;
    color: #89918c;
}

.catalog-page .catalog-sort {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 11px;
    color: #747c77;
}

.catalog-page .catalog-sort select {
    height: 32px;

    padding: 0 10px;

    border: 1px solid #e1e7e3;
    border-radius: 5px;

    background: white;

    color: #39443d;
    font-size: 11px;

    outline: none;
}

.catalog-page .book-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 14px;
}

.catalog-page .book-card {
    overflow: hidden;

    border: 1px solid #e5ebe7;
    border-radius: 7px;

    background: #ffffff;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.catalog-page .book-card:hover {
    transform: translateY(-3px);

    box-shadow: 0 8px 20px rgba(31, 61, 43, 0.08);
}

.catalog-page .book-image {
    height: 190px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px;

    background: #e6f0eb;
}

.catalog-page .book-image img {
    width: 105px;
    height: 145px;

    object-fit: cover;

    border-radius: 3px;

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);

    transition: transform 0.2s ease;
}

.catalog-page .book-card:hover .book-image img {
    transform: scale(1.03);
}

.catalog-page .book-info {
    padding: 12px 11px 13px;
}

.catalog-page .book-badge {
    display: inline-block;

    margin-bottom: 7px;
    padding: 3px 6px;

    border-radius: 3px;

    background: #eaf5ed;
    color: #267344;

    font-size: 9px;
    font-weight: 600;
}

.catalog-page .book-title {
    margin: 0;

    overflow: hidden;

    font-size: 13px;
    font-weight: 700;

    color: #2e3932;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.catalog-page .book-author {
    margin: 5px 0 8px;

    overflow: hidden;

    font-size: 10px;
    color: #858d88;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.catalog-page .book-rating {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-bottom: 11px;
}

.catalog-page .stars {
    color: #f0a000;

    font-size: 11px;
    letter-spacing: -1px;
}

.catalog-page .rating-number {
    font-size: 9px;
    color: #969d99;
}

.catalog-page .book-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-page .book-price {
    margin: 0;

    font-size: 11px;
    font-weight: 700;

    color: #267344;
}

.catalog-page .add-cart {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #194d2d;
    color: white;

    font-size: 18px;
    line-height: 1;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.catalog-page .add-cart:hover {
    transform: scale(1.08);

    background: #267344;
}

.catalog-page .empty-books {
    padding: 50px 20px;

    border: 1px dashed #dce5df;
    border-radius: 7px;

    text-align: center;

    color: #89918c;
    font-size: 13px;
}

.catalog-page .catalog-pagination {
    display: flex;
    justify-content: center;

    margin-top: 30px;
}

.catalog-page .catalog-pagination nav {
    display: flex;
    justify-content: center;
}

.catalog-page .catalog-pagination ul {
    display: flex;

    gap: 6px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.catalog-page .catalog-pagination li {
    list-style: none;
}

.catalog-page .catalog-pagination a,
.catalog-page .catalog-pagination span {
    min-width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    border: 1px solid #e1e7e3;
    border-radius: 50%;

    background: white;

    color: #4c5750;

    font-size: 10px;
    text-decoration: none;
}

.catalog-page .catalog-pagination .active span {
    border-color: #267344;

    background: #267344;
    color: white;
}

.catalog-page .catalog-pagination a:hover {
    border-color: #267344;
    color: #267344;
}

@media (max-width: 900px) {
    .catalog-page .catalog-layout {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 20px;
    }

    .catalog-page .book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .catalog-page {
        padding: 20px 15px 40px;
    }

    .catalog-page .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-page .catalog-sidebar {
        order: 2;
    }

    .catalog-page .catalog-content {
        order: 1;
    }

    .catalog-page .catalog-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .catalog-page .book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .catalog-page .book-grid {
        grid-template-columns: 1fr;
    }

    .catalog-page .book-image {
        height: 220px;
    }

    .catalog-page .book-image img {
        width: 120px;
        height: 165px;
    }
}
