/**
 * FIORRA OFFERS PAGE STYLES
 * Version: 2.0
 * Glassmorphism + Aurora Theme
 */

/* ============================================
   BASE
   ============================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   AURORA BACKGROUND
   ============================================ */

.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    z-index: -2;
}

.aurora-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 20%, rgba(157, 78, 221, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 40% 60%, rgba(102, 126, 234, 0.1) 0%, transparent 40%);
    animation: auroraMove 20s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes auroraMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, -5%) rotate(5deg); }
}

/* ============================================
   CONTAINER
   ============================================ */

.offers-container {
    min-height: 100vh;
    padding-bottom: 100px;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER - Glassmorphism
   ============================================ */

.offers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-spacer {
    width: 80px;
}

/* ============================================
   FILTERS SECTION
   ============================================ */

.filters-section {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filters-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters-row::-webkit-scrollbar {
    display: none;
}

.filter-select {
    flex-shrink: 0;
    padding: 12px 38px 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    min-width: 140px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.6)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(157, 78, 221, 0.5);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.2);
}

.filter-select.active {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.4), rgba(255, 107, 157, 0.3));
    border-color: rgba(255, 107, 157, 0.4);
}

.filter-select option {
    background: #1a1a2e;
    color: #fff;
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */

.categories-section {
    padding: 16px 20px;
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-chip:active {
    transform: scale(0.95);
}

.category-chip.active {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.5), rgba(255, 107, 157, 0.4));
    border-color: rgba(255, 107, 157, 0.5);
    color: #fff;
    box-shadow: 0 4px 20px rgba(157, 78, 221, 0.3);
}

.category-chip .icon {
    font-size: 1.1rem;
}

/* ============================================
   FEATURED BANNER
   ============================================ */

.featured-banner {
    margin: 0 20px 20px;
    background: linear-gradient(135deg, #9d4edd 0%, #ff6b9d 100%);
    border-radius: 24px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(157, 78, 221, 0.4);
}

.featured-banner::before {
    content: '';
    position: absolute;
    top: -100%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    animation: shimmerBanner 3s ease-in-out infinite;
}

@keyframes shimmerBanner {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(-10%, 10%); opacity: 0.8; }
}

.featured-content {
    position: relative;
    z-index: 1;
}

.featured-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
    backdrop-filter: blur(10px);
}

.featured-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.featured-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 18px;
    line-height: 1.5;
}

.featured-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #9d4edd;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.featured-btn:active {
    transform: scale(0.95);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.offers-main {
    padding: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.offer-count {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
}

/* ============================================
   OFFERS GRID
   ============================================ */

.offers-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ============================================
   OFFER CARD - Glassmorphism
   ============================================ */

.offer-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.offer-card:active {
    transform: scale(0.98);
}

.offer-card:hover {
    border-color: rgba(157, 78, 221, 0.3);
    box-shadow: 0 8px 32px rgba(157, 78, 221, 0.15);
}

.offer-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), rgba(255, 107, 157, 0.1));
}

.offer-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.15), rgba(255, 107, 157, 0.1));
}

/* Badges */
.offer-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 0.3px;
}

.badge-discount {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.badge-premium {
    background: linear-gradient(135deg, #9d4edd, #ff6b9d);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
}

.badge-featured {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.offer-category-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Content */
.offer-content {
    padding: 18px;
}

.offer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-company {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    font-weight: 500;
}

.offer-location {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.offer-location .icon {
    color: #ff6b9d;
}

.offer-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.offer-prices {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-original {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: line-through;
}

.price-offer {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9d4edd, #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.offer-validity {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    padding: 5px 10px;
    border-radius: 12px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    opacity: 0.3;
}

.empty-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.empty-message {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   LOAD MORE
   ============================================ */

.load-more {
    text-align: center;
    padding: 30px 20px;
}

.btn-load-more {
    padding: 14px 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-load-more:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.btn-load-more:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   PREMIUM MODAL
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-overlay.show {
    display: flex;
}

.premium-modal {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f23 100%);
    border-radius: 28px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    overflow: hidden;
    animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.premium-modal-header {
    background: linear-gradient(135deg, #9d4edd 0%, #ff6b9d 100%);
    padding: 40px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.premium-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
}

.premium-modal-header .icon {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.premium-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.premium-modal-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.premium-modal-body {
    padding: 28px;
}

.premium-modal-body p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.7;
}

.btn-premium {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #9d4edd, #ff6b9d);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(157, 78, 221, 0.4);
}

.btn-premium:active {
    transform: scale(0.97);
}

.btn-close-modal {
    display: block;
    width: 100%;
    padding: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-close-modal:active {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    .offers-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .offer-image-wrapper {
        height: 200px;
    }
}

@media (min-width: 1024px) {
    .offers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
