/*
Theme Name: Opsim Theme
Theme URI: https://opsim.ma
Author: Opsim.ma
Author URI: https://opsim.ma
Description: High-performance WordPress & WooCommerce theme by Opsim (opsim.ma), built specifically for Cash on Delivery stores. Visibility Team delivers advanced AutoForm ordering, smart Auto Cart & Cart Drawer, seamless Facebook, TikTok, and Google Pixel integration, plus a modern live chat system — all optimized for speed, mobile performance, and maximum conversions.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opsim
*/

/* Custom additions for the Shop by Product Add to Cart Button */
.product-card .pro-buy-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary-color, #427A76);
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    margin-top: 12px;
    border: none;
    cursor: pointer;
    box-shadow: none;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 2;
}

.product-card .pro-buy-btn:hover {
    opacity: 0.85;
    color: #fff !important;
}

@media (max-width: 600px) {
    .product-card .pro-buy-btn {
        padding: 8px;
        font-size: 11px;
    }
}

/* ==========================================================================
   Opsim Custom Blog Posts Gutenberg Block Layout & Styles
   ========================================================================== */
.blog-grid-section {
    padding: 60px 0;
    background: transparent;
    box-sizing: border-box;
}

.blog-grid-section .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.blog-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.blog-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.blog-card-image-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #e2e8f0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.blog-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    margin: 0;
}


.blog-card-img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

.blog-card-category a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-color, #427A76);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-decoration: none !important;
    line-height: 1.2;
    transition: opacity 0.2s ease;
}

.blog-card-category a:hover {
    opacity: 0.9;
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
    box-sizing: border-box;
}

.blog-card-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 500;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    font-family: inherit;
}

.blog-card-title a {
    color: #1e293b;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color, #427A76);
}

.blog-card-excerpt {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-excerpt p {
    margin: 0;
    padding: 0;
}

.blog-card-readmore {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color, #427A76);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
    margin-top: auto;
}

.blog-card-readmore:hover {
    transform: translateX(4px);
}

/* Blog Pagination */
.blog-pagination {
    margin-top: 50px;
    text-align: center;
}

.blog-pagination .page-numbers {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
    background: var(--primary-color, #427A76);
    color: #ffffff !important;
    border-color: var(--primary-color, #427A76);
}

.blog-pagination .page-numbers.prev,
.blog-pagination .page-numbers.next {
    width: auto;
    padding: 0 16px;
    border-radius: 30px;
}

/* Hide entry header and page titles dynamically on pages using the dynamic Blog block */
.has-opsim-blog-block .entry-header,
.has-opsim-blog-block .entry-title,
.has-opsim-blog-block .page-header,
.has-opsim-blog-block .page-title,
.has-opsim-blog-block h1.page-title {
    display: none !important;
}

/* ==========================================================================
   Opsim Custom Comments Section & Comments Form Styles
   ========================================================================== */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.comments-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 30px;
}

.comment-list {
    margin: 0 0 40px 0;
    padding: 0;
    list-style: none;
}

.comment-list .comment {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
}

.comment-body {
    display: flex;
    gap: 20px;
}

.comment-meta {
    flex-shrink: 0;
}

.comment-meta img {
    border-radius: 50%;
    display: block;
}

.comment-content {
    flex-grow: 1;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    text-align: left;
}

.comment-metadata {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    font-weight: 500;
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
}

.comment-metadata .fn {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    font-style: normal;
    display: block;
    margin-bottom: 2px;
}

.comment-reply {
    margin-top: 10px;
}

.comment-reply a {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color, #427A76);
    text-decoration: none !important;
}

/* Comment Form styling */
#reply-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
}

.comment-form-comment textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

.comment-form-comment textarea:focus {
    border-color: var(--primary-color, #427A76);
}

.submit-comment-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color, #427A76);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: none;
    transition: opacity 0.2s ease;
    margin-top: 10px;
}

.submit-comment-btn:hover {
    opacity: 0.9;
}