/*
Theme Name: TheGem Elementor Child
Description: Multi-Purpose Wordpress Theme
Author: Codex Themes.
Theme URI: http://codex-themes.com/thegem/
Author URI: http://codex-themes.com/thegem/
Template: thegem-elementor
Version: 1.0
Tags: one-column, two-columns, left-sidebar, right-sidebar, responsive-layout, custom-background, custom-colors, custom-header, custom-menu, featured-images, flexible-header, full-width-template, theme-options, translation-ready, dark, light
License: GNU General Public License
License URI: license.txt
*/

/* Fix for single post template section stretching incorrectly */
section.elementor-section.elementor-section-stretched.product-main-content.product-info-section {
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Fix for single product page section stretching causing layout issues (Horizontal Stretching) */
.single-product section.elementor-section.elementor-section-stretched {
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Fix for vertical whitespace caused by leftover WPBakery full-height classes */
.vc_row-o-full-height {
    min-height: auto !important;
    height: auto !important;
}

/* Prevent accidental massive margins on elementor sections in products */
.single-product .elementor-section {
    margin-bottom: 0 !important;
}

/* Standardize all Elementor divider widgets to consistent color and weight */
.elementor-widget-divider .elementor-divider-separator {
    border-top-color: #E6E4E0 !important;
    border-top-width: 1px !important;
}

/* ==========================================================================
   Acucraft Gallery Search & Filter Styles
   ========================================================================== */

.acucraft-gallery-filter-wrapper {
    margin-bottom: 40px;
}

/* Filter Row - Grid layout for multiple dropdowns */
.gallery-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* Search input takes more space */
.gallery-filter-item.gallery-search-wrap {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .gallery-filter-row {
        grid-template-columns: 1fr;
    }

    .gallery-filter-item.gallery-search-wrap {
        grid-column: span 1;
    }
}

/* Filter inputs and selects - uniform height */
.gallery-filter-item input,
.gallery-filter-item select {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.gallery-filter-item input:focus,
.gallery-filter-item select:focus {
    outline: none;
    border-color: #CC622E;
}

/* Gallery Grid - 2 columns */
.acucraft-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .acucraft-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Gallery Card - square edges */
.gallery-item-card {
    border: 1px solid #eee;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.gallery-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Gallery Card Image - Golden ratio (1.618:1) using background-image */
.gallery-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 1.618 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
}

/* Gallery Card Content */
.gallery-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-card-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
}

.gallery-card-title a {
    color: #CC622E;
    text-decoration: none;
    transition: color 0.2s;
}

.gallery-card-title a:hover {
    color: #a84e24;
}

.gallery-card-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

/* View Gallery Link - Per user specs: #CC622E, weight 400 */
.gallery-card-link {
    font-size: 14px;
    font-weight: 400;
    color: #CC622E;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.gallery-card-link:hover {
    opacity: 0.8;
}

/* Loading and No Results States */
.acucraft-loading,
.acucraft-loading-initial {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}

.gallery-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Numbered Pagination */
.acucraft-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.acucraft-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.acucraft-pagination .page-link:hover {
    background: #f5f5f5;
    border-color: #CC622E;
    color: #CC622E;
}

.acucraft-pagination .page-link.current {
    background: #CC622E;
    border-color: #CC622E;
    color: #fff;
    cursor: default;
}

.acucraft-pagination .page-prev,
.acucraft-pagination .page-next {
    font-weight: 500;
}

.acucraft-pagination .page-dots {
    color: #999;
    padding: 0 5px;
}

/* ============================================
   Blog Search & Archive Styles
   (Matches gallery filter design)
   ============================================ */

.acucraft-blog-search-wrapper {
    margin-bottom: 40px;
}

.blog-search-row {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.blog-search-wrap {
    display: flex;
    width: 100%;
    max-width: 600px;
}

.blog-search-wrap input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 0;
    font-size: 15px;
    height: 48px;
    box-sizing: border-box;
}

.blog-search-wrap input:focus {
    outline: none;
    border-color: #CC622E;
}

.blog-search-button {
    padding: 12px 24px;
    background-color: #CC622E;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 48px;
    white-space: nowrap;
}

.blog-search-button:hover {
    background-color: #a84e24;
}

/* Blog Grid - 2 columns like gallery */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    transition: opacity 0.3s ease;
}

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

/* Blog Card */
.blog-card {
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Blog Card Image - Golden ratio */
.blog-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 1.618 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
}

/* Blog Card Content */
.blog-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    line-height: 1.3;
}

.blog-card-title a {
    color: #CC622E;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: #a84e24;
}

/* Blog Card Date */
.blog-card-date {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    font-style: italic;
}

