/*
Theme Name:   Bacola Child
 Theme URI:    http://klbtheme.com/bacola/
 Description:  Bacola Child Theme
 Author:       KlbTheme
 Author URI:   http://themeforest.net/user/KlbTheme
 Template:     bacola
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  bacola-child
*/

/* ========================================
   U-Mart Brand Colors (from logo)
   ======================================== */
:root {
    /* Primary Colors - Green from logo */
    --color-primary: #009379 !important;
    --color-prm: #009379 !important;

    /* Secondary/Accent Colors - Coral Red from logo */
    --color-secondary: #F55159 !important;

    /* Price Color - Using coral red for consistency */
    --color-price: #F55159 !important;

    /* Success Color - Keep green theme */
    --color-success: #009379 !important;
    --color-success-dark: #007a63 !important;

    /* Danger/Warning - Using coral red */
    --color-danger: #F55159 !important;
    --color-danger-dark: #e03d45 !important;
    --color-warning: #F55159 !important;
}

/* Apply brand colors to key elements */
.site-header,
.header-wrapper {
    border-bottom-color: #009379;
}

/* Primary buttons and links */
.button,
.btn,
.button-primary,
a.button,
button.button,
input[type="submit"],
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: #009379 !important;
    border-color: #009379 !important;
    color: #ffffff !important;
}

.button:hover,
.btn:hover,
.button-primary:hover,
a.button:hover,
button.button:hover,
input[type="submit"]:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: #007a63 !important;
    border-color: #007a63 !important;
    color: #ffffff !important;
}

/* Secondary buttons */
.button-secondary,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background-color: #F55159 !important;
    border-color: #F55159 !important;
    color: #ffffff !important;
}

.button-secondary:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background-color: #e03d45 !important;
    border-color: #e03d45 !important;
    color: #ffffff !important;
}

/* Links */
a,
.site-header a:hover,
.entry-title a:hover {
    color: #009379;
}

/* Product prices */
.woocommerce .price,
.woocommerce .amount,
.price ins,
.price ins .amount {
    color: #F55159 !important;
}

/* Sale badges */
.woocommerce span.onsale,
.onsale,
.product-badge.sale {
    background-color: #F55159 !important;
}

/* Add to cart buttons */
.add_to_cart_button,
.single_add_to_cart_button,
.woocommerce .product .add_to_cart_button,
.product-buttons .button,
.product-footer .button {
    background-color: #009379 !important;
    border-color: #009379 !important;
    color: #ffffff !important;
}

.add_to_cart_button:hover,
.single_add_to_cart_button:hover,
.woocommerce .product .add_to_cart_button:hover,
.product-buttons .button:hover,
.product-footer .button:hover {
    background-color: #007a63 !important;
    border-color: #007a63 !important;
    color: #ffffff !important;
}

/* Navigation and menu items */
.site-nav .menu-item:hover > a,
.site-nav .menu-item.current-menu-item > a,
.site-nav .menu-item.current-menu-parent > a {
    color: #009379;
}

/* Category badges and tags */
.product-category-badge,
.category-badge {
    background-color: #009379;
}

/* Icons and highlights */
.icon-primary,
.highlight-primary {
    color: #009379;
}

.icon-secondary,
.highlight-secondary {
    color: #F55159;
}

/* Footer links */
.site-footer a:hover {
    color: #009379;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    border-color: #009379 !important;
    outline-color: #009379 !important;
}

/* Pagination */
.pagination .current,
.page-numbers.current {
    background-color: #009379;
    border-color: #009379;
    color: #ffffff !important;
}

.pagination a:hover,
.page-numbers:hover {
    background-color: #009379;
    border-color: #009379;
    color: #ffffff !important;
}

/* ========================================
   Original Customizations
   ======================================== */

/* Hide Location Dropdown */
.header-location.site-location,
.site-location {
    display: none !important;
}

/* Expand Search Box to Full Width */
.site-header .header-main .column-center {
    display: flex;
    align-items: center;
}

.site-header .header-main .column-center .header-search {
    flex: 1;
    width: 100%;
    max-width: 100%;
}

.site-header .header-main .header-search form {
    width: 100%;
}

/* ========================================
   U-mart Location List Widget
   ======================================== */
