.coupon .card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.coupon .card-header-top {
    width: -webkit-fill-available;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
    font-size: large;
    font-weight: 500;
}

.coupon .title {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    color: #1f2937;
    font-family: "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
}

.coupon .card-header-top span {
    flex: 1;
}

.coupon .card-header-top svg {
    height: 1.5rem;
    flex-shrink: 0;
    cursor: pointer;
}

.coupon .card-header-top .share-icon {
    cursor: pointer;
    font-size: 1.2rem;
    color: #ddd;
}

.coupon .card-container {
    perspective: 62.5rem;
}

.coupon .coupon-card {
    width: 22rem;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
    border-radius: 0.25rem;
}

.coupon .coupon-card.flipped {
    transform: rotateY(180deg);
}

.coupon .card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 0.25rem;
    backface-visibility: hidden;
    background: white;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.coupon .card-front,
.coupon .card-back {
    display: flex;
    position: absolute;
    inset: 0;
    width: 22rem;
    height: fit-content;
}

.coupon .coupon-image {
    position: relative;
    width: 100%;
    height: 11rem;
    background-color: #FF9800;
    background-position: center;
    background-size: contain;
}

.coupon .discount-tag {
    position: absolute;
    bottom: -1rem;
    left: 60%;
    transform: translateX(-50%);
    background: #4a4a4a;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    z-index: 2;
    display: none;
    width: max-content;
}

.coupon .coupon-content {
    padding: 1.5rem 1.25rem 1rem;
    background: white;
    position: relative;
    flex-grow: 1;
}

.coupon .coupon-content h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.coupon .coupon-content p {
    font-size: 0.85rem;
    color: #333;
    margin: 0.75rem 0 0;
}

.coupon .dashed-divider {
    height: 1px;
    border-top: 0.125rem dashed #ccc;
    margin: 1.5rem 0 1rem;
    position: relative;
    width: calc(100% + 1.25rem);
    left: -0.625rem;
}

.coupon .dashed-divider::before,
.coupon .dashed-divider::after {
    content: "";
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background: #e1e5e9;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-56%);
    z-index: 2;
}

.coupon .dashed-divider::before {
    left: -1.375rem;
}

.coupon .dashed-divider::after {
    right: -1.375rem;
}

.coupon .dashed-divider1 {
    height: 1px;
    border-top: 0.125rem dashed #ccc;
    margin: 1.5rem 0 1rem;
    position: relative;
    width: calc(100% + 1.25rem);
}

.coupon svg {
    cursor: pointer;
}

.coupon .copy-btn:active {
    transform: scale(0.95);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    background-color: white;
}

.coupon .dashed-divider1::before,
.coupon .dashed-divider1::after {
    content: "";
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background: #e1e5e9;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-56%);
    z-index: 2;
}

.coupon .dashed-divider1::before {
    left: -0.175rem;
}

.coupon .dashed-divider1::after {
    right: -0.175rem;
}

.coupon .get-coupon {
    display: block;
    width: 90%;
    margin: 0.5rem auto 0.5rem;
    padding: 0.75rem 0;
    background: #FF9800;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
}

.coupon .card-back {
    transform: rotateY(180deg);
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.coupon .card-back img {
    width: 7.5rem;
    height: 7.5rem;
}

.coupon .coupon-code {
    font-size: 1.4rem;
    font-weight: bold;
    color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.coupon .copy-btn {
    font-size: 1.2rem;
    color: #1a73e8;
    cursor: pointer;
}

.coupon .flip-back-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 1.5rem;
    color: #444;
    cursor: pointer;
    z-index: 3;
}

.coupon .modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.coupon .modal-content {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid #dcdcdc;
}

.coupon .modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #333;
}

.coupon .modal-content input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.2s;
}

.coupon .modal-content input[type="password"]:focus {
    border-color: #007bff;
    outline: none;
}

.coupon .modal-content button {
    padding: 0.5rem 1.25rem;
    background: #007bff;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.coupon .modal-content .button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.coupon .modal-content button:hover {
    background: #0056b3;
}

.coupon .modal-content button.close {
    background: #6c757d;
}

.coupon .modal-content button.close:hover {
    background: #5a6268;
}

.coupon .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.coupon .error-message1 {
    color: red;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
}

/* ✅ Media query for screen widths less than 22rem (~320px) */
@media (max-width: 319px) {

    .coupon .coupon-card,
    .coupon .card-front,
    .coupon .card-back {
        width: 16rem;
    }
}

/* Main coupon card container */
.couponStore-card {
    width: 100%;
    max-width: 25rem;
    /* 400px -> 25rem */
    background-color: #ffffff;
    /* 2px -> 0.125rem */
    border-radius: 0.25rem;
    /* 12px -> 0.75rem */
    padding-top: 0;
    /* Adjusted to allow banner to touch the top */
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    /* 4px, 6px -> 0.25rem, 0.375rem */
    box-sizing: border-box;
    margin-top: 0.25rem;
}

