/* ================================
   SWJ Books - Product Page Styles
   ================================ */

/* Reset and Base Styles */
.swj-book-container *,

}

/* Container & Layout - Uses theme fonts and colors */
.swj-book-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 30px 3%;
    /* Inherits background from theme */
}

.swj-book-product-page {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(500px, 2fr) minmax(280px, 320px);
    gap: clamp(20px, 3vw, 40px);
    margin-top: 20px;
    max-width: min(1600px, 96%);
    margin-left: auto;
    margin-right: auto;
    padding: 0 2%;
}

@media (max-width: 1500px) {
    .swj-book-product-page {
        grid-template-columns: 340px minmax(450px, 1fr) 290px;
        gap: 30px;
    }
}

@media (max-width: 1400px) {
    .swj-book-product-page {
        grid-template-columns: 320px minmax(400px, 1fr) 280px;
        gap: 25px;
    }
}

@media (max-width: 1200px) {
    .swj-book-product-page {
        grid-template-columns: 280px 1fr 280px;
        gap: 15px;
    }

    .swj-book-container {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .swj-book-product-page {
        grid-template-columns: 1fr;
        gap: 25px;
        display: flex;
        flex-direction: column;
    }

    .swj-book-buybox {
        order: 1;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }

    .swj-book-image-section {
        display: contents;
    }

    .swj-book-main-image {
        order: 2;
    }

    .swj-book-details-section {
        order: 3;
    }

    .swj-follow-author-card {
        order: 4;
        margin-top: 0;
    }

    .swj-product-details {
        width: 100%;
    }

    .swj-buybox-inner {
        width: 100%;
    }
}

/* Image Section */
.swj-book-image-section {
    position: relative;
    height: fit-content;
}

.swj-book-main-image {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px;
    text-align: center;
}

.swj-book-cover {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.swj-book-cover:hover {
    transform: scale(1.02);
}

/* Book Details Section */
.swj-book-details-section {
    padding: 0 10px;
    min-width: 0; /* Prevent overflow */
}

.swj-book-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.25;
    margin: 0 0 12px 0;
    font-weight: 600;
    /* Inherits color from theme */
    word-wrap: break-word;
}

.swj-book-byline {
    font-size: 0.9375rem;
    margin-bottom: 15px;
    opacity: 0.8;
    line-height: 1.5;
}

.swj-book-byline a {
    color: #26a957;
    text-decoration: none;
}

.swj-book-byline a:hover {
    text-decoration: underline;
}

/* Rating Stars */
.swj-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.swj-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.swj-star {
    font-size: 18px;
    line-height: 1;
}

.swj-star-full {
    color: #FFA41C;
}

.swj-star-half {
    color: #FFA41C;
    opacity: 0.5;
}

.swj-star-empty {
    color: rgba(0, 0, 0, 0.15);
}

.swj-rating-text {
    font-size: 16px;
    font-weight: 500;
}

.swj-review-count {
    font-weight: 400;
    opacity: 0.7;
    font-size: 14px;
}

.swj-book-format {
    margin: 15px 0;
}

.swj-format-badge {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 6px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
}

.swj-format-badge:last-child {
    margin-right: 0;
}

.swj-divider {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Description */
.swj-book-description {
    margin: 25px 0;
}

.swj-book-description h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 30px;
}

.swj-book-description h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 20px 0 12px 0;
}

