/*
 Theme Name:   Astra Child
 Theme URI:    https://tajicore.com/
 Description:  Astra Child Theme
 Author:       Nelson
 Author URI:   https://tajicore.com/
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
*/

/* ---------------------------------------------
   Elementor Image Carousel Fixes
--------------------------------------------- */
.swiper-wrapper {
    transition-timing-function: linear !important;
}

.elementor-widget-container .elementor-image-carousel-wrapper .swiper-slide img,
.elementor-widget-container .elementor-image-carousel-wrapper .swiper-slide .swiper-slide-image {
    width: 100% !important;
    height: 350px !important; /* fixed height for consistency */
    object-fit: cover !important;
    object-position: center !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    border-radius: 8px !important;
    display: block !important;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.elementor-widget-container .elementor-image-carousel-wrapper .swiper-slide img.swiper-lazy-loaded {
    opacity: 1; /* smooth fade-in */
}

/* Reserve space for carousel slides */
.elementor-image-carousel .swiper-slide {
  min-height: 350px; /* match image height */
  background: #f4f4f4; /* neutral placeholder */
  display: flex;
  align-items: center;
  justify-content: center;
}

.elementor-widget-container .elementor-image-carousel-caption {
    background-color: #f0474a !important;
    color: #fff !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-align: center !important;
    border-radius: 0 0 8px 8px !important;
    border-top: 1px solid #fff !important;
}

.elementor-image-carousel .swiper-slide-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* keep caption aligned */
}

/* ---------------------------------------------
   Vehicle Category Grid
--------------------------------------------- */
.vehicle-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 per row on desktop/tablet */
    gap: 15px; /* spacing between cards */
}

.vehicle-category-item {
    display: block;
    text-align: center;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    text-decoration: none; /* remove underline for the entire link */
    color: inherit;        /* keep text color */
}

.vehicle-category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.vehicle-category-image-wrapper {
    width: 100%;
    padding-top: 66.66%; /* 3:2 aspect ratio */
    position: relative;
    overflow: hidden;
}

.vehicle-category-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.vehicle-category-title {
    font-size: 18px;
    font-weight: bold;
    margin: 8px 0 4px;
    text-decoration: none !important; /* remove underline */
}

.vehicle-category-description {
    font-size: 14px;
    padding: 0 10px;
    line-height: 1.4;
    min-height: 60px;
    margin-bottom: 4px;
    text-decoration: none !important; /* remove underline */
}

/* Read More Button */
.vehicle-category-readmore {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 10px 10px;
    color: #ffffff !important;
    background-color: #f0474a;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important; /* remove underline */
    transition: background-color 0.3s ease;
}

.vehicle-category-readmore:hover {
    background-color: #000000;
    color: #ffffff !important; /* fixed missing # */
}

.vehicle-category-readmore .readmore-icon {
    margin-left: 10px;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.vehicle-category-readmore:hover .readmore-icon {
    transform: translateX(5px);
}

/* ---------------------------------------------
   Buttons
--------------------------------------------- */
.ast-builder-button-wrap {
    display: inline-flex;
    gap: 10px;
}

.ast-builder-button-wrap .menu-link {
    display: none; 
}

.ast-custom-button {
    background-color: #f0474a;
    color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.ast-custom-button:hover {
    background-color: #FFFFFF;
    color: #000;
    transform: translateY(-1px);
}

.ast-custom-button:active {
    transform: translateY(0);
}

/* ---------------------------------------------
   Submenu Adjustments
--------------------------------------------- */
.main-header-menu .sub-menu {
    top: 100%;
    margin-top: 10px;
    transition: top 0.3s ease, margin-top 0.3s ease;
}

/* ---------------------------------------------
   Responsive Adjustments
--------------------------------------------- */
@media (max-width: 768px) {
    .vehicle-categories-grid {
        grid-template-columns: 1fr; /* 1 per row on mobile */
    }
}

/* ---------------------------------------------
   Remove all link underlines for vehicle categories
--------------------------------------------- */
.vehicle-category-item,
.vehicle-category-item h2,
.vehicle-category-item p,
.vehicle-category-item .vehicle-category-readmore {
    text-decoration: none !important;
    color: inherit;
}

.vehicle-category-item:hover,
.vehicle-category-item:hover h2,
.vehicle-category-item:hover p,
.vehicle-category-item:hover .vehicle-category-readmore {
    text-decoration: none !important;
}