/* Banner image container */
.couponStore-banner-container {
    width: 100%;
    /* 20px -> 1.25rem */
    overflow: hidden;
    /* Ensures the rounded corners are respected */
    border-radius: 0.5rem 0.5rem 0 0;
    /* 10px -> 0.625rem */
    padding-bottom: 0.25rem;
}

.couponStore-banner-image {
    width: 100%;
    height: auto;
    display: block;
    height: 11rem;
    background-color: #FF9800;
    margin-bottom: 0.75rem;
    background-size: contain;
}

/* Top section with title and offer badge */
.couponStore-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    /* 16px -> 1rem */
    padding: 0 1.25rem;
    /* 20px -> 1.25rem */
}

.couponStore-title-group {
    display: flex;
    flex-direction: column;
}

.couponStore-title {
    font-size: 1.5rem;
    /* 24px -> 1.5rem */
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
    /* 4px -> 0.25rem */
}

.couponStore-subtitle {
    font-size: 0.875rem;
    /* 14px -> 0.875rem */
    color: #777;
}

/* Updated right-side section for stacking */
.couponStore-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.couponStore-offer-value {
    color: #FF9800;
    font-weight: 600;
    font-family: system-ui;
    font-size: 1.5rem;
    /* 24px -> 1.5rem */
    margin-bottom: 0.25rem;
    /* 4px -> 0.25rem */
}

.couponStore-status-badge {
    background-color: #555;
    color: #ffffff;
    font-size: 0.625rem;
    /* 10px -> 0.625rem */
    font-weight: normal;
    padding: 0.25rem 0.5rem;
    /* 4px, 8px -> 0.25rem, 0.5rem */
    border-radius: 1.25rem;
    /* 20px -> 1.25rem */
}

/* Generic coupon info text */
.couponStore-info-text {
    font-size: 0.9rem;
    /* 16px -> 1rem */
    color: #333;
    margin-bottom: 1rem;
    /* 16px -> 1rem */
    padding: 0 1.25rem;
    /* 20px -> 1.25rem */
}

/* Details section with icons */
.couponStore-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* 12px -> 0.75rem */
    margin-bottom: 1.5rem;
    /* 24px -> 1.5rem */
    padding: 0 1.25rem;
    /* 20px -> 1.25rem */
}

.couponStore-detail-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    /* 14px -> 0.875rem */
    color: #555;
}

.couponStore-detail-item .fas {
    margin-right: 0.5rem;
    /* 8px -> 0.5rem */
    color: #777;
}

/* Style for the horizontal rule */
.couponStore-hr {
    border: 0;
    height: 0.0625rem;
    /* 1px -> 0.0625rem */
    background-color: #e0e0e0;
    margin: 1.25rem 0;
    /* 20px -> 1.25rem */
    margin-left: 1.25rem;
    /* 20px -> 1.25rem */
    margin-right: 1.25rem;
    /* 20px -> 1.25rem */
}


/* Save button */
.couponStore-save-button {
    width: calc(100% - 2.5rem);
    /* 40px -> 2.5rem */
    margin: 0 1.25rem 1.5rem;
    /* 20px, 24px -> 1.25rem, 1.5rem */
    padding: 0.875rem;
    /* 14px -> 0.875rem */
    background-color: #FF9800;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    /* 8px -> 0.5rem */
    font-size: 1rem;
    /* 16px -> 1rem */
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    /* 8px -> 0.5rem */
    transition: background-color 0.3s ease;
}

.couponStore-save-button:hover {
    background-color: #333;
}

/* QR code section */
.couponStore-qr-section {
    text-align: center;
    margin-bottom: 1.5rem;
    /* 24px -> 1.5rem */
}

.couponStore-qr-code {
    width: 124px;
    /* 150px -> 9.375rem */
    height: 124px;
    /* 150px -> 9.375rem */
    margin: 0 auto 0.5rem;
    /* Placeholder for QR code */
}

.couponStore-qr-text {
    font-size: 0.875rem;
    /* 14px -> 0.875rem */
    color: #555;
}

/* Info box at the bottom */
.couponStore-info-box {
    background-color: #f8f9fa;
    border: 0.0625rem solid #e2e6ea;
    /* 1px -> 0.0625rem */
    border-radius: 0.5rem;
    /* 8px -> 0.5rem */
    padding: 1rem;
    /* 16px -> 1rem */
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    /* 12px -> 0.75rem */
    margin: 0 1.25rem 1.25rem;
    /* 20px, 20px -> 1.25rem, 1.25rem */
}

.couponStore-info-icon {
    color: #6c757d;
    font-size: 1.25rem;
    /* 20px -> 1.25rem */
}

.couponStore-info-content {
    font-size: 0.875rem;
    /* 14px -> 0.875rem */
    color: #555;
    line-height: 1.5;
}

.couponStore-title1 {
    padding: 0 1.25rem;
    font-size: medium;
    margin-bottom: 0.25rem;
}

.coupon-hint {
    font-size: x-small;
}