/*
Theme Name: Camper New
Theme URI: https://camperconner.com
Author: Camper Conner
Author URI: 
Description: A mobile-first custom WordPress theme exclusively crafted for Camper Conner.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: camperconner
*/

:root {
    --color-primary: #173d2d; /* Dark green */
    --color-secondary: #e85d24; /* Orange */
    --color-background: #ffffff;
    --color-text: #657069;
    --color-text-dark: #202923;
    --color-light-bg: #f6f2e9;
    --color-badge-bg: #e8f2e8;
    --color-badge-text: #24613d;
    --color-border: #e2e8f0;
    --font-heading: 'DM Sans', sans-serif;
    --font-body: 'Arimo', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-secondary);
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Buttons */
.btn-primary,
.search-submit,
.coupon-link-btn {
    display: inline-block;
    background-color: var(--color-secondary);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover,
.search-submit:hover,
.coupon-link-btn:hover {
    background-color: #d14a1a;
    color: #fff;
}
.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: center;
}

/* Header */
.site-header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.site-title {
    font-size: 22px;
    margin: 0;
}
.main-navigation {
    display: none;
    width: 100%;
    margin-top: 15px;
}
.main-navigation.toggled {
    display: block;
}
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-navigation li {
    margin-bottom: 10px;
}
.main-navigation a {
    font-weight: 700;
}
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
}
@media (min-width: 768px) {
    .menu-toggle { display: none; }
    .main-navigation {
        display: block;
        width: auto;
        margin-top: 0;
    }
    .main-navigation ul {
        display: flex;
        gap: 20px;
    }
    .main-navigation li { margin: 0; }
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 80px 0;
    background-size: cover;
    background-position: center;
    text-align: center;
    color: #fff;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(23, 61, 45, 0.6);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}
.hero-eyebrow {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 50px;
}
.hero-title {
    color: #fff;
    font-size: 36px;
    margin-bottom: 15px;
}
.hero-description {
    font-size: 14px;
    margin-bottom: 30px;
}
.hero-search-bar .search-form {
    width: 100%;
    max-width: 800px;
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 6px;
    width: 100%;
}
.search-input-wrapper .search-field {
    flex: 1;
    border: none;
    padding: 15px 15px 15px 45px;
    background: transparent;
    outline: none;
    font-family: var(--font-body);
    font-size: 16px;
}
.search-input-wrapper .search-icon {
    position: absolute;
    left: 20px;
    color: var(--color-text);
}
.search-input-wrapper .search-submit {
    flex-shrink: 0;
    margin-left: 10px;
}
@media (min-width: 768px) {
    .hero-title { font-size: 52px; }
    .hero-description { font-size: 18px; }
}

/* Sections General */
section {
    padding: 60px 0;
}
.section-kicker {
    display: block;
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.text-center { text-align: center; }

/* Categories Section */
.categories-section { background-color: var(--color-light-bg); }
.categories-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    margin-top: 30px;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.categories-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
@media (min-width: 768px) {
    .categories-grid {
        flex-wrap: wrap;
        overflow-x: visible;
        justify-content: center;
        padding-bottom: 0;
        gap: 15px;
    }
}
.category-pill {
    background: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--color-border);
    white-space: nowrap;
    color: var(--color-text);
    transition: all 0.3s ease;
    text-decoration: none;
}
.category-pill:hover,
.category-pill:focus,
.category-pill.active-pill {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    text-decoration: none;
}

/* Deals Grid */
.deals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}
@media (min-width: 768px) {
    .deals-grid { grid-template-columns: repeat(3, 1fr); }
}
.deal-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.deal-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.deal-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Journal Grid */
.journal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}
@media (min-width: 768px) {
    .journal-grid { grid-template-columns: repeat(3, 1fr); }
}
.journal-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.journal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.journal-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 0;
    border-radius: 0;
}
.journal-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.journal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.journal-tag {
    display: inline-block;
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
}

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 60px 0;
}
.site-footer a { color: #fff; }
.footer-brand { margin-bottom: 30px; }
.footer-title { color: #fff; }
.footer-description { color: #c7d8ce; }
.footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}
.footer-disclosure {
    color: #8fac9c;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
}

/* Lazy Block Shopname */
.store-profile-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}
.store-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}
.store-profile-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.store-profile-kicker {
    display: block;
    color: #f5bd71;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.store-profile-rating {
    color: #a9421d;
    font-weight: 700;
}
.store-profile-coupons {
    background: var(--color-light-bg);
    padding: 30px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.coupon-badge {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.store-profile-coupon-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.coupon-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.coupon-copy-btn {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
}
.guide-steps, .faq-content {
    margin-top: 15px;
}

/* Horizontal Scrolling */
.horizontal-scroll-wrapper {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}
.horizontal-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.horizontal-scroll {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
}
.horizontal-scroll > * {
    flex: 0 0 70%;
    scroll-snap-align: center;
}
@media (min-width: 768px) {
    .horizontal-scroll-wrapper {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        overflow-x: visible;
    }
    .horizontal-scroll {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        padding-bottom: 0;
    }
    .horizontal-scroll > * {
        flex: auto;
        scroll-snap-align: none;
    }
}

/* Text Truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Deal Card Specifics */
.deal-card {
    position: relative;
    display: flex;
    flex-direction: column;
}
.deal-image {
    position: relative;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.deal-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-primary);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    z-index: 2;
}
.verified-badge {
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
}
.deal-meta-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 15px;
}
.deal-discount-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}
.deal-rating {
    color: #a9421d;
    font-size: 14px;
    font-weight: 700;
}
.deal-title {
    margin-bottom: 10px;
}
.deal-excerpt {
    margin-bottom: 20px;
    flex-grow: 1;
}
.deal-content .btn-primary {
    width: 100%;
    margin-top: auto;
    font-size: 16px;
    padding: 14px 20px;
}
/* Footer specific styles */
.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
@media (min-width: 768px) {
    .footer-columns {
        grid-template-columns: 2fr 1fr 1fr;
    }
}
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #000;
    color: #fff;
    border-radius: 50px;
    font-size: 12px;
    text-decoration: none;
}
.footer-heading {
    color: #fff;
    margin-bottom: 15px;
}
.links-col ul {
    list-style: none;
    padding: 0;
}
.links-col li {
    margin-bottom: 10px;
}
.links-col a {
    color: #fff;
    text-decoration: none;
}
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 14px;
}

