/* ═══════════════════════════════════════════
   PromoTech Deals — Professional Layout v3
   Sidebar + Cards + Shopee-style Coupons
   ═══════════════════════════════════════════ */

/* ═══════════ Sidebar ═══════════ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5);
    border-bottom: 1px solid var(--border);
    min-height: 64px;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--purple), #6d28d9);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand {
    font-size: var(--font-lg);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand span {
    color: var(--purple);
}

.sidebar-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-3) 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.nav-label {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-4) var(--space-5) var(--space-2);
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-5);
    margin: 1px var(--space-2);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.nav-item.active {
    background: var(--purple-dim);
    color: var(--purple);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--purple);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon img {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.nav-icon-emoji {
    font-size: 16px;
    line-height: 1;
}

.nav-count {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--bg-raised);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.nav-item.active .nav-count {
    background: var(--purple-dim);
    color: var(--purple);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border);
    min-height: 48px;
    flex-shrink: 0;
}

.sidebar-footer-text {
    font-size: var(--font-xs);
    color: var(--text-dim);
}

/* ═══════════ Main Wrapper ═══════════ */

.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-5);
}

/* ═══════════ Top Bar (Mobile) ═══════════ */

.topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.hamburger-btn:hover {
    background: var(--bg);
}

.hamburger-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.topbar-logo {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--purple), #6d28d9);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.topbar-title {
    font-size: var(--font-md);
    font-weight: 700;
}

.topbar-title span {
    color: var(--purple);
}

.topbar-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

/* ═══════════ Page Header ═══════════ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: var(--font-2xl);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.page-count {
    font-size: var(--font-sm);
    color: var(--text-muted);
    font-weight: 400;
    margin-left: var(--space-1);
}

.page-subtitle {
    font-size: var(--font-xs);
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.page-subtitle .count-flash {
    animation: countFlash 0.5s ease;
}

@keyframes countFlash {
    0% { color: var(--green); transform: scale(1.2); }
    100% { color: var(--text-muted); transform: scale(1); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-sm);
    color: var(--green);
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* ═══════════ Search Bar ═══════════ */

.search-bar {
    position: relative;
    max-width: 360px;
}

.search-bar input {
    width: 100%;
    padding: var(--space-2) var(--space-4);
    padding-left: 36px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    font-size: var(--font-sm);
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.15s ease;
}

.search-bar input:focus {
    border-color: var(--purple);
}

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

.search-bar svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
    stroke-width: 2;
    fill: none;
    pointer-events: none;
}

/* ═══════════ Offers Grid ═══════════ */

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-4);
}

/* ═══════════ Offer Card — Marketplace Style ═══════════ */

.offer-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease forwards;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.offer-card:hover {
    border-color: var(--purple);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    transform: translateY(-3px);
}

.card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f7;
    overflow: hidden;
}

.card-img > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-img .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.3);
    background: linear-gradient(135deg, #1a1040, #0f2040);
    position: relative;
}

.card-img .no-img img {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    opacity: 0.35;
}

.card-img .no-img .no-img-cat {
    font-size: 3.5rem;
    opacity: 0.5;
}

.card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.badge {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}

