/*
Theme Name: Coupong
Theme URI: https://coupong.com
Author: Coupong
Author URI: https://coupong.com
Description: A modern, fast WordPress coupon theme for affiliate marketers. Features include store pages, coupon cards with discount badges, AJAX filtering, popup code reveal, and fully responsive design. Built with Bootstrap and Font Awesome.
Version: 1.0.0
Text Domain: coupong
Tags: coupon, deals, vouchers, woocommerce, blog, custom-menu, featured-images, threaded-comments, translation-ready, right-sidebar, custom-background, e-commerce, theme-options, sticky-post, full-width-template
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --coupong-primary: #1f5191;
    --coupong-secondary: #2787E3;
    --coupong-success: #28a745;
    --coupong-danger: #dc3545;
    --coupong-warning: #ffc107;
    --coupong-info: #17a2b8;
    --coupong-light: #f8f9fa;
    --coupong-dark: #343a40;
    --coupong-white: #ffffff;
    --coupong-gray: #6c757d;
    --coupong-body-bg: #f5f5f5;
    --coupong-text-color: #333333;
    --coupong-border-radius: 12px;
    --coupong-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --coupong-transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--coupong-body-bg);
    color: var(--coupong-text-color);
    line-height: 1.6;
}

/* Coupong Store Page Styles */
.coupong-store-page {
    min-height: 100vh;
    background-color: var(--coupong-body-bg);
}

/* Store Header Section */
.coupong-store-header {
    background: linear-gradient(135deg, var(--coupong-primary) 0%, #2a6bb5 100%);
    padding: 40px 0;
    margin-bottom: 30px;
}

.coupong-store-logo-section {
    background: var(--coupong-white);
    border-radius: var(--coupong-border-radius);
    box-shadow: var(--coupong-box-shadow);
    padding: 30px;
    text-align: center;
}

.coupong-store-logo {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
}

.coupong-store-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--coupong-text-color);
    margin: 15px 0 10px;
}

.coupong-store-rating {
    color: #ffc107;
    font-size: 18px;
}

.coupong-store-rating .rating-count {
    color: #666;
    font-size: 14px;
    margin-left: 8px;
}

.coupong-visit-btn {
    background-color: var(--coupong-secondary);
    color: white;
    padding: 12px 35px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--coupong-transition);
    border: none;
    margin-top: 15px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.coupong-visit-btn:hover {
    background-color: #1a6cc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 103, 227, 0.3);
    color: white;
}

/* Filter Tabs */
.coupong-filter-tabs {
    background: var(--coupong-white);
    border-radius: var(--coupong-border-radius);
    box-shadow: var(--coupong-box-shadow);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.coupong-filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--coupong-primary);
    background: transparent;
    color: var(--coupong-primary);
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--coupong-transition);
}

.coupong-filter-btn:hover,
.coupong-filter-btn.active {
    background: var(--coupong-primary);
    color: white;
}

/* Coupon Card Design */
.coupong-coupon-card {
    background: var(--coupong-white);
    border-radius: var(--coupong-border-radius);
    box-shadow: var(--coupong-box-shadow);
    margin-bottom: 25px;
    overflow: hidden;
    transition: var(--coupong-transition);
}

.coupong-coupon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.coupong-coupon-left {
    background: linear-gradient(135deg, var(--coupong-primary) 0%, #2a6bb5 100%);
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.coupong-discount-badge {
    color: white;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
}

.coupong-discount-badge span {
    font-size: 16px;
    font-weight: 500;
    display: block;
    margin-top: 5px;
}

.coupong-coupon-right {
    padding: 25px;
    position: relative;
}

.coupong-coupon-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--coupong-text-color);
    margin-bottom: 10px;
}

.coupong-coupon-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.coupong-coupon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.coupong-expiry {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.coupong-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.coupong-badge-verified {
    background: #e8f5e9;
    color: #2e7d32;
}

.coupong-badge-exclusive {
    background: #fff3e0;
    color: #e65100;
}

.coupong-badge-featured {
    background: #e3f2fd;
    color: #1565c0;
}

.coupong-coupon-btn {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--coupong-transition);
}

