/* ==========================================
   ACMS Coupon Card Styles
   ========================================== */

.acms-coupons-carousel {
    width: 100%;
    padding: 20px 0;
    position: relative;
}

.acms-coupons-carousel.swiper {
    overflow: hidden;
}

.acms-coupons-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.acms-coupons-carousel .swiper-slide {
    display: flex;
    align-items: stretch;
}

/* ==========================================
   Coupon Card Container
   ========================================== */

.acms-coupon-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.acms-coupon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(116, 31, 162, 0.15);
}

/* ==========================================
   Coupon Image
   ========================================== */

.acms-coupon-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
}

.acms-coupon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acms-coupon-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
}

/* ==========================================
   Coupon Title
   ========================================== */

.acms-coupon-title {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    word-break: break-word;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(2.8em + 32px);
    max-height: calc(2.8em + 32px);
}

/* ==========================================
   Coupon Code Section
   ========================================== */

.acms-coupon-code-section {
    padding: 0 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Code type styling */
.acms-coupon-code-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    height: 48px;
    box-sizing: border-box;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0 14px;
    text-align: center;
    overflow: hidden;
}

.acms-coupon-code {
    display: inline-block;
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #741FA2;
    filter: blur(3px);
    transition: filter 0.3s ease;
    cursor: pointer;
    user-select: none;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acms-coupon-card:hover .acms-coupon-code {
    filter: blur(0);
}

/* Deal type styling */
.acms-coupon-deal-text {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #741FA2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 10px;
    background: #f0e6ff;
    border-radius: 6px;
}

/* ==========================================
   Coupon Expiry Date
   ========================================== */

.acms-coupon-expiry {
    padding: 0 16px 12px;
    min-height: 24px;
    font-size: 12px;
    color: #999;
    font-weight: 500;
    display: flex;
    align-items: center;
}

/* ==========================================
   Button Section
   ========================================== */

.acms-coupon-button-wrap {
    padding: 0 16px 16px;
    margin-top: auto;
    display: flex;
    align-items: stretch;
}

.acms-coupon-button {
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #741FA2 0%, #5E1885 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(116, 31, 162, 0.25);
}

.acms-coupon-button:hover {
    background: linear-gradient(135deg, #8A32BA 0%, #741FA2 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(116, 31, 162, 0.35);
}

.acms-coupon-button:active {
    transform: translateY(0);
}

/* Copied feedback state */
.acms-coupon-button.acms-copied {
    background: linear-gradient(135deg, #22a83d 0%, #1a7d2e 100%);
    box-shadow: 0 4px 12px rgba(34, 168, 61, 0.25);
}

/* ==========================================
   Navigation & Pagination
   ========================================== */

.acms-coupons-carousel .swiper-button-prev,
.acms-coupons-carousel .swiper-button-next {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #741FA2;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.acms-coupons-carousel .swiper-button-prev:hover,
.acms-coupons-carousel .swiper-button-next:hover {
    background: #741FA2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(116, 31, 162, 0.3);
}

.acms-coupons-carousel .swiper-button-prev:after,
.acms-coupons-carousel .swiper-button-next:after {
    font-size: 18px;
    font-weight: 700;
}

.acms-coupons-carousel .swiper-button-prev {
    left: -22px;
}

.acms-coupons-carousel .swiper-button-next {
    right: -22px;
}

.acms-coupons-carousel .swiper-pagination {
    bottom: -40px !important;
}

.acms-coupons-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ddd;
    opacity: 1;
    transition: all 0.3s ease;
}

.acms-coupons-carousel .swiper-pagination-bullet-active {
    width: 24px;
    background: #741FA2;
    border-radius: 4px;
}

/* ==========================================
   Empty State
   ========================================== */

.acms-coupons-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* ==========================================
   Responsive: Tablet (768px)
   ========================================== */

@media (max-width: 768px) {
    .acms-coupon-button {
        padding: 10px 14px;
        font-size: 13px;
    }

    .acms-coupon-title {
        padding: 12px;
        font-size: 15px;
    }

    .acms-coupon-code-section {
        padding: 0 12px;
        margin-bottom: 10px;
    }

    .acms-coupon-code {
        font-size: 13px;
    }

    .acms-coupon-expiry {
        padding: 0 12px 10px;
        font-size: 11px;
    }

    .acms-coupon-button-wrap {
        padding: 0 12px 12px;
    }
}

/* ==========================================
   Responsive: Mobile (up to 767px)
   ========================================== */

@media (max-width: 767px) {
    .acms-coupons-carousel {
        padding: 18px 0 54px;
    }

    .acms-coupon-card {
        border-radius: 10px;
    }

    .acms-coupon-image {
        aspect-ratio: 4 / 3;
    }

    .acms-coupon-title {
        padding: 10px;
        font-size: 14px;
    }

    .acms-coupon-code-section {
        padding: 0 10px;
        margin-bottom: 8px;
    }

    .acms-coupon-code-wrapper {
        padding: 8px;
    }

    .acms-coupon-code {
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .acms-coupon-deal-text {
        font-size: 11px;
        padding: 8px;
    }

    .acms-coupon-expiry {
        padding: 0 10px 8px;
        font-size: 11px;
    }

    .acms-coupon-button-wrap {
        padding: 0 10px 12px;
    }

    .acms-coupon-button {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Hide navigation arrows on mobile */
    .acms-coupons-carousel .swiper-button-prev,
    .acms-coupons-carousel .swiper-button-next {
        display: none;
    }

    .acms-coupons-carousel .swiper-pagination {
        bottom: -35px !important;
    }

    .acms-coupons-carousel .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
    }

    .acms-coupons-carousel .swiper-pagination-bullet-active {
        width: 20px;
    }
}