.umart-location-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.umart-location-list .location-item {
    background: transparent;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
}

.umart-location-list .location-item a {
    text-decoration: none;
    display: block;
}

.umart-location-list .location-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.umart-location-list .location-title {
    font-size: 18px;
    font-weight: 600;
    color: #F55159;
    margin: 0 0 4px 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.umart-location-list .location-item:hover .location-title {
    color: #e03d45;
}

.umart-location-list .location-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
}

.umart-location-list .location-address i {
    color: #F55159;
    font-size: 14px;
    margin-top: 3px;
    flex-shrink: 0;
}

.umart-location-list .location-address span {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .umart-location-list {
        gap: 12px;
    }

    .umart-location-list .location-title {
        font-size: 16px;
    }

    .umart-location-list .location-address {
        font-size: 13px;
    }

    .umart-location-list .location-address i {
        font-size: 13px;
    }
}

/* ========================================
   Simple Page Hero Widget
   ======================================== */
/* Break out of Elementor container to make full width */
.elementor-widget-bacola-simple-page-hero {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Override Elementor column/section constraints */
.elementor-column > .elementor-widget-wrap > .elementor-widget-bacola-simple-page-hero,
.elementor-section .elementor-widget-bacola-simple-page-hero {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Remove Elementor widget container padding */
.elementor-widget-bacola-simple-page-hero .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
}

.simple-page-hero {
    background-color: #f8f9fa;
    padding: 40px 0;
    border-bottom: 1px solid #e9ecef;
    width: 100%;
    margin: 0;
}

.simple-page-hero .hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.simple-page-hero .hero-breadcrumb {
    margin-bottom: 15px;
}

.simple-page-hero .hero-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.simple-page-hero .hero-breadcrumb .breadcrumb a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.simple-page-hero .hero-breadcrumb .breadcrumb a:hover {
    color: #009379;
}

.simple-page-hero .hero-title {
    font-size: 36px;
    font-weight: 500;
    color: #E8F8F5;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.simple-page-hero .hero-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 991px) {
    .simple-page-hero {
        padding: 30px 0;
    }

    .simple-page-hero .hero-title {
        font-size: 28px;
    }

    .simple-page-hero .hero-subtitle {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .simple-page-hero {
        padding: 25px 0;
    }

    .simple-page-hero .hero-title {
        font-size: 24px;
    }

    .simple-page-hero .hero-subtitle {
        font-size: 14px;
    }

    .simple-page-hero .hero-breadcrumb .breadcrumb {
        font-size: 13px;
    }
}

.e-con-full, .e-con > .e-con-inner {
    &:first-child {
        padding-block-start: 0px;
    }
}

.site-mobile-app {
    visibility: hidden;
}

/* ========================================
   Fix Product Card Heights (Best Sellers Widget)
   ======================================== */
/* Make all product cards in a row have equal height */
.products .product {
    display: flex !important;
    flex-direction: column !important;
}

.products .product-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.products .content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

/* Fix product title to have consistent height - CRITICAL FIX */
.products .product-title {
    min-height: 2.8em !important; /* 2 lines at line-height 1.4 */
    margin-bottom: 0.625rem !important;
}

.products .product-title a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.4 !important;
    min-height: 2.8em !important;
}

/* Ensure product footer stays at bottom */
.products .product-footer {
    margin-top: auto !important;
}

/* Fix for carousel/slider products */
.site-slider .product,
.products.site-slider .product {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.site-slider .product-wrapper,
.products.site-slider .product-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Ensure slick slides maintain height - CRITICAL FOR CAROUSEL */
.site-slider .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

.site-slider .slick-slide {
    display: flex !important;
    height: inherit !important;
}

.site-slider .slick-slide > div {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
}

.site-slider .slick-slide > div > .product {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

/* Fix for module carousel specifically */
.module-carousel .products.site-slider .product {
    height: 100% !important;
}

.module-carousel .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

.module-carousel .slick-slide {
    height: auto !important;
    display: flex !important;
}

/* Ensure price and button area has consistent spacing */
.products .entry-price {
    margin-bottom: 0.625rem !important;
}

.products .product-buttons {
    margin-top: auto !important;
}