.swj-book-description p {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

.swj-book-description ul,
.swj-book-description ol {
    margin: 15px 0;
    padding-left: 25px;
}

.swj-book-description li {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Product Details */
.swj-product-details {
    margin: 30px 0 40px 0;
    padding: 22px;
    background: rgba(0,0,0,0.025);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
}

.swj-product-details h3 {
    font-size: 1.1875rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.swj-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.swj-details-list li {
    padding: 11px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
    display: flex;
    gap: 20px;
    align-items: baseline;
}

.swj-details-list li:first-child {
    padding-top: 0;
}

.swj-details-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.swj-detail-label {
    font-weight: 600;
    opacity: 0.65;
    min-width: 160px;
    flex-shrink: 0;
}

.swj-detail-value {
    flex: 1;
    word-wrap: break-word;
}

/* Buy Box */
.swj-book-buybox {
    position: relative;
    height: fit-content;
}

.swj-buybox-inner {
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 18px;
    background: rgba(255,255,255,0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.swj-buybox-format {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 12px;
    font-weight: 500;
}

.swj-buybox-price {
    margin: 15px 0;
}

.swj-price {
    display: block;
    font-size: 26px;
    color: #000;
    font-weight: 500;
    line-height: 1.2;
}

.swj-price-inr {
    margin-bottom: 6px;
}

.swj-price-usd {
    font-size: 17px;
    opacity: 0.7;
    font-weight: 400;
}

.swj-buybox-delivery {
    font-size: 14px;
    margin: 14px 0;
    line-height: 1.4;
}

.swj-buybox-delivery strong {
    color: #007600;
    font-weight: 600;
}

.swj-buybox-stock {
    font-size: 17px;
    margin: 14px 0;
}

.swj-in-stock {
    color: #007600;
    font-weight: 500;
}

.swj-buy-button {
    display: block;
    text-align: center;
    width: 100%;
    padding: 11px 18px;
    margin: 9px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.15s ease;
}

.swj-buy-amazon-in {
    background: #FFD814;
    color: #0F1111;
    border-color: #FCD200;
    box-shadow: 0 2px 5px rgba(213, 217, 217, .5);
}

.swj-buy-amazon-in:hover {
    background: #F7CA00;
    border-color: #F2C200;
    box-shadow: 0 2px 5px rgba(213, 217, 217, .7);
}

.swj-buy-amazon-com {
    background: #FFA41C;
    color: #0F1111;
    border-color: #FF8F00;
    box-shadow: 0 2px 5px rgba(213, 217, 217, .5);
}

.swj-buy-amazon-com:hover {
    background: #FA8900;
    border-color: #E77600;
    box-shadow: 0 2px 5px rgba(213, 217, 217, .7);
}

.swj-buy-other {
    background: #007185;
    color: #fff;
    border: 1px solid #006175;
}

.swj-buy-other:hover {
    background: #005A6E;
}

.swj-amazon-icon {
    display: none; /* Hide Amazon icons */
}

.swj-buybox-secure {
    text-align: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.swj-buybox-secure small {
    opacity: 0.6;
    font-size: 12px;
}



/* ================================
   Follow the Author Card
   ================================ */

.swj-follow-author-card {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    text-align: center;
}

.swj-author-avatar {
    margin: 0 auto 14px;
    width: 90px;
    height: 90px;
}

.swj-author-avatar a {
    display: block;
    width: 100%;
    height: 100%;
}

.swj-author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.06);
    transition: opacity 0.2s ease;
}

.swj-author-avatar a:hover img {
    opacity: 0.85;
}

.swj-author-card-heading {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-align: center;
}

.swj-author-name {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px 0;
    text-align: center;
}

.swj-author-name a {
    text-decoration: none;
    color: #26a957;
    transition: opacity 0.2s ease;
}

.swj-author-name a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.swj-author-social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 12px 0 16px 0;
}

.swj-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.swj-social-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.9);
    border-color: rgba(0, 0, 0, 0.3);
}

.swj-social-icon svg {
    width: 18px;
    height: 18px;
}

.swj-author-card-bio {
    font-size: 12px;
    line-height: 1.65;
    margin: 0;
    text-align: left;
    color: #333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .swj-book-container {
        padding: 20px 4%;
    }

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

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

@media (max-width: 576px) {
    .swj-book-container {
        padding: 15px 3%;
    }

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

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

       .swj-product-details {
        padding: 16px;
    }

    .swj-detail-label {
        min-width: 120px;
    }
}
/* Add to books-style.css at the end */

/* ================================
   Coming Soon Badge
   ================================ */

.swj-coming-soon-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fdd75d 0%, #fd9927 100%);
    color: #000;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.swj-release-date {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    font-weight: 500;
}



/* Single page badge */
.swj-book-details-section .swj-coming-soon-badge {
    display: inline-block;
    margin-bottom: 12px;
}

/* Buy box modifications for coming soon */
.swj-buybox-coming-soon {
    background: #f9f9f9;
    border: 2px solid #667eea;
    padding: 16px;
    border-radius: 6px;
    text-align: center;
    margin: 15px 0;
}

.swj-buybox-coming-soon .swj-coming-soon-badge {
    display: block;
    margin: 0 auto 10px;
    width: fit-content;
}

.swj-buybox-coming-soon p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.swj-notify-button {
    display: inline-block;
    padding: 11px 24px;
    margin-top: 10px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.swj-notify-button:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Disabled buy buttons for coming soon */
.swj-buy-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}