/*
 Theme Name:   Grin
 Theme URI:    https://wpastra.com/
 Description:  Grin is a child theme of Astra, designed for a modern and clean look.

 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  grin
*/

/* ==========================================================================
   Child Theme Custom Styles
   ========================================================================= */




.grin-gallery-container {
    width: 100%;
    margin-bottom: 30px;
}

.grin-main-slider {
    width: 100%;
    max-width: 1280px;
    height: 563px;
    overflow: hidden;
    border-radius: 48px;
    background: #f9f9f9;
    direction: ltr;
    /* Force LTR to ensure consistent translation logic */
    position: relative;
}

.grin-slides {
    display: flex;
    flex-direction: row;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.grin-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.grin-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grin-thumbnails {
    display: flex;
    justify-content: flex-start;
    /* This will be right in RTL, which is what we want */
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
    direction: rtl;
    /* Ensure thumbnails flow is RTL as per site */
}



.grin-thumb {
    width: 255px;
    height: 154px;
    cursor: pointer;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.grin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grin-thumb.active {
    border: 3px solid #03642D;
    opacity: 1;
}

/* Mobile/Tablet Styles for Product Gallery */
@media (max-width: 768px) {
    .grin-main-slider {
        width: 100%;
        max-width: 100%;
        /* Allows it to be fullwidth */
        height: auto;
        aspect-ratio: 343 / 180;
        /* Keeps the same visual proportion you liked */
        border-radius: 16px;
        margin: 0 auto;
    }

    .grin-thumbnails {
        justify-content: space-between;
        gap: 10px;
        margin-top: 15px;
        display: flex;
    }

    .grin-thumb {
        flex: 1;
        /* Makes the 3 thumbs take equal space to fill width */
        max-width: calc(33.33% - 7px);
        height: auto;
        aspect-ratio: 108 / 74;
        border-radius: 16px;
        border-width: 1.28px;
    }

    .grin-thumb.active {
        border: 1.28px solid rgba(3, 100, 45, 1);
    }

    .grin-thumb:nth-child(n+4) {
        display: none;
    }
}




/* Specific styles for card-travel elements */
.card-travel .elementor-icon-box-title {
    margin-top: -83px !important;
    margin-right: 44px !important;
}

/* Buy Now Button Styles */
.grin-buy-now-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
}

.grin-buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 1120px;
    height: 72px;
    background: #03642D;
    border-radius: 32px;
    text-decoration: none !important;
    transition: transform 0.2s ease, background 0.2s ease;
    margin: 0 auto;
}


.grin-buy-now-btn:hover {
    background: #024d23;
    transform: translateY(-2px);
}

.grin-btn-text {
    font-family: 'Cairo', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 20px;
    color: #FFFFFF;
}

.grin-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #FFFFFF;
}

/* Travel Grin Widget Styles */
.grin-travel-grid {
    display: grid;
    grid-template-columns: repeat(3, 413px);
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    width: 100%;
    direction: rtl;
}

@media (max-width: 1300px) {
    .grin-travel-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        margin: 0 auto;
        gap: 20px;
    }

    .grin-travel-card {
        width: 100% !important;
        max-width: 413px;
        height: 367px !important;
    }
}

@media (max-width: 1024px) {
    .grin-travel-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 740px;
        gap: 15px;
    }

    .grin-travel-card {
        width: 100% !important;
        max-width: 360px;
        height: 306px !important;
    }

    /* Hide the 3rd card on tablet */
    .grin-travel-card:nth-child(3) {
        display: none !important;
    }

    .grin-card-badge {
        left: 239px !important;
        padding: 12px 23px !important;
        height: 45px !important;
    }
}



