/* ============================================
   MY OFFERS PAGE - ADMIN DASHBOARD
   TRUE Mobile-First Responsive Design
   ============================================ */

/* ============================================
   BASE MOBILE STYLES (320px+)
   ============================================ */

.my-offers-container {
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ============================================
   HEADER SECTION
   ============================================ */

.my-offers-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.header-content h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
}

.header-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--color-gray);
    line-height: 1.4;
}

.btn-create-offer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   STATS OVERVIEW GRID
   ============================================ */

.offers-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-height: 70px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--color-gray);
    font-weight: 500;
    line-height: 1.3;
}

/* Stat Card Variants */
.stat-primary .stat-icon {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 107, 53, 0.2) 100%);
    color: var(--color-primary);
}

.stat-primary .stat-value {
    color: var(--color-primary);
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%);
    color: #10b981;
}

.stat-success .stat-value {
    color: #10b981;
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, rgba(254, 196, 0, 0.1) 0%, rgba(254, 196, 0, 0.2) 100%);
    color: #FEC400;
}

.stat-warning .stat-value {
    color: #FEC400;
}

.stat-gold .stat-icon {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.2) 100%);
    color: #ffd700;
}

.stat-gold .stat-value {
    color: #ffd700;
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.2) 100%);
    color: #3b82f6;
}

.stat-info .stat-value {
    color: #3b82f6;
}

.stat-temperature .stat-icon {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1) 0%, rgba(230, 57, 70, 0.2) 100%);
    color: #E63946;
}

.stat-temperature .stat-value {
    color: #E63946;
}

/* ============================================
   FILTERS/TABS
   ============================================ */

.offers-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    position: relative;
}

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

/* Gradient indicators for scroll */
.offers-filters::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 4px;
    width: 30px;
    background: linear-gradient(to left, var(--color-background) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 600px) {
    .offers-filters::after {
        opacity: 1;
    }
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    background: rgba(255, 107, 53, 0.05);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.filter-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   OFFERS LIST
   ============================================ */

.offers-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ============================================
   OFFER CARD
   ============================================ */

.offer-card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* Offer Image */
.offer-image {
    position: relative;
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.offer-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-hot {
    background: linear-gradient(135deg, #E63946 0%, #FF6B35 100%);
    color: white;
    animation: pulse-badge 2s infinite;
}

.badge-inactive {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(230, 57, 70, 0);
    }
}

.offer-price-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 6px 10px;
    border-radius: 6px;
}

.price-original {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: line-through;
    line-height: 1.2;
}

.price-quizdrop {
    font-size: 16px;
    font-weight: 700;
    color: #FEC400;
    line-height: 1.2;
}

/* Offer Content */
.offer-content {
    padding: 14px;
}

.offer-title {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-date {
    margin: 0 0 12px 0;
    font-size: 11px;
    color: var(--color-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Offer Metrics */
.offer-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--color-gray);
}

.metric i {
    font-size: 14px;
    color: var(--color-primary);
}

.metric span {
    font-weight: 700;
    font-size: 13px;
    color: var(--color-dark);
}

.metric-gold i {
    color: #ffd700;
}

.metric-gold span {
    color: #ffd700;
}

.metric-score i {
    color: #E63946;
}

.metric-score span {
    color: #E63946;
}

/* Offer Actions */
.offer-actions {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.offer-actions .btn {
    padding: 10px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.offer-actions .btn i {
    font-size: 12px;
}

.offer-actions .btn span {
    display: none;
}

.offer-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.offer-actions .btn:active {
    transform: translateY(0);
}

/* Button Styles */
.btn-edit {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 152, 0, 0.15) 100%);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #ff9800;
}

.btn-edit:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 152, 0, 0.25) 100%);
    border-color: #ff9800;
    color: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
}

/* Toggle Switch (Facebook Ads style) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch .toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-checkbox:checked + .toggle-slider {
    background-color: #10b981;
}

.toggle-checkbox:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-slider:hover {
    background-color: #b3b3b3;
}

.toggle-checkbox:checked + .toggle-slider:hover {
    background-color: #059669;
}

.btn-sm {
    padding: 8px 10px;
    font-size: 12px;
}

/* ============================================
   EMPTY & ERROR STATES
   ============================================ */

.empty-state,
.error-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i,
.error-state i {
    font-size: 48px;
    color: var(--color-gray);
    margin-bottom: 16px;
}

.empty-state h3,
.error-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
}

.empty-state p,
.error-state p {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: var(--color-gray);
    line-height: 1.5;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading,
.loading-stats {
    text-align: center;
    padding: 30px 20px;
    color: var(--color-gray);
}

.loading i,
.loading-stats i {
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

/* ============================================
   SMALL MOBILE (375px+)
   ============================================ */

@media (min-width: 375px) {
    .my-offers-container {
        padding: 0;
    }

    .header-content h2 {
        font-size: 22px;
    }

    .offer-actions .btn span {
        display: inline;
    }

    .offer-actions {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* ============================================
   TABLET (600px+)
   ============================================ */

@media (min-width: 600px) {
    .my-offers-container {
        padding: 20px;
    }

    .my-offers-header {
        gap: 16px;
        margin-bottom: 24px;
    }

    .header-content h2 {
        font-size: 26px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .btn-create-offer {
        font-size: 15px;
        padding: 14px 20px;
    }

    .offers-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stat-label {
        font-size: 12px;
    }

    .offers-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .offer-image {
        height: 180px;
    }

    .offer-content {
        padding: 16px;
    }

    .offer-title {
        font-size: 16px;
    }

    .offer-metrics {
        grid-template-columns: repeat(6, 1fr);
    }

    .offer-actions {
        grid-template-columns: auto 1fr 1fr;
        gap: 16px;
    }

    .offer-actions .btn {
        font-size: 14px;
        padding: 10px 16px;
        min-width: 100px;
    }

    .offer-actions .btn span {
        font-size: 10px;
    }

    .toggle-switch {
        width: 40px;
        height: 22px;
        justify-self: center;
    }

    .toggle-slider:before {
        height: 16px;
        width: 16px;
    }

    .toggle-checkbox:checked + .toggle-slider:before {
        transform: translateX(18px);
    }
}

/* ============================================
   DESKTOP (768px+)
   ============================================ */

@media (min-width: 768px) {
    .my-offers-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 20px;
    }

    .btn-create-offer {
        width: auto;
    }

    .offers-stats-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .offers-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* ============================================
   LARGE DESKTOP (1024px+)
   ============================================ */

@media (min-width: 1024px) {
    .my-offers-container {
        padding: 32px;
    }

    .header-content h2 {
        font-size: 32px;
    }

    .header-subtitle {
        font-size: 16px;
    }

    .btn-create-offer {
        font-size: 16px;
    }

    .offers-list {
        gap: 24px;
    }

    .offer-image {
        height: 200px;
    }

    .offer-title {
        font-size: 18px;
    }
}

/* ============================================
   EXTRA LARGE DESKTOP (1400px+)
   ============================================ */

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