/* =========================================
   Homepage Module CSS - Advanced Hero
   ========================================= */

.aa-advanced-hero {
    padding: 30px 0;
    background: transparent;
}

.aa-hero-grid {
    display: block;
    width: 100%;
}

/* Left Column Styling */
.aa-hero-left {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.aa-hero-swiper {
    width: 100%;
    height: 100%;
}

.aa-hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aa-hero-pagination {
    text-align: left;
    padding-left: 30px;
    bottom: 20px !important;
}

.aa-hero-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ffffff;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.aa-hero-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    width: 24px;
    border-radius: 5px;
    background: var(--aa-primary, #0047b3);
}

/* Hero Navigation Arrows */
.aa-hero-prev, .aa-hero-next {
    width: 36px;
    height: 48px;
    background: #ffffff;
    color: var(--aa-primary, #0047b3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -24px;
    transition: all 0.3s ease;
    opacity: 0.9;
}
.aa-hero-prev:after, .aa-hero-next:after {
    display: none; /* Hide default swiper icon */
}
.aa-hero-prev {
    left: 0px;
    border-radius: 0 4px 4px 0;
}
.aa-hero-next {
    right: 0px;
    border-radius: 4px 0 0 4px;
}
.aa-hero-prev:hover, .aa-hero-next:hover {
    background: var(--aa-primary, #0047b3);
    color: #ffffff;
    opacity: 1;
}

/* Right Column Styling */
.aa-hero-right {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.aa-right-product-swiper {
    width: 100%;
    height: 100%;
}

.aa-right-prod-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.aa-right-prod-link {
    display: block;
    width: 100%;
    height: 100%;
}

.aa-right-prod-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.aa-right-prod-link:hover img {
    transform: scale(1.05);
}

.aa-hero-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .aa-advanced-hero {
        padding: 15px 0;
    }
    .aa-hero-grid {
        height: auto;
    }
    .aa-hero-left {
        height: 350px;
    }

}
@media (max-width: 576px) {
    .aa-advanced-hero {
        padding: 10px 0;
    }
    .aa-hero-left {
        height: 200px;
    }
    /* Hide arrows on mobile for a cleaner look, users can swipe */
    .aa-hero-prev, .aa-hero-next {
        display: none;
    }
}

/* =========================================
   Featured Categories Section
   ========================================= */

.aa-featured-categories {
    padding: 60px 0;
    background: #fdfdfd;
}

.aa-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.aa-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #111111;
    margin: 0;
    position: relative;
    display: inline-block;
}

.aa-section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--aa-primary, #0047b3);
    border-radius: 3px;
}

.aa-section-header.aa-flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    flex-wrap: wrap;
    gap: 15px;
}

.aa-flex-header .aa-section-title {
    margin-bottom: 0;
}

.aa-flex-header .aa-section-title:after {
    left: 0;
    transform: none;
}