.badge-plat { color: #fff; }
.badge-plat.amazon { background: rgba(255, 153, 0, 0.9); }
.badge-plat.shopee { background: rgba(238, 77, 45, 0.9); }
.badge-plat.mercadolivre { background: rgba(255, 230, 0, 0.9); color: #333; }
.badge-plat.kabum { background: rgba(255, 101, 0, 0.9); }
.badge-plat.outro { background: rgba(139, 92, 246, 0.9); }
.badge-new { background: var(--green); color: #fff; }

.card-time-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* When hot tag occupies top-right, move time badge to bottom-left */
.card-img:has(.card-tag-hot) .card-time-badge {
    top: auto;
    right: auto;
    bottom: 8px;
    left: 8px;
}

.card-body {
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-2);
}

.card-title {
    font-size: var(--font-base);
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-prices {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
}

.price-old {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-now {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green);
}

.price-inst {
    font-size: var(--font-xs);
    color: var(--text-secondary);
}

.card-discount {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--discount);
    z-index: 2;
    letter-spacing: -0.02em;
}

/* HOT DEAL / MEGA OFERTA tags */
.card-tag-hot {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
}

.card-tag-hot.hot-deal {
    background: rgba(255, 90, 44, 0.9);
}

.card-tag-hot.mega-oferta {
    background: rgba(239, 68, 68, 0.95);
    animation: pulse 2s ease-in-out infinite;
}

/* Social proof */
.card-views {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 var(--space-4);
    margin-bottom: 2px;
}

/* Coupon area — unified style */
.card-coupon-area {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 1px;
    padding: 6px 10px;
    background: var(--purple-dim);
    border: 1px dashed rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-sm);
    margin-top: var(--space-1);
    align-items: center;
}

/* Apply style — stacked, no button */
.card-coupon-apply {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 10px;
    gap: 2px;
}

/* Extra coupon line inside main block (e.g. aplique inside resgate) */
.card-coupon-extra {
    grid-column: 1 / -1;
    border-top: 1px dashed rgba(139, 92, 246, 0.2);
    margin-top: 3px;
    padding-top: 3px;
    font-size: 10px;
    line-height: 1.3;
}

.card-coupon-extra-label {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 8px;
    letter-spacing: 0.03em;
}

.card-coupon-extra-value {
    color: var(--purple);
    font-weight: 700;
    font-size: 10px;
}

.card-coupon-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.card-coupon-text {
    font-size: var(--font-sm);
    color: var(--purple);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-coupon-copy,
.card-coupon-btn-redeem {
    grid-column: 2;
    grid-row: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: var(--purple);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: var(--font-family);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
}

.card-coupon-copy:hover,
.card-coupon-btn-redeem:hover {
    background: var(--purple-hover);
    color: #fff;
}

.card-coupon-copy.copied {
    background: var(--green);
}

/* Coupon link (no code, just description) */
.card-coupon-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--yellow-dim);
    border-radius: var(--radius-sm);
    font-size: var(--font-xs);
    color: var(--yellow);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-footer {
    padding: var(--space-2) var(--space-4) var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-offer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    font-family: var(--font-family);
    flex: 1;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.btn-offer:hover {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

.card-time {
    font-size: 10px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ═══════════ Load More ═══════════ */

.load-more {
    text-align: center;
    margin: var(--space-8) 0;
}

.btn-load-more {
    padding: 10px 32px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-family);
}

.btn-load-more:hover {
    border-color: var(--purple);
    color: var(--purple);
}

/* ═══════════ Coupons Page — Shopee-style Cards ═══════════ */

/* Coupon page header */
.coupon-page-hero {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border);
}

.coupon-page-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.coupon-page-info h1 {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: var(--space-1);
}

.coupon-page-info h1 span {
    color: #fff;
}

.coupon-page-info p {
    font-size: var(--font-sm);
    color: #fff;
}

.coupon-page-count {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    padding: 4px 12px;
    background: var(--purple-dim);
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    color: #fff;
}

/* Section wrapper */
.coupons-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.coupon-section {
    margin-bottom: var(--space-8);
}

.coupon-section-title {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--purple);
    display: inline-block;
}

/* Card grid — 2 columns like Shopee */
.coupon-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

/* Individual coupon card — Shopee style */
.coupon-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease forwards;
    overflow: hidden;
    min-width: 0;
}

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

/* Card top: category name */
.coupon-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.coupon-card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: #EE4D2E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.coupon-section-lojas_oficiais .coupon-card-icon {
    background: #D0021B;
}