/* Header Adjustments */
.header-action {
    display: none;
}
@media (min-width: 768px) {
    .header-action {
        display: block;
    }
    .header-container {
        flex-wrap: nowrap;
    }
    .main-navigation ul {
        justify-content: center;
    }
}



/* Section Headers Flex */
.section-header-flex {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}
@media (min-width: 768px) {
    .section-header-flex {
        flex-direction: row;
        align-items: flex-end;
    }
}

/* Static Banner */
.home-banner {
    background: var(--color-primary);
    color: #fff;
    padding: 40px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    align-items: flex-start;
}
@media (min-width: 768px) {
    .home-banner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .home-banner-content {
        max-width: 60%;
    }
}
.btn-primary, .btn-outline {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.banner-kicker {
    display: block;
    color: #f5bd71;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.banner-title {
    color: #fff;
    font-size: 28px;
}
.banner-desc {
    color: #c7d8ce;
}

/* Deals Archive Page Specifics */
.deals-page-container {
    background-color: var(--color-light-bg);
}
.active-pill {
    background: var(--color-badge-text) !important;
    color: #fff !important;
    border-color: var(--color-badge-text) !important;
}
.archive-deal-card {
    border-left: 6px solid var(--color-primary);
    background: #fff;
    border-radius: 12px;
}
.deal-card-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.archive-deal-image-wrapper {
    position: relative;
    margin-bottom: 20px;
}
.archive-deal-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
}
.archive-deal-badge {
    position: absolute;
    bottom: -10px;
    left: 10px;
    background: var(--color-badge-text);
    color: #fff;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}
.archive-deal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.archive-deal-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}
.verified-today {
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}
.archive-deal-verified {
    margin-bottom: 15px;
}
.archive-deal-content .btn-primary {
    margin-top: auto;
    width: 100%;
}
.deals-archive-grid {
    margin-top: 0;
}
.deals-search-input-wrapper {
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
@media (min-width: 768px) {
    .deals-search-input-wrapper {
        flex-direction: row;
        border-radius: 50px;
        padding: 8px 8px 8px 20px;
        align-items: center;
    }
    .deals-search-input-wrapper > div {
        flex: 1;
    }
    .deals-search-input-wrapper .search-submit {
        width: auto !important;
        flex-shrink: 0;
    }
}



/* WordPress Gutenberg and Entry Content Typography */
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
    color: var(--color-title, var(--color-primary));
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}
.entry-content p {
    margin-bottom: 1.5em;
}
.entry-content ul, .entry-content ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}
.entry-content ul li, .entry-content ol li {
    margin-bottom: 0.5em;
}
.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 20px;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: var(--color-text);
}
.entry-content pre, .entry-content code {
    background: var(--color-light-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}
.entry-content pre {
    padding: 15px;
    overflow-x: auto;
    margin-bottom: 1.5em;
}
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.entry-content figure {
    margin: 0 0 1.5em;
}
.entry-content figcaption {
    font-size: 14px;
    color: var(--color-text);
    text-align: center;
    margin-top: 10px;
}

/* Pagination Styles */
.pagination {
    margin: 40px auto;
    width: 100%;
    display: flex;
    justify-content: center;
}
.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
.nav-links .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}
.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.nav-links .dots {
    background: transparent;
    border: none;
    padding: 8px;
    color: var(--color-text);
}
add_filter( 'rank_math/frontend/robots', function( $robots ) {
    // Đổi 'ads-only' thành slug category của bạn
    if ( is_single() && has_category( 'ads-only' ) ) {
        $robots['index'] = 'noindex';
        $robots['follow'] = 'nofollow'; // Có thể đổi thành 'follow' nếu muốn Google quét các link bên trong
    }
    return $robots;
});
