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

.bookorderly-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    align-items: stretch;
}


/* ========================================
   BOOK CARD
   ======================================== */

.bookorderly-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;

    display: flex;
    flex-direction: column;

    min-width: 0;
    height: 100%;

    box-sizing: border-box;
}


/* ========================================
   COVER AREA
   ======================================== */

.bookorderly-cover {
    width: 100%;
    height: 300px;

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

    margin-bottom: 18px;

    background: #f8f9fb;
    border-radius: 8px;

    overflow: hidden;
}


/* Actual cover image */

.bookorderly-cover img {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 300px;

    object-fit: contain;
}


/* Missing image placeholder */

.bookorderly-no-cover {
    width: 100%;
    height: 100%;

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

    text-align: center;

    color: #6b7280;

    font-size: 14px;
    line-height: 1.4;

    padding: 20px;

    box-sizing: border-box;
}


/* Optional simple book icon */

.bookorderly-no-cover-icon {
    font-size: 42px;
    line-height: 1;

    margin-bottom: 10px;
}


/* ========================================
   CONTENT
   ======================================== */

.bookorderly-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    color: #222222;
}


/* ========================================
   TITLE
   ======================================== */

.bookorderly-card .bookorderly-title {
    color: #1f2937;

    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;

    margin: 0 0 8px 0;
    padding: 0;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* ========================================
   AUTHOR
   ======================================== */

.bookorderly-card .bookorderly-author {
    color: #6b7280;

    font-size: 14px;

    margin-bottom: 10px;
}


/* ========================================
   RATING
   ======================================== */

.bookorderly-card .bookorderly-rating {
    color: #333333;

    font-size: 14px;

    margin-bottom: 8px;
}


.bookorderly-card .bookorderly-reviews {
    color: #777777;

    font-size: 13px;
}


/* ========================================
   PRICE
   ======================================== */

.bookorderly-card .bookorderly-price {
    color: #111827;

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

    margin-bottom: 16px;
}


/* ========================================
   AMAZON BUTTON
   ======================================== */

.bookorderly-card .bookorderly-button {
    display: block;

    width: 100%;

    box-sizing: border-box;

    text-align: center;

    padding: 11px 16px;

    margin-top: auto;

    background: #222222;

    color: #ffffff;

    text-decoration: none;

    border-radius: 6px;

    font-size: 15px;

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


.bookorderly-card .bookorderly-button:hover {
    background: #333333;

    color: #ffffff;

    text-decoration: none;
}


/* ========================================
   TABLET
   ======================================== */

@media (max-width: 1024px) {

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


/* ========================================
   SMALL TABLET
   ======================================== */

@media (max-width: 768px) {

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

    .bookorderly-cover {
        height: 280px;
    }

    .bookorderly-cover img {
        max-height: 280px;
    }
}


/* ========================================
   PHONE
   ======================================== */

@media (max-width: 480px) {

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

    .bookorderly-cover {
        height: 260px;
    }

    .bookorderly-cover img {
        max-height: 260px;
    }

    .bookorderly-card {
        padding: 16px;
    }
}