/* ===== HOMEPAGE FEATURED OFFERS STYLING ===== */

/* Grid Card Style for Homepage Featured Offers */
.homepage-offer-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 25px 20px 20px 20px !important;
    background: white !important;
    border: 2px solid #ed174f !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    height: 100% !important;
    min-height: 340px !important;
    max-height: 380px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    position: relative !important;
}

.homepage-offer-card:hover {
    box-shadow: 0 8px 20px rgba(237, 23, 79, 0.25) !important;
    transform: translateY(-4px) !important;
    border-color: #d01445 !important;
}

.homepage-offer-logo {
    width: 140px !important;
    height: 140px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 auto 15px auto !important;
    display: block !important;
}

.homepage-offer-store-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #666 !important;
    margin: 0 0 10px 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    padding: 0 5px !important;
    display: block !important;
}

.homepage-offer-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 15px 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    padding: 0 5px !important;
    min-height: 40px !important;
}

.homepage-offer-badge {
    position: relative;
    width: 90px;
    height: 44px;
    background: linear-gradient(135deg, #ed174f 0%, #d01445 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(237, 23, 79, 0.4);
    animation: swingSign 3s ease-in-out infinite;
    transform-origin: top center;
    z-index: 10;
    margin: 0 auto;
    color: white;
    font-size: 13px;
    font-weight: 700;
    gap: 5px;
}

.homepage-offer-badge::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 10px;
    background: #ed174f;
}

.homepage-offer-badge::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #ed174f;
    border-radius: 50%;
}

.homepage-offer-badge i {
    font-size: 14px;
}

@keyframes swingSign {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-8deg);
    }
    75% {
        transform: rotate(8deg);
    }
}

/* Mobile responsive for homepage offer cards */
@media (max-width: 640px) {
    .homepage-offer-card {
        min-height: 200px;
        padding: 18px 12px 14px 12px;
        border-width: 2px;
        min-width: 160px;
    }
    
    .homepage-offer-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }
    
    .homepage-offer-store-name {
        font-size: 11px;
        margin: 0 0 6px 0;
    }
    
    .homepage-offer-title {
        font-size: 13px;
        min-height: 50px;
        margin: 0 0 8px 0;
        -webkit-line-clamp: 3;
        line-height: 1.3;
    }
    
    .homepage-offer-badge {
        width: 70px;
        height: 36px;
        font-size: 10px;
    }
    
    .homepage-offer-badge i {
        font-size: 11px;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 959px) {
    .homepage-offer-card {
        border-width: 2px;
        min-height: 220px;
    }
    
    .homepage-offer-logo {
        width: 100px;
        height: 100px;
    }
    
    .homepage-offer-store-name {
        font-size: 12px;
    }
    
    .homepage-offer-title {
        font-size: 14px;
    }
    
    .homepage-offer-badge {
        width: 80px;
        height: 40px;
        font-size: 12px;
    }
    
    .homepage-offer-badge i {
        font-size: 13px;
    }
}

/* ===== SWIPER SLIDER STYLES FOR HOMEPAGE OFFERS ===== */

.homepage-popular-swiper,
.homepage-exclusive-swiper {
    position: relative;
    padding: 20px 50px 50px 50px;
}

.homepage-popular-swiper .swiper-slide,
.homepage-exclusive-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.homepage-popular-swiper .swiper-slide > a,
.homepage-exclusive-swiper .swiper-slide > a {
    width: 100%;
    display: flex;
}

.homepage-popular-swiper .homepage-offer-card,
.homepage-exclusive-swiper .homepage-offer-card {
    width: 100%;
    margin: 0 !important;
}

.homepage-popular-swiper .swiper-button-next,
.homepage-popular-swiper .swiper-button-prev,
.homepage-exclusive-swiper .swiper-button-next,
.homepage-exclusive-swiper .swiper-button-prev {
    color: #ed174f;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.homepage-popular-swiper .swiper-button-next:after,
.homepage-popular-swiper .swiper-button-prev:after,
.homepage-exclusive-swiper .swiper-button-next:after,
.homepage-exclusive-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.homepage-popular-swiper .swiper-button-next:hover,
.homepage-popular-swiper .swiper-button-prev:hover,
.homepage-exclusive-swiper .swiper-button-next:hover,
.homepage-exclusive-swiper .swiper-button-prev:hover {
    background: #ed174f;
    color: white;
    transform: scale(1.1);
}

.homepage-popular-swiper .swiper-pagination,
.homepage-exclusive-swiper .swiper-pagination {
    bottom: 10px;
}

.homepage-popular-swiper .swiper-pagination-bullet,
.homepage-exclusive-swiper .swiper-pagination-bullet {
    background: #ed174f;
    opacity: 0.3;
    width: 10px;
    height: 10px;
}

.homepage-popular-swiper .swiper-pagination-bullet-active,
.homepage-exclusive-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 24px;
    border-radius: 5px;
}

/* Mobile adjustments for swiper */
@media (max-width: 640px) {
    .homepage-popular-swiper,
    .homepage-exclusive-swiper {
        padding: 10px 30px 40px 30px;
    }
    
    .homepage-popular-swiper .swiper-button-next,
    .homepage-popular-swiper .swiper-button-prev,
    .homepage-exclusive-swiper .swiper-button-next,
    .homepage-exclusive-swiper .swiper-button-prev {
        width: 28px;
        height: 28px;
    }
    
    .homepage-popular-swiper .swiper-button-next:after,
    .homepage-popular-swiper .swiper-button-prev:after,
    .homepage-exclusive-swiper .swiper-button-next:after,
    .homepage-exclusive-swiper .swiper-button-prev:after {
        font-size: 12px;
    }
    
    .homepage-popular-swiper .swiper-button-next,
    .homepage-exclusive-swiper .swiper-button-next {
        right: 5px;
    }
    
    .homepage-popular-swiper .swiper-button-prev,
    .homepage-exclusive-swiper .swiper-button-prev {
        left: 5px;
    }
}
