/* book-detail.css - Fully Responsive */
.book-detail-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 50px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.back-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
    padding-top: 60px;
    padding-left: 40px;
}

.back-btn:hover {
    color: #333;
}

.book-detail-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

/* Book Image */
.book-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.book-cover {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Book Info */
.book-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

/* Rating */
.book-rating {
    display: flex;
    gap: 4px;
    font-size: 20px;
}

.star {
    color: #ddd;
}

.star-full {
    color: #fbbf24;
}

.star-half {
    background: linear-gradient(90deg, #fbbf24 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Price */
.book-price {
    font-size: 32px;
    font-weight: 700;
    color: #f59e0b;
}

/* Quantity Selector */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    background-color: #e0e0e0;
    border-radius: 999px;
    padding: 2px;
    width: fit-content;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    touch-action: manipulation;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-btn:active {
    background: #dddddd;
}

.qty-input {
    width: 50px;
    height: 44px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    padding: 0 4px;
}

.qty-input:focus {
    outline: none;
}

/* Remove number input arrows */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Description */
.book-description p {
    color: #666666;
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 24px;
}

/* Book Meta */
.book-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    border-top: none;
    border-bottom: none;
}

.meta-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-label {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    text-transform: uppercase;
    min-width: 100px;
    margin-right: 20px;
}

.meta-value {
    font-size: 16px;
    color: #666666;
    font-weight: 400;
}

:root {
    --gold-yellow: #FFB300;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: none;
    min-height: 48px;
    flex: 1;
}

.btn-secondary {
    background: white;
    color: var(--gold-yellow);
    border: 2px solid var(--gold-yellow);
}

.btn-secondary:hover {
    background: #fff8e1;
}

.btn-primary {
    background: var(--gold-yellow);
    color: #111;
    border: none;
}

.btn-primary:hover {
    background: #e6a200;
}

.btn:active {
    opacity: 0.9;
}

.btn-secondary svg {
    color: var(--gold-yellow);
}

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

/* Large Tablet */
@media (max-width: 1024px) {
    .book-detail-container {
        padding: 40px 32px;
    }

    .back-btn {
        padding-left: 32px;
        padding-top: 50px;
    }

    .book-detail-content {
        gap: 50px;
    }
}

/* Tablet & below: Stack image + info */
@media (max-width: 968px) {
    .book-detail-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .book-image-wrapper {
        max-width: 350px;
        margin: 0 auto;
    }

    .book-info {
        max-width: 600px;
        margin: 0 auto;
    }

    .book-title {
        font-size: 32px;
    }

    .book-price {
        font-size: 30px;
    }
}

/* Mobile L (425px and below) */
@media (max-width: 640px) {
    .book-detail-container {
        padding: 30px 20px;
    }

    .back-btn {
        padding-left: 20px;
        padding-top: 50px;
        font-size: 15px;
    }

    .book-detail-content {
        gap: 32px;
    }

    .book-image-wrapper {
        max-width: 280px;
    }

    .book-title {
        font-size: 26px;
    }

    .book-rating {
        font-size: 18px;
    }

    .book-price {
        font-size: 26px;
    }

    .book-price del {
        font-size: 18px;
        display: block;
        margin-left: 0 !important;
        margin-top: 4px;
    }

    .quantity-selector {
        margin: 8px 0;
    }

    .book-description p {
        font-size: 15px;
        line-height: 1.65;
    }

    .meta-label {
        font-size: 14px;
        min-width: 90px;
        margin-right: 12px;
    }

    .meta-value {
        font-size: 15px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .btn {
        width: 100%;
        font-size: 15px;
        padding: 15px 20px;
    }
}

/* Mobile M (375px and below) */
@media (max-width: 480px) {
    .book-detail-container {
        padding: 24px 16px;
    }

    .back-btn {
        padding-left: 16px;
        padding-top: 50px;
    }

    .book-image-wrapper {
        max-width: 240px;
    }

    .book-title {
        font-size: 24px;
        line-height: 1.3;
    }

    .book-rating {
        font-size: 16px;
    }

    .book-price {
        font-size: 24px;
    }

    .qty-btn {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }

    .qty-input {
        width: 50px;
        font-size: 16px;
    }

    .book-description p {
        font-size: 14px;
    }

    .book-meta {
        gap: 12px;
    }

    .meta-item {
        gap: 8px;
    }

    .meta-label {
        font-size: 13px;
        min-width: 80px;
    }

    .meta-value {
        font-size: 14px;
    }
}

/* Mobile S (320px and below) */
@media (max-width: 360px) {
    .book-detail-container {
        padding: 20px 12px;
    }

    .back-btn {
        padding-left: 12px;
        padding-top: 60px;
        font-size: 14px;
        gap: 6px;
    }

    .book-image-wrapper {
        max-width: 220px;
    }

    .book-title {
        font-size: 22px;
    }

    .book-price {
        font-size: 22px;
    }

    .qty-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .qty-input {
        width: 45px;
        font-size: 15px;
    }

    .btn {
        font-size: 14px;
        padding: 14px 18px;
        min-height: 46px;
    }

    .meta-label {
        font-size: 12px;
        min-width: 75px;
    }

    .meta-value {
        font-size: 13px;
    }
}