.aa-view-all-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: transparent;
    color: var(--aa-primary, #0047b3);
    border: 1.5px solid var(--aa-primary, #0047b3);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.aa-view-all-btn:hover {
    background: var(--aa-primary, #0047b3);
    color: #ffffff;
}

.aa-categories-swiper {
    padding: 10px 0 50px;
    position: relative;
}

.aa-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.aa-category-card:hover {
    transform: translateY(-5px);
}

.aa-category-img-wrapper {
    width: 100%;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 15px;
    padding: 10px;
    transition: box-shadow 0.3s ease;
}

.aa-category-card:hover .aa-category-img-wrapper {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.aa-category-img-wrapper img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.aa-category-name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    text-align: center;
    margin: 0;
    transition: color 0.3s ease;
}

.aa-category-card:hover .aa-category-name {
    color: var(--aa-primary, #0047b3);
}

/* Category Navigation */
.aa-cat-prev, .aa-cat-next {
    width: 36px;
    height: 36px;
    background: #ffffff;
    color: #333333;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    top: 40%;
}
.aa-cat-prev:after, .aa-cat-next:after {
    font-size: 14px;
    font-weight: bold;
}
.aa-cat-prev:hover, .aa-cat-next:hover {
    background: var(--aa-primary, #0047b3);
    color: #ffffff;
}

/* Category Pagination */
.aa-cat-pagination {
    bottom: 0px !important;
}
.aa-cat-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #cccccc;
    opacity: 0.5;
    transition: all 0.3s ease;
}
.aa-cat-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    width: 20px;
    border-radius: 4px;
    background: var(--aa-primary, #0047b3);
}

@media (max-width: 768px) {
    .aa-featured-categories {
        padding: 40px 0;
    }
    .aa-section-title {
        font-size: 24px;
    }
}
}
@media (max-width: 576px) {
    .aa-cat-pagination {
        display: none !important;
    }
    .aa-categories-swiper {
        padding-bottom: 10px; /* Remove extra padding since dots are hidden */
    }
}

/* =========================================
   Top Selling Section
   ========================================= */

.aa-top-selling {
    padding: 60px 0;
    background: #fcfcfc;
}

.aa-ts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Horizontal Card */
.aa-ts-card {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f1f1;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: center;
}

.aa-ts-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.aa-ts-img-wrapper {
    width: 40%; /* Slightly larger image area for premium look */
    padding: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aa-ts-img-link {
    width: 100%;
    display: block;
}

.aa-ts-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.aa-ts-content {
    width: 60%;
    padding: 20px 20px 20px 0; /* Removed left padding since wrapper has padding */
}

.aa-ts-title-link {
    text-decoration: none;
}

.aa-ts-title {
    font-size: 16px; /* Slightly smaller for a sleeker look */
    font-weight: 500; /* Slimmer font weight as requested */
    color: #333333;
    margin: 0 0 10px 0;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.aa-ts-title-link:hover .aa-ts-title {
    color: var(--aa-primary, #0047b3);
}

.aa-ts-price-box {
    margin-bottom: 10px;
}

.aa-ts-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--aa-primary, #0047b3);
    margin-right: 10px;
}

.aa-ts-regular-price del {
    font-size: 14px;
    color: #888888;
}

.aa-ts-badge {
    display: inline-block;
    background: #e6f4ea;
    color: #1e8e3e;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.aa-ts-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.aa-ts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 6px;
    flex: 1;
    text-align: center;
}

.aa-ts-btn-outline {
    background: transparent;
    color: var(--aa-primary, #0047b3);
    border: 1px solid var(--aa-primary, #0047b3);
}

.aa-ts-btn-outline:hover {
    background: rgba(200, 161, 90, 0.05);
}

.aa-ts-btn-outline.loading {
    opacity: 0.7;
    pointer-events: none;
}
.aa-ts-btn-outline.added {
    border-color: #1e8e3e;
    color: #1e8e3e;
}

.aa-ts-btn-solid {
    background: var(--aa-primary, #0047b3);
    color: #ffffff;
    border: 1px solid var(--aa-primary, #0047b3);
}

.aa-ts-btn-solid:hover {
    background: #b58d4a; /* Slightly darker */
    color: #ffffff;
}

/* Responsive */
@media (max-width: 992px) {
    .aa-ts-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    /* Stack card vertically on small phones */
    .aa-ts-card {
        flex-direction: column;
    }
    .aa-ts-img-link {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        padding-bottom: 0;
    }
    .aa-ts-content {
        width: 100%;
        padding: 15px;
        text-align: center;
    }
    .aa-ts-title {
        font-size: 15px;
        font-weight: 500;
        line-height: 1.4;
    }
    .aa-ts-price {
        font-size: 16px;
    }
    .aa-ts-actions {
        justify-content: center;
        gap: 8px;
    }
    .aa-ts-btn {
        padding: 8px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    .aa-ts-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* =========================================
   Dynamic Product Slider & Vertical Card
   ========================================= */

.aa-dynamic-slider-section {
    padding: 60px 0;
    background: transparent;
}

.aa-product-card-v {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.aa-product-card-v:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: transparent;
}

.aa-product-card-v-img-wrapper {
    position: relative;
    padding: 0; /* Removed large gap around the image */
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.aa-product-card-v-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover; /* Changed from contain to cover to eliminate side gaps */
    display: block;
}

/* Badges */
.aa-product-card-v-badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4d4f; /* Premium red for discount */
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(255, 77, 79, 0.3);
}

.aa-product-card-v-badge-combo {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--aa-primary, #0047b3);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 0 0 0 10px;
    z-index: 2;
}

.aa-product-card-v-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.aa-product-card-v-title-link {
    text-decoration: none;
    flex-grow: 1;
    display: block;
    min-height: 44px; /* 2 lines of text */
    margin-bottom: 12px;
}

.aa-product-card-v-title {
    font-size: 16px;
    font-weight: 500;
    color: #222222;
    margin: 0;
    line-height: 1.45;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aa-product-card-v-title-link:hover .aa-product-card-v-title {
    color: var(--aa-primary, #0047b3);
}

.aa-product-card-v-price-box {
    margin-bottom: 15px;
}

.aa-product-card-v-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--aa-primary, #0047b3); /* Orange from design */
    margin-right: 8px;
}

.aa-product-card-v-regular-price del {
    font-size: 15px;
    color: #999999;
}

.aa-product-card-v-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.aa-product-card-v-btn-light,
.aa-product-card-v-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 6px;
    cursor: pointer;
}

.aa-product-card-v-btn-light {
    background: #ffffff;
    color: var(--aa-primary, #0047b3);
    border: 1px solid var(--aa-primary, #0047b3);
}

.aa-product-card-v-btn-light:hover {
    background: #fff8f0;
    border-color: var(--aa-primary, #0047b3);
    box-shadow: 0 2px 8px rgba(243, 134, 36, 0.15);
}

.aa-product-card-v-btn-light.added {
    color: #1e8e3e;
    border-color: #1e8e3e;
}
.aa-product-card-v-btn-light.loading {
    opacity: 0.7;
    pointer-events: none;
}

.aa-product-card-v-btn-primary {
    background: var(--aa-primary, #0047b3);
    color: #ffffff;
    border: 1px solid var(--aa-primary, #0047b3);
}

.aa-product-card-v-btn-primary:hover {
    background: var(--aa-primary-hover, #1a5ecc); /* Darker orange on hover */
    color: #ffffff;
    border-color: var(--aa-primary-hover, #1a5ecc);
    box-shadow: 0 4px 10px rgba(243, 134, 36, 0.2);
}

/* Swiper navigation for dynamic slider */
.aa-dynamic-slider-section {
    position: relative;
}
.aa-dynamic-swiper {
    padding: 15px 0;
    margin: -15px 0;
    padding-bottom: 55px;
    position: relative;
}

.aa-dynamic-pagination {
    bottom: 15px !important;
}
.aa-dynamic-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 0.5;
    transition: all 0.3s ease;
}
.aa-dynamic-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    width: 20px;
    border-radius: 4px;
    background: var(--aa-primary, #0047b3);
}

/* Custom Arrows for Dynamic Sliders */
.aa-dynamic-prev,
.aa-dynamic-next {
    width: 40px !important;
    height: 40px !important;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    color: var(--aa-primary, #0047b3) !important;
    top: 45% !important;
    margin-top: -20px !important;
    transition: all 0.3s ease;
}
.aa-dynamic-prev:hover,
.aa-dynamic-next:hover {
    background: var(--aa-primary, #0047b3);
    color: #ffffff !important;
}
.aa-dynamic-prev::after,
.aa-dynamic-next::after {
    font-size: 18px !important;
    font-weight: bold;
}
.aa-dynamic-prev {
    left: -15px !important;
}
.aa-dynamic-next {
    right: -15px !important;
}

/* Hide arrows on mobile to prevent overlapping issues */
@media (max-width: 768px) {
    .aa-dynamic-prev,
    .aa-dynamic-next {
        display: none !important;
    }
}

/* Mobile Optimizations for Vertical Product Card */
@media (max-width: 576px) {
    .aa-product-card-v-img-wrapper {
        padding: 10px;
    }
    .aa-product-card-v-content {
        padding: 10px;
    }
    .aa-product-card-v-title {
        font-size: 13px;
        line-height: 1.35;
    }
    .aa-product-card-v-title-link {
        min-height: 36px;
        margin-bottom: 8px;
    }
    .aa-product-card-v-price {
        font-size: 15px;
    }
    .aa-product-card-v-regular-price del {
        font-size: 12px;
    }
    .aa-product-card-v-price-box {
        margin-bottom: 10px;
    }
    .aa-product-card-v-btn-light,
    .aa-product-card-v-btn-primary {
        padding: 6px;
        font-size: 11px;
        gap: 4px;
        border-radius: 4px;
    }
    .aa-product-card-v-btn-light svg,
    .aa-product-card-v-btn-primary svg {
        width: 12px;
        height: 12px;
    }
    .aa-product-card-v-actions {
        gap: 5px;
    }
    .aa-product-card-v-badge-discount {
        font-size: 10px;
        padding: 3px 6px;
    }
}
