/*
Theme Name: Cupones Pro (Affiliate Edition)
Theme URI: https://couponsactiv.com
Author: Javier Pérez
Description: Modern, lightweight, and high-converting coupon & deals CMS built for affiliate networks (Awin, CJ, Rakuten, ShareASale).
Version: 2.1.0
Requires PHP: 8.0
Text Domain: cupones-pro
*/

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --success: #10b981;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
}

.affiliate-disclosure-bar {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.affiliate-disclosure-bar a {
    color: #334155;
    text-decoration: underline;
}

.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.main-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}
.main-nav a:hover {
    color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.hero-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3.5rem 1.5rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2.5rem;
}
.hero-banner h1 { margin: 0 0 0.5rem 0; font-size: 2.2rem; }
.hero-banner p { margin: 0; font-size: 1.1rem; opacity: 0.9; }

/* Stores Section Styles */
.stores-section {
    margin-bottom: 3rem;
}

.stores-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stores-header h2 {
    font-size: 1.4rem;
    margin: 0;
    color: var(--text-main);
}

.stores-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.view-all-stores-link {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}
.view-all-stores-link:hover {
    text-decoration: underline;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.store-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.store-chip:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.store-chip-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.store-chip-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Directory A-Z */
.directory-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.letter-nav-item {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
}
.letter-nav-item:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.letter-group {
    margin-bottom: 2.5rem;
}
.letter-title {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Coupons Grid */
.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.coupon-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.coupon-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
}
.badge-code { background: #dbeafe; color: #1e40af; }
.badge-deal { background: #fef3c7; color: #92400e; }

.store-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-title {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}
.coupon-title a { color: var(--text-main); text-decoration: none; }
.coupon-title a:hover { color: var(--primary); }

.coupon-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.coupon-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    text-align: center;
    background: var(--primary);
    color: #fff !important;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
}
.coupon-btn:hover {
    background: var(--primary-dark);
}
.coupon-btn.copied {
    background-color: var(--success) !important;
    color: #ffffff !important;
}

.coupon-footer-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legal-page {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2.5rem;
    max-width: 850px;
    margin: 0 auto;
}
.legal-page h1 { margin-top: 0; }
.legal-page h2 { margin-top: 1.5rem; font-size: 1.3rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3rem; }

.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 1rem 2rem 1rem;
    margin-top: 4rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h4 { margin-top: 0; margin-bottom: 1rem; font-size: 1rem; color: var(--text-main); }
.footer-col p { font-size: 0.875rem; color: var(--text-muted); margin: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}