@media (max-width: 700px) {
    .grin-travel-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 24px;
    }

    .grin-travel-card {
        width: 343px !important;
        height: 306px !important;
        padding: 20px !important;
    }

    .grin-card-title {
        font-size: 20px !important;
        line-height: 100% !important;
        margin-bottom: 8px !important;
    }

    .grin-card-desc {
        font-size: 14px !important;
        line-height: 150% !important;
        margin-bottom: 20px !important;
    }

    .grin-card-price,
    .grin-card-price span {
        font-size: 20px !important;
        line-height: 100% !important;
        letter-spacing: 0.23px !important;
    }

    .grin-card-badge {
        width: 92px !important;
        height: 48px !important;
        border-radius: 29.85px !important;
        top: 21px !important;
        left: 237px !important;
        padding: 0 !important;
        font-size: 16px !important;
        line-height: 100% !important;
        letter-spacing: 0.23px !important;
    }

    .grin-card-btn {
        width: 153px !important;
        height: 48px !important;
        border-radius: 29.85px !important;
        padding: 8px 26px !important;
        font-size: 16px !important;
        line-height: 100% !important;
        letter-spacing: 0.23px !important;
        gap: 8px !important;
    }
}


.grin-travel-card {
    position: relative;
    width: 413px;
    height: 367px;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    text-decoration: none !important;
}

.grin-travel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 31.6%, rgba(0, 0, 0, 0.62) 56.26%);
    z-index: 1;
}


.grin-travel-card>* {
    position: relative;
    z-index: 2;
}

.grin-card-badge {
    position: absolute;
    top: 25px;
    left: 286px;
    width: 111px;
    height: 56px;
    background: #0000003D !important;
    border-radius: 36px;
    padding: 12px 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;

    /* Typography */
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 32px !important;
    letter-spacing: 0.28px !important;
    text-transform: uppercase !important;
    color: #FFFFFF !important;
    opacity: 1;
}




.grin-card-content {
    margin-top: auto;
}

.grin-card-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: #FFFFFF !important;
    margin-bottom: 10px;
}


.grin-card-desc {
    font-family: 'Cairo', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #FFFFFF !important;
    opacity: 1;
    margin-bottom: 25px;
    line-height: 1.6;
}



.grin-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grin-card-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
}

.grin-card-price {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    color: rgba(255, 255, 255, 1) !important;
}

.grin-card-price span {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    margin-right: 5px;
    color: rgba(255, 255, 255, 1) !important;
}

/* Category Filter Tabs */
/* Category Filter Tabs */
.grin-tabs-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 auto 50px auto;
    direction: rtl;
    flex-wrap: wrap;
    background: #FFFFFF;
    border: 1.5px solid #F0F0F0;
    border-radius: 100px;
    padding: 8px;
    width: fit-content;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.02);
}

.grin-tab {
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    font-weight: 700;
    padding: 12px 35px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: #03642D;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    white-space: nowrap;
}

.grin-tab:hover,
.grin-tab.active {
    background: #03642D;
    color: #ffffff;
}

/* Filter Animation */
.grin-travel-grid .grin-travel-card {
    transition: all 0.4s ease;
    animation: fadeIn 0.5s ease-in-out;
}

.grin-travel-grid .grin-travel-card.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   UNIFIED CHECKOUT STYLES
   ========================================================================== */

/* Main Wrapper */
.woocommerce-checkout {
    background-color: #f7f8fa;
    direction: rtl;
}

/* Base Card Container */
.grin-checkout-card-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid rgba(46, 46, 31, 0.12);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.01);
}

/* Force Customer Details to Full Width */
.col2-set {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: block !important;
}

.col2-set .col-1,
.col2-set .col-2 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

/* Header Section */
.grin-checkout-header-badge {
    display: table;
    margin: 0 0 15px auto;
    background: #fff;
    border: 1.5px solid #d4ede2;
    color: #1a7e4e;
    padding: 6px 25px;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 15px;
}

.grin-checkout-subtitle {
    text-align: right;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #333;
    margin-bottom: 35px !important;
}

/* Inner Form Card */
form.checkout {
    background: #fff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    padding: 30px !important;
    margin: 0 auto 30px auto !important;
    max-width: 100% !important;
    box-shadow: none !important;
}

/* Section Header */
.grin-section-header {
    display: flex;
    align-items: center;
    width: 100%;
    clear: both;
    margin-bottom: 25px;
}

