/**
 * Katalog Buku - Frontend Styles
 * Clean, minimalist design. No gradients.
 */

/* ==========================================================================
   Book Grid
   ========================================================================== */

.kb-book-grid {
    margin: 0 -12px;
}

.kb-book-grid > div {
    padding: 0 12px;
    margin-bottom: 30px !important;
}

/* ==========================================================================
   Book Card
   ========================================================================== */

.kb-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
    margin-bottom: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.kb-book-grid .kb-card {
    margin-bottom: 0;
}

.kb-card:hover {
    border-color: #ccc;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

/* Image Area */
.kb-card-image {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 20px;
    background: #fafafa;
    flex-shrink: 0;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-card-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.kb-card-image img {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
}

.kb-card:hover .kb-card-image img {
    transform: scale(1.03);
}

/* Category Tag */
.kb-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.kb-card-category span {
    display: inline-block;
    padding: 3px 10px;
    background: #1a1a1a;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-radius: 3px;
}

/* Info Area */
.kb-card-info {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kb-card-title {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 6px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.kb-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.kb-card-title a:hover {
    color: #555;
}

/* ==========================================================================
   Card Meta
   ========================================================================== */

.kb-card-author {
    font-size: 13px;
    color: #666;
    margin: 4px 0 0;
}

.kb-card-publisher {
    font-size: 12px;
    color: #999;
    margin: 2px 0 0;
}

/* ==========================================================================
   Buy Button (Card)
   ========================================================================== */

.kb-card-buy {
    display: inline-block;
    margin-top: auto;
    padding: 7px 16px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background .2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    align-self: flex-start;
}

.kb-card-buy:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.kb-card-buy i {
    margin-left: 4px;
    font-size: 10px;
}

/* ==========================================================================
   Buy Button (Single Page)
   ========================================================================== */

.kb-buy-action .c-btn.book-buy-btn {
    background: #1a1a1a;
    border-color: #1a1a1a;
    border-radius: 4px;
    font-weight: 500;
    padding: 10px 24px;
}

.kb-buy-action .c-btn.book-buy-btn:hover {
    background: #333;
    border-color: #333;
}

/* ==========================================================================
   Availability (Single Page)
   ========================================================================== */

.book-availability {
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.book-availability-available {
    background: #f0faf0;
    color: #1a7a1a;
}

.book-availability-out-of-stock {
    background: #fef2f2;
    color: #b91c1c;
}

.book-availability-preorder {
    background: #fffbeb;
    color: #92400e;
}

/* ==========================================================================
   No Cover Placeholder
   ========================================================================== */

.kb-no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f5f5f5;
    color: #ccc;
}

/* ==========================================================================
   Single Book Page
   ========================================================================== */

.kb-single-book {
    padding: 40px 0;
}

.kb-book-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.kb-book-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.kb-book-author {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}

.kb-book-meta-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.kb-book-meta-table th,
.kb-book-meta-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    text-align: left;
    vertical-align: top;
}

.kb-book-meta-table th {
    width: 150px;
    font-weight: 600;
    color: #666;
}

.kb-book-description h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* ==========================================================================
   Archive
   ========================================================================== */

.kb-archive-books {
    padding: 40px 0;
}

.kb-archive-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.kb-search-form-wrapper {
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
}

.kb-search-form .form-control {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.kb-search-form .form-control:focus {
    border-color: #999;
    outline: none;
}

.kb-search-result-count {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.kb-pagination {
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
    clear: both;
}

.kb-pagination ul.page-numbers {
    display: inline-flex !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.kb-pagination ul.page-numbers li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.kb-pagination ul.page-numbers li a,
.kb-pagination ul.page-numbers li span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50% !important;
    color: #4a5568 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    line-height: 1 !important;
}

.kb-pagination ul.page-numbers li a::before,
.kb-pagination ul.page-numbers li a::after,
.kb-pagination ul.page-numbers li span::before,
.kb-pagination ul.page-numbers li span::after {
    display: none !important; /* Hide Font Awesome icons from parent theme */
}

.kb-pagination ul.page-numbers li a:hover {
    background: #e4573d !important;
    border-color: #e4573d !important;
    color: #ffffff !important;
}

.kb-pagination ul.page-numbers li span.current {
    background: #e4573d !important;
    color: #ffffff !important;
    border-color: #e4573d !important;
}

.kb-pagination ul.page-numbers li span.dots {
    border: none !important;
    background: transparent !important;
    color: #a0aec0 !important;
    box-shadow: none !important;
    width: auto !important;
    min-width: 24px !important;
}

/* ==========================================================================
   No Books Message
   ========================================================================== */

.kb-no-books {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .kb-book-title {
        font-size: 22px;
    }

    .kb-book-meta-table th {
        width: 110px;
    }

    .kb-card-title {
        font-size: 13px;
        min-height: 36px;
    }

    .kb-card-image img {
        max-height: 160px;
    }

    .kb-card-info {
        padding: 10px 12px 14px;
    }

    .kb-pagination .pagination li a,
    .kb-pagination .pagination li span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .kb-carousel-wrapper {
        padding: 0;
        overflow: visible;
    }
}

/* ==========================================================================
   Carousel / Slider
   ========================================================================== */

.kb-carousel-wrapper {
    position: relative;
    padding: 0;
    overflow: visible;
}

.kb-carousel-item {
    padding: 4px;
}

.kb-carousel-item .kb-card {
    margin-bottom: 8px;
}

/* Nav Arrows */
.kb-owl-carousel .owl-nav {
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.kb-owl-carousel .owl-stage-outer {
    overflow: visible;
}

.kb-owl-carousel .owl-nav button {
    pointer-events: auto;
    position: absolute;
    top: 0;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.95) !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.1) !important;
    cursor: pointer;
    font-size: 0 !important;
    line-height: 1 !important;
    color: transparent !important;
    z-index: 10;
}

.kb-owl-carousel .owl-nav button:hover {
    border-color: #1a1a1a !important;
    background: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.2) !important;
}

.kb-owl-carousel .owl-nav .owl-prev {
    left: -22px;
}

.kb-owl-carousel .owl-nav .owl-next {
    right: -22px;
}

.kb-owl-carousel .owl-nav button::before {
    display: block;
    width: 20px;
    height: 20px;
    color: #555;
    line-height: 1;
}

.kb-owl-carousel .owl-nav button:hover::before {
    color: #fff;
    width: 20px;
    height: 20px;
}

.kb-owl-carousel .owl-nav .owl-prev::before {
    content: "";
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E") center/contain no-repeat;
}

.kb-owl-carousel .owl-nav .owl-next::before {
    content: "";
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Dots */
.kb-owl-carousel .owl-dots {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.kb-owl-carousel .owl-dot {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.kb-owl-carousel .owl-dot span {
    display: block;
    width: 6px;
    height: 6px;
    background: #d0d0d0;
    border-radius: 50%;
    transition: all .2s ease;
}

.kb-owl-carousel .owl-dot.active span {
    background: #1a1a1a;
    width: 18px;
    border-radius: 3px;
}

.kb-owl-carousel .owl-dot:hover span {
    background: #999;
}
