:root {
    /* Primary Colors */
    --primary-red: #e63946;
    --primary-red-hover: #ea0b1e;
    --primary-red-light: #ff6b6b;
    --primary-red-dark: #ee5a52;
    --primary-red-darker: #c44569;

    /* Gradient Colors */
    --gradient-blue: linear-gradient(135deg, #4e54c8 0%, #8f94fb 100%);
    --gradient-red: linear-gradient(135deg, #ff4d4d, #ff1a1a);
    --gradient-red-light: linear-gradient(135deg, #e63946 0%, #dc6f78 100%);
    --gradient-deal-btn: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    --gradient-deal-btn-hover: linear-gradient(135deg, #c2e9fb 0%, #a1c4fd 100%);

    /* Background Colors */
    --bg-danger-soft: rgba(255, 77, 77, 0.1);
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;

    /* Text Colors */
    --text-dark: #333;
    --text-muted: #6c757d;
    --text-white: #ffffff;
    --text-success: #28a745;

    /* Shadow Colors */
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.16);
    --shadow-dark: rgba(0,0,0,0.25);
    --shadow-red: rgba(234, 11, 30, 0.7);
    --shadow-red-pulse: rgba(255, 107, 107, 0.4);

    /* Border Colors */
    --border-light: #f0f0f0;
    --border-dashed: #ff4d4d;

    /* Animation Colors */
    --ripple-color: rgba(255, 255, 255, 0.5);
    --green-glow: rgba(74, 246, 38, 0.5);
}

/* Animated Button Styles */
.get-code-btn {
    padding: 12px 24px;
    background-color: var(--primary-red);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 3px 6px var(--shadow-medium);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.get-code-btn:hover {
    color: var(--text-white);
    background-color: var(--primary-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-dark);
}

.get-code-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px var(--shadow-light);
}

/* Ripple Effect */
.get-code-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: var(--ripple-color);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
    z-index: -1;
}

.get-code-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 var(--shadow-red);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(234, 11, 30, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 11, 30, 0);
    }
}

.get-code-btn.pulse {
    animation: pulse 1.5s infinite;
}

/* Optional: Add this class via JavaScript for attention-grabbing effect */
.get-code-btn.attention {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-3px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(3px, 0, 0);
    }
}

.get-code-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px var(--shadow-light);
}

.deal-btn {
    background: var(--gradient-deal-btn);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align:center;
    text-decoration:none;
}