.blog-card-excerpt {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-card-link {
    font-size: 14px;
    font-weight: 400;
    color: #CC622E;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-link:hover {
    color: #a84e24;
}

/* Blog Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.blog-page-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.blog-page-link:hover {
    background-color: #CC622E;
    border-color: #CC622E;
    color: #fff;
}

.blog-page-current {
    background-color: #CC622E;
    border-color: #CC622E;
    color: #fff;
    cursor: default;
}

.blog-page-prev,
.blog-page-next {
    font-weight: 500;
}

/* ==========================================================================
   Acucraft Testimonial List Styles
   ========================================================================== */

.acucraft-testimonial-list {
    margin: 0 auto;
    max-width: 1200px;
}

/* Testimonial Card - Horizontal layout with hover like blog/gallery cards */
.testimonial-card {
    display: flex;
    flex-direction: row;
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Testimonial Image - Stretches full height, image covers area */
.testimonial-image {
    flex: 0 0 40%;
    min-width: 280px;
    align-self: stretch;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #F4F6F7;
}

/* Testimonial Content - Right side with white background and default text */
.testimonial-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

/* Testimonial Text */
.testimonial-text {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.testimonial-text p {
    margin: 0 0 1em 0;
}

.testimonial-text p:last-child {
    margin-bottom: 0;
}

/* Testimonial Author Signature */
.testimonial-author {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    font-weight: 600;
    color: #CC622E;
}

/* Dark Theme */
.acucraft-testimonial-list.theme-dark .testimonial-card {
    background: #1a1a1a;
    border-color: #333;
}

.acucraft-testimonial-list.theme-dark .testimonial-content {
    background: #1a1a1a;
}

.acucraft-testimonial-list.theme-dark .testimonial-text {
    color: #e5e5e5;
}

.acucraft-testimonial-list.theme-dark .testimonial-author {
    border-top-color: #444;
    color: #CC622E;
}

/* Desktop - Min-height from shortcode attribute */
@media (min-width: 769px) {
    .acucraft-testimonial-list .testimonial-card {
        min-height: var(--card-min-height, auto);
    }
}

/* Mobile Stacking */
@media (max-width: 768px) {
    .testimonial-card {
        flex-direction: column;
    }

    .testimonial-image {
        flex: none;
        width: 100%;
        min-width: auto;
        min-height: 200px;
        aspect-ratio: 1.618 / 1;
    }

    .testimonial-content {
        padding: 25px;
    }
}

/* Testimonial Pagination */
.acucraft-testimonial-pagination {
    margin-top: 40px;
    text-align: center;
}

.acucraft-testimonial-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.acucraft-testimonial-pagination li {
    display: inline-block;
}

.acucraft-testimonial-pagination a,
.acucraft-testimonial-pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.acucraft-testimonial-pagination a:hover {
    background: #f5f5f5;
    border-color: #CC622E;
    color: #CC622E;
}

.acucraft-testimonial-pagination span.current {
    background: #CC622E;
    border-color: #CC622E;
    color: #fff;
    cursor: default;
}

/* Testimonial No Results */
.testimonial-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* ==========================================================================
   Download Manager Card Styles
   Redesigned cards for WPDM download listings.
   ========================================================================== */

/* Card container */
.acucraft-download-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    margin-bottom: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.acucraft-download-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Icon area */
.download-card-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-card-icon .wpdm_icon {
    height: 44px;
    width: auto;
    display: block;
}

/* Body — title and meta */
.download-card-body {
    flex: 1;
    min-width: 0;
}

.download-card-title {
    margin: 0 0 4px 0;
    padding: 0;
    border: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.download-card-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 14px;
}

.download-card-meta i {
    margin-right: 4px;
    opacity: 0.6;
}

/* Download button area */
.download-card-action {
    flex: 0 0 auto;
}

.download-card-action .btn.wpdm-download-link,
.download-card-action .btn.btn-primary {
    padding: 10px 28px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background-color: #CC622E;
    border: 2px solid #CC622E;
    color: #fff;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.download-card-action .btn.wpdm-download-link:hover,
.download-card-action .btn.btn-primary:hover {
    background-color: transparent;
    color: #CC622E;
}

/* Override WPDM default .well styles on our cards */
.acucraft-download-card .well,
.acucraft-download-card.well,
blockquote.well.acucraft-download-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

/* Mobile: stack vertically */
@media (max-width: 580px) {
    .acucraft-download-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px;
    }

    .download-card-title {
        white-space: normal;
    }

    .download-card-action {
        width: 100%;
    }

    .download-card-action .btn.wpdm-download-link,
    .download-card-action .btn.btn-primary {
        width: 100%;
        text-align: center;
    }
}