/* Platform-specific coupon icon colors */
.coupon-card.plat-amazon .coupon-card-icon { background: #FF9900; }
.coupon-card.plat-mercadolivre .coupon-card-icon { background: #FFE600; }
.coupon-card.plat-kabum .coupon-card-icon { background: #FF6500; }

.coupon-card-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.coupon-card-category {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card title: "PROMO25 — 20% OFF" */
.coupon-card-title {
    font-size: var(--font-base);
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Limite line */
.coupon-card-limite {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Copyable code box */
.coupon-card-copybox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: var(--purple-dim);
    border: 1px dashed rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-sm);
}

.coupon-card-copycode {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--purple);
    letter-spacing: 0.05em;
    font-family: monospace, var(--font-family);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coupon-card-copybtn {
    padding: 3px 8px;
    background: var(--purple);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: var(--font-family);
    text-transform: uppercase;
    flex-shrink: 0;
}

.coupon-card-copybtn:hover {
    background: var(--purple-hover);
}

.coupon-card-copybtn.copied {
    background: var(--green);
}

/* Card details */
.coupon-card-desc {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.coupon-card-valor {
    font-size: 1.1rem;
    font-weight: 800;
    color: #FF5A2C;
    letter-spacing: 0.3px;
}

.coupon-card-minimo {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    line-height: 1.3;
}

.coupon-card-tag {
    font-size: var(--font-xs);
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

/* Card footer: conditions + CTA */
.coupon-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}

.coupon-card-conditions {
    font-size: var(--font-xs);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.coupon-card-conditions:hover {
    text-decoration: underline;
}

.coupon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: var(--purple);
    color: #fff;
    border: 1px solid var(--purple);
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    font-family: var(--font-family);
    white-space: nowrap;
}

.coupon-btn:hover {
    background: var(--purple-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.coupon-btn.copied {
    background: var(--green);
    border-color: var(--green);
}

.coupon-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.coupon-btn-outline:hover {
    background: var(--bg-raised);
    color: var(--text);
    border-color: var(--border-hover);
}

/* ═══════════ Empty State ═══════════ */

.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-6);
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state p {
    font-size: var(--font-md);
}

/* ═══════════ Skeleton Loading ═══════════ */

.skeleton-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, var(--bg-raised) 25%, #1e2536 50%, var(--bg-raised) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, var(--bg-raised) 25%, #1e2536 50%, var(--bg-raised) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.w75 { width: 75%; }
.skeleton-line.w50 { width: 50%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.price { height: 18px; width: 45%; margin-top: var(--space-2); }
.skeleton-line.btn { height: 36px; width: 100%; margin-top: auto; }

/* ═══════════ Toast New Offers ═══════════ */

.toast-new {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--purple);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
    font-weight: 600;
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.toast-new.show {
    transform: translateX(-50%) translateY(0);
}

/* ═══════════ Quick Filters ═══════════ */

.quick-filters {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font-family);
}

.filter-chip:hover {
    border-color: var(--purple);
    color: var(--text);
}

.filter-chip.active {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
    font-weight: 600;
}

.filter-chip img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.filter-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: var(--font-family);
    appearance: none;
    -webkit-appearance: none;
}

.filter-sort:hover {
    border-color: var(--purple);
    color: var(--text);
}

.filter-sort.active {
    border-color: var(--purple);
    color: var(--purple);
}

/* ═══════════ Scroll Infinite Sentinel ═══════════ */

.scroll-sentinel {
    height: 1px;
    width: 100%;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: var(--space-6) 0;
}

.loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════ Responsive ═══════════ */

@media (max-width: 1024px) {
    .sidebar {
        width: 64px;
    }

    .sidebar .sidebar-brand,
    .sidebar .nav-label,
    .sidebar .nav-text,
    .sidebar-footer-text {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }

    .sidebar .sidebar-logo-img {
        height: 32px;
    }

    .sidebar .sidebar-header {
        justify-content: center;
        padding: var(--space-5) var(--space-3);
    }

    .sidebar .nav-item {
        justify-content: center;
        padding: var(--space-2) var(--space-3);
        margin: 1px var(--space-2);
    }

    .sidebar .nav-item.active::before {
        display: none;
    }

    .sidebar .sidebar-footer {
        justify-content: center;
        padding: var(--space-3);
    }

    /* Expand on hover */
    .sidebar:hover {
        width: 260px;
    }

    .sidebar:hover .sidebar-brand,
    .sidebar:hover .nav-label,
    .sidebar:hover .nav-text,
    .sidebar:hover .sidebar-footer-text {
        opacity: 1;
        width: auto;
    }

    .sidebar:hover .sidebar-logo-img {
        height: 40px;
    }

    .sidebar:hover .sidebar-header {
        justify-content: flex-start;
        padding: var(--space-5);
    }

    .sidebar:hover .nav-item {
        justify-content: flex-start;
        padding: var(--space-2) var(--space-5);
    }

    .sidebar:hover .nav-item.active::before {
        display: block;
    }

    .main-wrapper {
        margin-left: 64px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.mobile-open ~ .sidebar-overlay {
        display: block;
    }

    /* Reset collapsed styles for mobile */
    .sidebar .sidebar-brand,
    .sidebar .nav-label,
    .sidebar .nav-text,
    .sidebar .sidebar-footer-text {
        opacity: 1;
        width: auto;
    }

    .sidebar .sidebar-header {
        justify-content: flex-start;
        padding: var(--space-5);
    }

    .sidebar .nav-item {
        justify-content: flex-start;
        padding: var(--space-2) var(--space-5);
    }

    .sidebar .nav-item.active::before {
        display: block;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .topbar {
        display: flex;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .header-right {
        width: 100%;
    }

    .search-bar {
        flex: 1;
        max-width: none;
    }

    .main-content {
        padding: var(--space-3);
    }

    .offers-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-3);
    }

    /* Coupon page responsive - tablet/mobile */
    .coupon-page-hero {
        gap: var(--space-3);
    }

    .coupon-page-logo {
        width: 48px;
        height: 48px;
    }

    .coupon-page-info h1 {
        font-size: var(--font-lg);
    }

    .coupon-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .coupon-card {
        padding: var(--space-3);
        gap: var(--space-2);
    }

    .coupon-card-icon {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .coupon-card-title {
        font-size: 0.7rem;
    }

    .coupon-card-valor {
        font-size: 0.85rem;
    }

    .coupon-card-desc {
        font-size: 0.6rem;
    }

    .coupon-card-minimo {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .coupon-card-tag {
        font-size: 0.6rem;
    }

    .coupon-card-footer {
        padding-top: var(--space-2);
        gap: var(--space-2);
    }

    .coupon-card-conditions {
        font-size: 0.6rem;
    }

    .coupon-btn {
        padding: 6px 12px;
        font-size: 0.65rem;
    }

    .card-coupon-label {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 2px;
    }

    .card-coupon-area {
        grid-template-columns: auto auto;
        justify-content: center;
    }

    .card-coupon-text {
        grid-row: 2;
    }

    .card-coupon-copy,
    .card-coupon-btn-redeem {
        grid-row: 2;
    }

    .card-coupon-extra {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .offers-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2);
    }

    .card-body {
        padding: var(--space-2) var(--space-3);
    }

    .card-title {
        font-size: var(--font-sm);
    }

    .price-now {
        font-size: var(--font-md);
    }

    .card-footer {
        padding: var(--space-1) var(--space-3) var(--space-2);
    }

    .btn-offer {
        padding: 8px 10px;
        font-size: var(--font-xs);
    }

    .quick-filters {
        margin: 0 calc(-1 * var(--space-3));
        padding: 0 var(--space-3) var(--space-2);
        scroll-snap-type: x mandatory;
    }

    .filter-chip {
        scroll-snap-align: start;
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        font-size: var(--font-xs);
    }

    .toast-new {
        left: var(--space-3);
        right: var(--space-3);
        transform: translateX(0) translateY(-100px);
    }

    .toast-new.show {
        transform: translateX(0) translateY(0);
    }

    .card-img > img {
        object-fit: cover;
    }

    .card-discount {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Coupon page mobile */
    .coupon-page-hero {
        flex-direction: column;
        text-align: center;
    }

    .coupon-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .coupon-card {
        padding: var(--space-2) var(--space-3);
        gap: var(--space-1);
    }

    .coupon-card-header {
        gap: var(--space-1);
    }

    .coupon-card-icon {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    .coupon-card-title {
        font-size: 0.6rem;
    }

    .coupon-card-valor {
        font-size: 0.75rem;
    }

    .coupon-card-desc {
        font-size: 0.55rem;
    }

    .coupon-card-minimo {
        font-size: 0.6rem;
    }

    .coupon-card-tag {
        font-size: 0.55rem;
    }

    .coupon-card-footer {
        padding-top: var(--space-1);
        flex-direction: column;
        gap: var(--space-1);
        align-items: stretch;
    }

    .coupon-card-conditions {
        font-size: 0.55rem;
        text-align: center;
    }

    .coupon-btn {
        padding: 6px 10px;
        font-size: 0.6rem;
        width: 100%;
        text-align: center;
    }
}

/* ── Copy Popup Overlay ── */
.copy-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}
.copy-popup {
    background: var(--card, #1a1a2e);
    border: 1px solid var(--border, #2a2a4a);
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: popIn 0.3s ease;
}
.copy-popup-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 1rem;
    background: #fff;
    padding: 8px;
}
.copy-popup-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #22C55E;
    margin-bottom: 0.6rem;
}
.copy-popup-code {
    background: rgba(255,255,255,0.08);
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-family: monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1.5px;
    margin: 0.6rem auto 1rem;
    display: inline-block;
}
.copy-popup-msg {
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 1.2rem;
}
.copy-popup-msg strong {
    color: rgba(255,255,255,0.85);
}
.copy-popup-loader {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 0.8rem;
}
.copy-popup-loader-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #22C55E, #FFE600);
    border-radius: 3px;
    animation: loaderShrink 5s linear forwards;
    transform-origin: left;
}
.copy-popup-timer {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    margin: 0;
}
@keyframes loaderShrink {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}
@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ═══════════ Banner Dia do Consumidor ═══════════ */

.cd-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-8);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}

.cd-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.cd-banner::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.cd-left {
    position: relative;
    z-index: 1;
    flex: 1;
}

.cd-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.cd-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.cd-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
}

.cd-whatsapp-btn,
.cd-whatsapp-btn:link,
.cd-whatsapp-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}

.cd-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,211,102,0.4);
    color: #fff;
}

.cd-right {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cd-timer-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cd-timer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cd-time-block {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 60px;
    text-align: center;
}

.cd-time-block span {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.cd-time-block small {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cd-separator {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
}

/* Botao Telegram */
.cd-telegram-btn,
.cd-telegram-btn:link,
.cd-telegram-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2AABEE;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(42,171,238,0.3);
}

.cd-telegram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42,171,238,0.4);
    color: #fff;
}

.cd-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cd-banner {
        flex-direction: column;
        padding: 14px 16px;
        gap: 12px;
        border-radius: var(--radius-lg);
        margin-bottom: var(--space-4);
    }
    .cd-badge {
        font-size: 10px;
        padding: 3px 8px;
        margin-bottom: 4px;
    }
    .cd-title {
        font-size: 18px;
        margin-bottom: 2px;
    }
    .cd-desc {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .cd-buttons {
        flex-direction: column;
        gap: 8px;
    }
    .cd-whatsapp-btn,
    .cd-telegram-btn {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 10px 16px;
        border-radius: 10px;
    }
    .cd-right {
        width: 100%;
    }
    .cd-timer-label {
        font-size: 10px;
        margin-bottom: 6px;
    }
    .cd-timer {
        justify-content: center;
        gap: 4px;
    }
    .cd-time-block {
        padding: 6px 10px;
        min-width: 48px;
        border-radius: 8px;
    }
    .cd-time-block span {
        font-size: 20px;
    }
    .cd-time-block small {
        font-size: 8px;
        margin-top: 2px;
    }
    .cd-separator {
        font-size: 18px;
    }
}

