

/*
 * ==========================================================================
 * Custom 3-Column Book Product Page Styles
 * ==========================================================================
 */

/* Main Product Container & Grid Layout */
.single-product div.product {
    padding: 1.5rem; /* Equivalent to p-6 */
    background-color: #ffffff;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.lg\:grid {
    display: grid;
    gap: 2rem; /* gap-8 */
}

/* On desktop, use a 24-column grid system like the original HTML */
@media (min-width: 1024px) {
    .lg\:grid-cols-24 {
        grid-template-columns: repeat(24, minmax(0, 1fr));
    }
    .lg\:col-span-5 { grid-column: span 5 / span 5; }
    .lg\:col-span-14 { grid-column: span 14 / span 14; }
}

/* --- Left Column: Image & Actions --- */
aside.lg\:col-span-6 {
    grid-column: span 6 / span 6;
}
@media (min-width: 1280px) {
    aside.xl\:col-span-5 {
        grid-column: span 5 / span 5;
    }
}
.woocommerce-product-gallery {
    border-radius: 0.5rem;
    overflow: hidden;
}

.book-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.book-actions .button,
.book-actions a.button {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

/* Primary "Add to Cart" Button */
.book-actions .single_add_to_cart_button {
    background-color: #14b8a6; /* teal-500 */
    color: white;
}
.book-actions .single_add_to_cart_button:hover {
    background-color: #0d9488; /* teal-600 */
}

/* Secondary "Read for Free" Button */
.book-actions .book-button-secondary {
    background-color: #f97316; /* orange-500 */
    color: white;
}
.book-actions .book-button-secondary:hover {
    background-color: #ea580c; /* orange-600 */
}

/* Tertiary "Add Review" Button */
.book-actions .book-button-tertiary {
    background-color: #6b7280; /* gray-500 */
    color: white;
}
.book-actions .book-button-tertiary:hover {
    background-color: #4b5563; /* gray-600 */
}

.price-summary {
    margin-top: 2rem;
    font-size: 0.875rem;
}
.price-summary .price {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.price-summary .price > del {
    order: 1;
    position: relative;
    color: #be123c; /* rose-700 */
    padding-right: 45px;
}
.price-summary .price > del::before {
    content: "قبل:";
    position: absolute;
    right: 0;
    font-weight: bold;
    color: #4b5563; /* gray-600 */
}
.price-summary .price > ins {
    order: 2;
    position: relative;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937; /* gray-800 */
    text-decoration: none;
    padding-right: 45px;
}
.price-summary .price > ins::before {
    content: "بعد:";
    position: absolute;
    right: 0;
    font-size: 0.875rem;
    font-weight: bold;
    color: #4b5563; /* gray-600 */
}

.info-box-container {
    margin-top: 1.5rem;
    background-color: #fefce8; /* yellow-50 */
    padding: 0.75rem;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.info-box-icon { font-size: 1.25rem; }
.info-box-text { display: flex; flex-direction: column; font-size: 0.75rem; }
.info-box-text .font-bold { font-weight: bold; }
.info-box-text .italic { font-style: italic; }

/* --- Center Column: Title & Content --- */
article.lg\:col-span-11 {
    grid-column: span 11 / span 11;
}
@media (min-width: 1280px) {
    article.xl\:col-span-14 {
        grid-column: span 14 / span 14;
    }
}
.product_title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #334155;
    margin-bottom: 0.5rem;
}
.woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.book-section-heading {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #475569;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 4px solid #f43f5e; /* rose-500 */
}
.woocommerce-product-details__short-description {
    color: #4b5563;
    line-height: 1.75;
}
.book-author-section { margin-top: 2rem; }
.author-box {
    background-color: #f8fafc; /* slate-50 */
    padding: 1.5rem;
    border-radius: 0.5rem;
}

/* --- Right Column: Metadata --- */
aside.lg\:col-span-7 {
    grid-column: span 7 / span 7;
}
@media (min-width: 1280px) {
    aside.xl\:col-span-5 {
        grid-column: span 5 / span 5;
    }
}
.book-metadata-list {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    font-size: 0.875rem;
}
.metadata-row {
    display: grid;
    grid-template-columns: 2fr 3fr;
    border-bottom: 1px solid #e2e8f0;
}
.metadata-row:last-child { border-bottom: none; }
.metadata-row dt, .metadata-row dd {
    padding: 0.75rem 1rem;
}
.metadata-row dt {
    font-weight: bold;
    color: #334155;
    background-color: #f1f5f9;
}
.metadata-row dd {
    color: #475569;
    background-color: #f8fafc;
}
.woocommerce-sharing-buttons { margin-top: 1rem; }

.book-categories-widget {
    margin-top: 2rem;
}
.book-categories-widget .widget-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
.book-categories-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #e2e8f0;
}
.book-categories-widget li {
    border-bottom: 1px solid #e2e8f0;
}
.book-categories-widget li a {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    color: #475569;
    transition: background-color 0.2s ease;
}
.book-categories-widget li a:hover {
    background-color: #f1f5f9;
}
.book-categories-widget .category-name {
    color: #be185d; /* pink-700 */
    font-weight: 500;
}
.book-categories-widget .category-count {
    color: #64748b;
}

/* Custom styles for WooCommerce Tabs to work well with Tailwind */
.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0;
    border-bottom: 2px solid #e2e8f0; /* slate-200 */
    margin-bottom: -2px; /* Pulls the content border up */
}