.coupong-get-code-btn {
    background: var(--coupong-secondary);
    color: white;
}

.coupong-get-code-btn:hover {
    background: #1a6cc4;
    color: white;
    box-shadow: 0 5px 15px rgba(39, 103, 227, 0.3);
}

.coupong-get-deal-btn {
    background: var(--coupong-success);
    color: white;
}

.coupong-get-deal-btn:hover {
    background: #218838;
    color: white;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Expired Section */
.coupong-expired-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px dashed #ddd;
}

.coupong-expired-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--coupong-text-color);
    margin-bottom: 25px;
    text-align: center;
}

.coupong-expired-card {
    opacity: 0.7;
}

.coupong-expired-card:hover {
    opacity: 0.9;
}

/* Pagination */
.coupong-pagination {
    margin-top: 40px;
    text-align: center;
}

.coupong-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 20px;
    background: var(--coupong-white);
    color: var(--coupong-primary);
    text-decoration: none;
    box-shadow: var(--coupong-box-shadow);
    transition: var(--coupong-transition);
}

.coupong-pagination .page-numbers:hover,
.coupong-pagination .page-numbers.current {
    background: var(--coupong-primary);
    color: white;
}

/* Modal Styles */
.coupong-code-modal .modal-content {
    border-radius: var(--coupong-border-radius);
    border: none;
}

.coupong-code-modal .modal-header {
    background: var(--coupong-primary);
    color: white;
    border-radius: var(--coupong-border-radius) var(--coupong-border-radius) 0 0;
}

.coupong-reveal-code {
    background: #f8f9fa;
    border: 2px dashed var(--coupong-primary);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--coupong-primary);
    cursor: pointer;
    transition: var(--coupong-transition);
}

.coupong-reveal-code:hover {
    background: #e3f2fd;
}

/* AJAX Loading */
.coupong-loading {
    text-align: center;
    padding: 40px;
}

.coupong-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--coupong-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: coupong-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes coupong-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .coupong-store-header {
        padding: 25px 0;
    }
    
    .coupong-store-title {
        font-size: 22px;
    }
    
    .coupong-discount-badge {
        font-size: 24px;
    }
    
    .coupong-coupon-right {
        padding-bottom: 80px;
    }
    
    .coupong-coupon-btn {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        margin-top: 15px;
    }
    
    .coupong-filter-btn {
        padding: 8px 18px;
        font-size: 14px;
        margin-bottom: 10px;
    }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
    position: relative;
    width: 100%;
    padding: 0 15px;
}

/* Grid System */
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

@media (min-width: 768px) {
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
}

@media (min-width: 992px) {
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
}

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Margin utilities */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

/* Padding utilities */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

/* Flex utilities */
.flex-wrap { flex-wrap: wrap; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.g-0 { gap: 0; }
.g-2 { gap: 0.5rem; }
.g-3 { gap: 1rem; }

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: var(--coupong-border-radius);
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-success {
    background-color: var(--coupong-success);
    color: white;
}

.badge-danger {
    background-color: var(--coupong-danger);
    color: white;
}

.badge-warning {
    background-color: var(--coupong-warning);
    color: #212529;
}

.badge-info {
    background-color: var(--coupong-info);
    color: white;
}

/* Button base styles */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: var(--coupong-transition);
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--coupong-primary);
    border-color: var(--coupong-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #164a80;
    border-color: #164a80;
}

.btn-secondary {
    background-color: var(--coupong-secondary);
    border-color: var(--coupong-secondary);
    color: white;
}

.btn-success {
    background-color: var(--coupong-success);
    border-color: var(--coupong-success);
    color: white;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--coupong-primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 81, 145, 0.25);
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box;
    padding: 0;
    margin-right: 0.5rem;
}

/* Image responsive */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-thumbnail {
    padding: 0.25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-circle {
    border-radius: 50%;
}

/* Card styles */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--coupong-border-radius);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* WP Admin Bar adjustment */
.admin-bar .coupong-store-header {
    margin-top: 32px;
}