.deal-btn:hover {
    background: var(--gradient-deal-btn-hover);
    color: var(--text-dark);
    transform: translateY(-2px);
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.btn-code:hover {
    background-color: #1f1fda;
    box-shadow: 0 0 15px var(--green-glow);
    transform: translateY(-2px);
}

.btn-code:active {
    transform: translateY(1px);
    box-shadow: 0 0 5px rgba(74, 246, 38, 0.2);
}

.store-header {
    background: var(--gradient-blue);
    box-shadow: 0 10px 20px var(--shadow-light);
}

.store-logo-container {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-light) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

.content-text{
    width: 100%;
}

.content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.content-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Mobile Store Header Layout */
@media (max-width: 768px) {
    .mobile-store-header {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 1rem;
        background: var(--gradient-red-light);
        border-radius: 12px;
        margin-bottom: 1.5rem;
        box-shadow: 0 4px 12px var(--shadow-light);
    }

    .mobile-store-logo {
        width: 80px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
        border: 3px solid var(--text-white);
        box-shadow: 0 4px 8px var(--shadow-light);
    }

    .mobile-store-info {
        flex: 1;
        color: var(--text-white);
    }

    .mobile-store-name {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
    }

    .mobile-store-tagline {
        font-size: 0.9rem;
        opacity: 0.9;
        margin-bottom: 0.5rem;
    }

    .mobile-store-actions {
        display: flex;
        gap: 8px;
    }

    .mobile-store-actions .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Two coupons per row on mobile */
    .coupons-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .coupons-grid .card {
        margin-bottom: 0;
    }

    .store-header {
        padding: 2rem 1rem !important;
    }

    .store-logo-container {
        width: 80px;
        height: 80px;
    }
    .content-text{
        width: 100%;
    }
}

@media (max-width: 576px) {
    .mobile-store-header {
        padding: 0.75rem;
    }

    .mobile-store-logo {
        width: 70px;
        height: 70px;
    }

    .mobile-store-name {
        font-size: 1.1rem;
    }

    .mobile-store-tagline {
        font-size: 0.85rem;
    }

    /* Stack coupons on very small screens */
    .coupons-grid {
        grid-template-columns: 1fr;
    }

    .store-header {
        padding: 1rem !important;
    }

    .store-logo-container {
        width: 60px;
        height: 60px;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    .mobile-store-header {
        display: none;
    }

    /* Three coupons per row on desktop */
    .coupons-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Hide desktop header on mobile */
@media (max-width: 768px) {
    .desktop-store-header {
        display: none;
    }
}

@media (max-width: 576px) {
    .store-header {
        min-height: 200px !important;
        padding: 1.5rem 0.5rem !important;
    }
    .store-logo-container {
        width: 60px !important;
        height: 60px !important;
    }
    .store-logo {
        width: 60px !important;
        height: 60px !important;
    }
    .store-header h1 {
        font-size: 1.25rem !important;
    }
    .store-header .lead {
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .content-text {
        font-size: 0.97rem !important;
        word-break: break-word;
    }
}

@media (max-width: 576px) {
    .breadcrumb {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        font-size: 0.95rem;
    }
    .breadcrumb-item {
        flex-shrink: 0 !important;
    }
}

/* Custom Styles for Enhanced Coupon Modal */
.bg-gradient-danger {
    background: var(--gradient-red);
}

.bg-danger-soft {
    background-color: var(--bg-danger-soft);
}

.logo-container {
    width: 90px;
    height: 90px;
    padding: 5px;
    background: var(--gradient-red);
    border-radius: 50%;
}

.coupon-container {
    border: 2px dashed var(--border-dashed);
    position: relative;
    overflow: hidden;
}

.coupon-cutout {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--bg-white);
    border-radius: 50%;
}

.coupon-cutout.top {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.coupon-cutout.bottom {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.coupon-code-text {
    letter-spacing: 2px;
    color: var(--primary-red-hover) !important;
}

.copy-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-line {
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    flex: 1;
}

.ribbon {
    position: absolute;
    right: -5px;
    top: -5px;
    z-index: 1;
    overflow: hidden;
    width: 150px;
    height: 150px;
    text-align: right;
}

.ribbon span {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-white);
    text-transform: uppercase;
    text-align: center;
    line-height: 30px;
    transform: rotate(45deg);
    width: 200px;
    display: block;
    position: absolute;
    top: 35px;
    right: -40px;
    box-shadow: 0 3px 10px var(--shadow-light);
}

.store-link-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.store-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 77, 77, 0.4);
}

.bounce {
    animation: bounce 2s infinite;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}

@keyframes pulse {
    0% {transform: rotate(45deg) scale(1);}
    50% {transform: rotate(45deg) scale(1.05);}
    100% {transform: rotate(45deg) scale(1);}
}

.main{
    padding: 10px;
    margin: 10px;
}

/* Improved Layout */
.page-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .page-container {
        flex-direction: row;
    }

    .coupons-section {
        flex: 1;
        min-width: 0;
    }

    .sidebar-section {
        width: 350px;
        flex-shrink: 0;
    }
}

/* Enhanced Coupon Cards */
.coupon-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.coupon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-light);
}

.coupon-card-header {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.coupon-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.coupon-card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .coupon-card-body {
        padding: 1rem;
    }

    .coupon-card-footer {
        padding: 0.75rem 1rem;
    }
}

/* Left Ribbon Styles - Better Design */
.ribbon-left {
    position: absolute;
    left: -10px;
    top: 20px;
    z-index: 1000;
}

.ribbon-left-content {
    display: block;
    background: linear-gradient(135deg, var(--primary-red-light), var(--primary-red-dark));
    color: var(--text-white);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 8px 15px;
    box-shadow: 0 3px 10px var(--shadow-light);
    position: relative;
    letter-spacing: 0.5px;
}

.ribbon-left-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    border-right: 10px solid var(--primary-red-darker);
    border-bottom: 14px solid transparent;
}

.ribbon-left-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10px;
    border-right: 10px solid var(--primary-red-darker);
    border-top: 14px solid transparent;
}

/* Pulse animation for ribbon */
.ribbon-left-content {
    animation: ribbonPulse 2s infinite;
}

@keyframes ribbonPulse {
    0% {
        box-shadow: 0 3px 10px var(--shadow-red-pulse);
    }
    50% {
        box-shadow: 0 3px 20px rgba(255, 107, 107, 0.8);
    }
    100% {
        box-shadow: 0 3px 10px var(--shadow-red-pulse);
    }
}

/* Ensure close button is above ribbon */
.btn-close {
    z-index: 1001;
}
