/* ===================================
   Offers Page Styles
   Malaysian Membership Theme
   =================================== */

/* Hero Section */
.offers-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-premium);
}

.offers-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4A853' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.offers-hero .hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.offers-hero .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.offers-hero .hero-title .highlight {
    color: var(--primary);
}

.offers-hero .hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.offers-hero .hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.offers-hero .stat {
    text-align: center;
}

.offers-hero .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.offers-hero .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* Filter Section */
.filter-section {
    padding: 30px 0;
    background: var(--bg-white);
    border-bottom: 1px solid rgba(212, 168, 83, 0.2);
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

.filter-group select {
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg-cream);
    border: 1px solid rgba(212, 168, 83, 0.3);
    border-radius: 8px;
    color: var(--text-dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23D4A853' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

.search-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-group input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg-cream);
    border: 1px solid rgba(212, 168, 83, 0.3);
    border-radius: 8px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.search-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

.search-group input::placeholder {
    color: var(--text-muted);
}

.search-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 0.9rem;
}

/* Wallet Notice */
.wallet-notice {
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.1) 0%, rgba(26, 54, 93, 0.1) 100%);
    border: 1px solid rgba(212, 168, 83, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.notice-content i {
    color: var(--primary);
    font-size: 1.2rem;
}

.notice-content span {
    flex: 1;
    color: var(--text-body);
    font-size: 0.95rem;
}

.wallet-notice.hidden {
    display: none;
}

/* Offers Section */
.offers-section {
    padding: 60px 0;
    background: var(--bg-light);
}

/* Offers Grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Offer Card */
.offer-card {
    background: var(--bg-white);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.offer-card.hidden {
    display: none;
}

.offer-image {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.offer-card:hover .offer-image img {
    transform: scale(1.05);
}

.offer-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-gold);
    color: var(--secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.offer-badge.upgrade {
    background: linear-gradient(135deg, #38A169 0%, #2F855A 100%);
    color: white;
}

.offer-badge.discount {
    background: linear-gradient(135deg, #E53E3E 0%, #C53030 100%);
    color: white;
}

.offer-badge.access {
    background: var(--gradient-gold);
    color: var(--secondary);
}

.offer-badge.priority {
    background: linear-gradient(135deg, #805AD5 0%, #6B46C1 100%);
    color: white;
}

.offer-category {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(26, 54, 93, 0.95);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Availability Badges */
.availability-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.availability-badge.exhausted {
    background: rgba(220, 38, 38, 0.95);
    color: white;
}

.availability-badge.almost-gone {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    animation: pulse-badge 2s infinite;
}

.availability-badge.limited {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.offer-content {
    padding: 1.5rem;
}

.offer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.offer-business {
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.offer-business i {
    font-size: 0.8rem;
    color: var(--primary);
}

.offer-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-location i {
    font-size: 0.8rem;
}

.offer-description {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 168, 83, 0.2);
}

.token-requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-body);
    font-size: 0.85rem;
}

.token-requirement i {
    color: var(--primary);
}

.btn-redeem {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: var(--gradient-gold);
    color: var(--secondary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-redeem:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results i {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-body);
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--bg-cream);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-body);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Business CTA */
.business-cta {
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.1) 0%, rgba(26, 54, 93, 0.1) 100%);
}

.business-cta .cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    text-align: left;
    flex-wrap: wrap;
    gap: 2rem;
}

.business-cta .cta-text {
    flex: 1;
}

.business-cta h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.business-cta p {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text-body);
}

/* Offer Modal */
.offer-modal {
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.offer-modal-content {
    padding: 1.5rem;
}

/* Modal offer image container */
.modal-offer-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #f3f4f6;
}

.modal-offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Business info in modal */
.offer-business-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}

.business-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.offer-business-info h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin: 0;
}

.offer-business-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Offer type tag */
.offer-type-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: var(--gradient-gold);
    color: var(--secondary);
}

.offer-type-tag.upgrade {
    background: linear-gradient(135deg, #38A169 0%, #2F855A 100%);
    color: white;
}

.offer-type-tag.discount {
    background: linear-gradient(135deg, #E53E3E 0%, #C53030 100%);
    color: white;
}

/* Modal sections */
.offer-description-full,
.offer-terms,
.offer-eligibility {
    margin-bottom: 1rem;
}

.offer-description-full h4,
.offer-terms h4,
.offer-eligibility h4 {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.offer-description-full p,
.offer-terms p,
.offer-eligibility p {
    font-size: 0.85rem;
    color: var(--text-body);
    line-height: 1.5;
}

.offer-terms {
    background: #f9fafb;
    padding: 10px;
    border-radius: 8px;
}

.modal-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.modal-actions .btn {
    width: 100%;
}

.offer-modal-content h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.offer-modal-content .modal-business {
    color: var(--primary-dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.offer-modal-content .modal-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.offer-modal-content .modal-description {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.offer-modal-content .modal-terms {
    background: var(--bg-cream);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 168, 83, 0.2);
}

.offer-modal-content .modal-terms h4 {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.offer-modal-content .modal-terms p {
    color: var(--text-body);
    font-size: 0.85rem;
}

.offer-modal-content .modal-requirement {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.1) 0%, rgba(26, 54, 93, 0.1) 100%);
    border-radius: 8px;
    border: 1px solid rgba(212, 168, 83, 0.3);
}

.offer-modal-content .modal-requirement span {
    color: var(--text-dark);
    font-weight: 500;
}

.offer-modal-content .modal-requirement .token-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-modal-content .modal-requirement .token-check.eligible {
    color: var(--success);
}

.offer-modal-content .modal-requirement .token-check.not-eligible {
    color: var(--error);
}

/* Footer */
.footer {
    background: var(--secondary);
    padding: 60px 0 30px;
    border-top: 3px solid var(--primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .offers-hero {
        padding: 100px 0 40px;
        min-height: auto;
    }

    .offers-hero .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .filter-section {
        position: relative;
        top: 0;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

    .search-group {
        width: 100%;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .business-cta .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}