.grin-section-header p,
.woocommerce-checkout p:empty,
.woocommerce-checkout p:not(.form-row) {
    display: none !important;
}

.woocommerce-billing-fields__field-wrapper>p:not(.form-row) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
}

.grin-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #116d3a;
    border-radius: 50%;
    margin-left: 10px;
    vertical-align: middle;
}

.grin-section-title {
    display: inline-block;
    font-family: 'Cairo', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 !important;
    vertical-align: middle;
}

/* Fields Layout */
.woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

p.form-row {
    padding: 10px !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    flex: 0 0 50%;
    max-width: 50%;
}

p.grin-col-3 {
    flex: 0 0 33.33% !important;
    max-width: 33.33% !important;
}

@media (max-width: 768px) {

    p.form-row,
    p.grin-col-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Inputs Styling */
input.input-text,
select,
textarea {
    width: 100% !important;
    border: 1px solid #efefef !important;
    background: #fbfbfb !important;
    border-radius: 10px !important;
    height: 52px !important;
    font-family: 'Cairo', sans-serif;
    padding: 10px 15px !important;
}

/* Force order review width and reset styles */
.woocommerce.woocommerce-checkout form #order_review,
.woocommerce.woocommerce-checkout form #order_review_heading,
.woocommerce-page.woocommerce-checkout form #order_review,
.woocommerce-page.woocommerce-checkout form #order_review_heading,
form #order_review:not(.elementor-widget-woocommerce-checkout-page #order_review) {
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
}

/* HIDE ORDER REVIEW TABLE AND HEADING */
#order_review_heading,
.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order-table thead,
.woocommerce-checkout-review-order-table tbody,
.woocommerce-checkout-review-order-table tfoot,
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-shipping-totals,
.cart-subtotal,
.order-total,
.wc_payment_methods.payment_methods.methods,
.woocommerce-notices-wrapper {
    display: none !important;
}



#place_order {
    background-color: #03642D !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 0 45px !important;
    height: 50px !important;
    font-weight: 700 !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 16px !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 !important;
    width: auto !important;
    min-width: 180px;
    order: 2;
}

#place_order:hover {
    background-color: #024b22 !important;
    transform: translateY(-2px);
}

.grin-prev-btn {
    border: 1.5px solid #03642D !important;
    color: #03642D !important;
    background: #fff !important;
    border-radius: 50px !important;
    padding: 0 40px !important;
    height: 50px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    transition: all 0.3s ease;
    margin: 0 !important;
    width: auto !important;
    min-width: 140px;
    order: 1;
}

.grin-prev-btn:hover {
    background: #f0f7f3 !important;
}

/* Thank You Page */
.grin-thankyou-page-wrapper .woocommerce-order-received>p,
.grin-thankyou-page-wrapper .woocommerce-thankyou-order-details,
.grin-thankyou-page-wrapper .woocommerce-order-details,
.grin-thankyou-page-wrapper .woocommerce-customer-details,
.grin-thankyou-page-wrapper .woocommerce-notice {
    display: none !important;
}

.grin-thankyou-card {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}

.grin-success-icon-wrapper {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.grin-success-circle {
    width: 80px;
    height: 80px;
    background: #f0f7f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grin-thankyou-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #333;
    margin-bottom: 15px !important;
}

.grin-thankyou-msg {
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 35px;
}

.grin-thankyou-actions {
    margin-top: 20px;
}

.grin-done-btn {
    display: inline-block;
    background: #03642D;
    color: #fff;
    padding: 12px 60px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.grin-done-btn:hover {
    background: #024b22;
    transform: translateY(-2px);
}

/* Mobile adjustments */
@media (max-width: 768px) {

    .grin-checkout-actions,
    .form-row.place-order {
        flex-direction: column-reverse !important;
        gap: 15px;
        margin: 30px -15px -15px !important;
        width: calc(100% + 30px) !important;
        padding: 20px 15px !important;
    }

    #place_order,
    .grin-prev-btn {
        width: 100% !important;
        min-width: 0 !important;
    }
}