.woocommerce-tabs ul.tabs::before {
    display: none; /* Hide default WC border */
}

.woocommerce-tabs ul.tabs li {
    background-color: #f1f5f9; /* slate-100 */
    border: 2px solid #e2e8f0; /* slate-200 */
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 0.5rem 1.5rem;
    margin: 0;
    color: #475569; /* slate-600 */
    font-weight: bold;
    cursor: pointer;
    position: relative;
    top: 2px;
}

.woocommerce-tabs ul.tabs li.active {
    background-color: white;
    border-bottom-color: white;
}

.woocommerce-tabs ul.tabs li a {
    color: inherit;
    text-decoration: none;
}

.woocommerce-tabs .woocommerce-Tabs-panel {
    padding: 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 0 0.5rem 0.5rem 0.5rem;
}



/*
 * ==========================================================================
 * STYLING FOR WOOCOMMERCE BREADCRUMB
 * ==========================================================================
 */

.woocommerce-breadcrumb {
    /* Centering and Spacing */
    max-width: 1280px; /* Corresponds to max-w-7xl */
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.5rem; /* Adds space below the breadcrumb */
    padding: 1rem 1.5rem;

    /* Appearance */
    background-color: #ffffff;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);

    /* Font and Text */
    font-size: 0.875rem; /* text-sm */
    color: #475569; /* slate-600 */

    /* Flexbox for alignment */
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on small screens */
}

/* Style for the links */
.woocommerce-breadcrumb a {
    color: #64748b; /* slate-500 */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.woocommerce-breadcrumb a:hover {
    color: #1e293b; /* slate-800 */
}

/* Style for the separators (the slashes) */
.woocommerce-breadcrumb .breadcrumb-separator {
    margin: 0 0.75rem;
    color: #cbd5e1; /* slate-300 */
}

/* Style for the current page (which is not a link) */
.woocommerce-breadcrumb {
    color: #1e293b; /* slate-800 */
    font-weight: 600; /* font-semibold */
}


/**
 * ==========================================================================
 * FINAL STYLES FOR WOOCOMMERCE REVIEWS & COMMENTS (v2 - Polished Design)
 * ==========================================================================
 * This is a production-ready stylesheet that incorporates the theme's brand identity
 * for a pixel-perfect, compact, and professional design.
 */

/* --- Main Tabs Wrapper --- */
.woocommerce-tabs.wc-tabs-wrapper {
    margin-top: 4rem;
    font-family: "Almarai", sans-serif;
}

/* Tab Links List */
.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 -1px 0;
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid #e2e8f0; /* slate-200 */
}

.woocommerce-tabs ul.tabs::before {
    display: none; /* Remove default WC underline */
}

/* Individual Tab Link */
.woocommerce-tabs ul.tabs li {
    background-color: #f8fafc; /* slate-50 */
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    margin: 0;
    position: relative;
}

.woocommerce-tabs ul.tabs li a {
    padding: 0.75rem 1.5rem;
    display: block;
    text-decoration: none;
    color: #7A7A7A; /* Text brand color */
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Active Tab Style */
.woocommerce-tabs ul.tabs li.active {
    background-color: #ffffff;
    border-bottom-color: #ffffff;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #CE5A07; /* Primary brand color */
}

/* --- Tab Content Panel --- */
.woocommerce-Tabs-panel {
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 0 0.5rem 0.5rem 0.5rem;
    background-color: #ffffff;
}

/* --- Existing Comments List --- */
#reviews .woocommerce-Reviews-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #190D06; /* Dark brand color */
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.commentlist li.review {
    padding: 1.5rem;
    border: 1px solid #f1f5f9; /* slate-100 */
    border-radius: 0.5rem;
    background-color: #f8fafc;
    margin-bottom: 1rem;
}

.commentlist li.review:last-child {
    margin-bottom: 0;
}

.comment_container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.comment_container .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.comment-text {
    flex-grow: 1;
}

.comment-text .star-rating {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}
.comment-text .star-rating span::before {
    color: #B49513; /* Secondary brand color */
}

.comment-text p.meta {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #7A7A7A;
}

.comment-text .meta .woocommerce-review__author {
    font-weight: 700;
    color: #513838;
}

.comment-text .description p {
    margin: 0;
    color: #190D06; /* Dark brand color */
    line-height: 1.6;
}

/* --- Review Form --- */
#review_form_wrapper {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
}

#review_form .comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #190D06;
    margin-bottom: 1.5rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    font-weight: 600;
    color: #513838;
    display: block;
    margin-bottom: 0.5rem;
}

/* Star Rating Input */
.comment-form-rating .stars a {
    color: #cbd5e1; /* slate-300 */
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.2s ease;
    margin-left: 0.25rem;
}
.comment-form-rating .stars a:hover,
.comment-form-rating .stars a.active {
    color: #B49513; /* Secondary brand color */
}

/* Form Inputs & Textarea */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #CE5A07;
    box-shadow: 0 0 0 2px rgba(206, 90, 7, 0.2);
}

/* Checkbox */
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.comment-form-cookies-consent label {
    margin-bottom: 0;
    font-weight: 400;
    color: #7A7A7A;
}

/* Submit Button */
.form-submit .submit {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    background-color: #CE5A07; /* Primary Brand Color */
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-submit .submit:hover {
    background-color: #82522a; /* Accent Brand Color */
}
div#comments * {
    color: #513838 !important;
}



