/* ============================================
   Modern Outdoor Gear Website Styles
   ============================================ */

/* CSS Variables for easy theming */
:root {
    --primary-color: #1B8A4A;
    --primary-dark: #14693A;
    --primary-light: #34D278;
    --accent-color: #FF8C42;
    --accent-hover: #E67330;
    --primary-glow: rgba(27, 138, 74, 0.15);
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-light: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f0f7f2;
    --bg-dark: #1a1a1a;
    --border-color: #d4e8d9;
    --shadow-sm: 0 2px 8px rgba(27, 138, 74, 0.08);
    --shadow-md: 0 4px 12px rgba(27, 138, 74, 0.12);
    --shadow-lg: 0 10px 30px rgba(27, 138, 74, 0.18);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --spacing-unit: 1rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #0d7a3e 0%, #1B8A4A 40%, #14693A 100%);
    color: var(--text-light);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(13, 122, 62, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-single-line {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: -0.5px;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.logo-text {
    line-height: 1;
}

.logo a:hover {
    color: var(--accent-color);
}

.logo a:hover .logo-img {
    transform: translateY(-2px);
}

/* Category Navigation */
.category-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex: 1;
    overflow-x: auto;
}

.nav-item {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.nav-item:hover::before {
    left: 0;
}

.nav-item:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
}

/* Language Switcher Dropdown */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.language-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.language-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.25);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.current-language {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.language-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-switcher:hover .language-dropdown,
.language-toggle[aria-expanded="true"] + .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown li {
    margin: 0;
}

.language-dropdown a,
.language-dropdown span {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.language-dropdown a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.language-dropdown span.active {
    background: var(--primary-color);
    color: var(--text-light);
    font-weight: 600;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Homepage Styles */
.homepage {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero {
    text-align: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(160deg, #e8f5ec 0%, #f0f7f2 30%, #ffffff 70%, #e8f5ec 100%);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--primary-glow) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #14693A, #1B8A4A, #34D278);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Categories Section */
.categories {
    margin-bottom: 4rem;
}

.categories .category-nav {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.categories .nav-item {
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.categories .nav-item:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Category Grid (Homepage illustrated cards) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.category-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: var(--shadow-md);
}

.category-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 35px rgba(27, 138, 74, 0.25);
}

.category-card-bg {
    position: absolute;
    inset: 0;
    background-size: 100% 100%;
    background-position: center;
    transition: transform 0.5s ease;
}

.category-card:hover .category-card-bg {
    transform: scale(1.1);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    transition: background 0.4s ease;
}

.category-card:hover .category-card-overlay {
    background: linear-gradient(to top, rgba(27,138,74,0.8) 0%, rgba(27,138,74,0.2) 60%, transparent 100%);
}

.category-card-content {
    position: relative;
    z-index: 2;
    padding: 1.25rem;
    width: 100%;
}

.category-card-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin: 0;
}

.category-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    display: block;
}

/* Placeholder style for missing images (red indicator) */
.category-card--placeholder .category-card-bg {
    border: 3px dashed #e74c3c;
    border-radius: var(--border-radius);
}

.category-card--placeholder .placeholder-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    color: #e74c3c;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    background: rgba(255,255,255,0.9);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
}

/* Per-category placeholder gradients */
.category-card[data-category="water"] .category-card-bg {
    background-image: linear-gradient(135deg, #0ea5e9, #22d3ee, #2dd4bf);
}
.category-card[data-category="energy"] .category-card-bg {
    background-image: linear-gradient(135deg, #f59e0b, #f97316, #ef4444);
}
.category-card[data-category="communication"] .category-card-bg {
    background-image: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
}
.category-card[data-category="food"] .category-card-bg {
    background-image: linear-gradient(135deg, #84cc16, #a3e635, #d97706);
}
.category-card[data-category="health"] .category-card-bg {
    background-image: linear-gradient(135deg, #ef4444, #f472b6, #ec4899);
}
.category-card[data-category="security"] .category-card-bg {
    background-image: linear-gradient(135deg, #64748b, #475569, #6b7280);
}
.category-card[data-category="news"] .category-card-bg {
    background-image: linear-gradient(135deg, #8b5cf6, #a855f7, #d946ef);
}
.category-card[data-category="tips"] .category-card-bg {
    background-image: linear-gradient(135deg, #14b8a6, #34D278, #22d3ee);
}

/* Product Grid */
.recent-products {
    margin-top: 3rem;
}

.recent-products h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Product Card */
.product-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(27, 138, 74, 0.18);
    border-color: var(--primary-light);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.product-card-content {
    padding: 1.5rem;
}

.product-card h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-card a {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.product-card a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #1e3a21 50%, #1a1a1a 100%);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer .container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

footer p {
    margin: 0;
    opacity: 0.9;
}

footer p:first-child {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header nav {
        padding: 1rem;
    }

    .header-single-line {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .logo a {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 38px;
    }

    .header-right {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .category-nav {
        margin-top: 0.5rem;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-nav::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .category-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    .nav-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .language-dropdown {
        right: 0;
        left: auto;
    }

    .hero {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .categories .category-nav {
        padding: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-card-title {
        font-size: 1rem;
    }

    .category-card-icon {
        font-size: 1.2rem;
    }

    main {
        padding: 1rem 0;
    }

    .homepage {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .recent-products h2 {
        font-size: 1.5rem;
    }
}

/* Category/List Page Styles */
.category-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.category-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--category-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.category-intro {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    font-size: 1.1rem;
    line-height: 1.8;
    border-left: 4px solid var(--primary-color);
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

/* Product Card in List View */
article.product-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

article.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

article.product-card.image-right {
    grid-template-columns: 1fr 300px;
}

article.product-card.image-right .product-image {
    order: 2;
}

article.product-card.image-right .product-content {
    order: 1;
}

/* Full-width no-border card for specific pages */
article.product-card.full-width-no-border {
    grid-template-columns: 1fr;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0 -2rem;
    gap: 0;
    width: calc(100% + 4rem);
    max-width: none;
}

article.product-card.full-width-no-border:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

article.product-card.full-width-no-border .product-content {
    padding: 0;
}

article.product-card.full-width-no-border .product-content.full-content {
    max-width: 100%;
    width: 100%;
}

/* Energy section image positioning */
article.product-card.full-width-no-border.energy-article {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

article.product-card.full-width-no-border.energy-article.image-left {
    grid-template-columns: 300px 1fr;
}

article.product-card.full-width-no-border.energy-article.image-right {
    grid-template-columns: 1fr 300px;
}

article.product-card.full-width-no-border.energy-article.image-right .energy-image-side {
    order: 2;
}

article.product-card.full-width-no-border.energy-article.image-right .product-content {
    order: 1;
}

article.product-card.full-width-no-border.energy-article.image-center {
    grid-template-columns: 1fr;
}

.energy-image-side {
    width: 100%;
}

.energy-image-side img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: block;
    object-fit: cover;
}

.energy-image-center {
    text-align: center;
    margin: 2rem 0;
}

.energy-image-center img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: inline-block;
    margin: 0 auto;
}

.product-content.full-content.with-side-image {
    padding: 0;
}

/* Full markdown rendering */
/* Override the lighter gray color from .product-excerpt */
.product-excerpt.full-markdown {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Ensure all child elements inherit the correct color and size */
.product-excerpt.full-markdown p,
.product-excerpt.full-markdown div,
.product-excerpt.full-markdown span,
.product-excerpt.full-markdown li {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.product-excerpt.full-markdown p {
    margin-bottom: 1rem;
}

.product-excerpt.full-markdown p:last-child {
    margin-bottom: 0;
}

.product-excerpt.full-markdown h1,
.product-excerpt.full-markdown h2,
.product-excerpt.full-markdown h3,
.product-excerpt.full-markdown h4,
.product-excerpt.full-markdown h5,
.product-excerpt.full-markdown h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.product-excerpt.full-markdown h1:first-child,
.product-excerpt.full-markdown h2:first-child,
.product-excerpt.full-markdown h3:first-child {
    margin-top: 0;
}

.product-excerpt.full-markdown ul,
.product-excerpt.full-markdown ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.product-excerpt.full-markdown li {
    margin-bottom: 0.5rem;
}

.product-excerpt.full-markdown strong {
    font-weight: 600;
    color: var(--text-primary);
}

.product-excerpt.full-markdown em {
    font-style: italic;
}

.product-excerpt.full-markdown code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.product-excerpt.full-markdown pre {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1rem 0;
}

.product-excerpt.full-markdown pre code {
    background: transparent;
    padding: 0;
}

.product-excerpt.full-markdown blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-content h2 {
    margin-bottom: 0.5rem;
}

.product-content h2 a {
    color: var(--primary-color);
    transition: var(--transition);
}

.product-content h2 a:hover {
    color: var(--accent-color);
}

.product-brand {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.product-rating {
    margin-bottom: 1rem;
}

.product-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    display: block;
    min-height: 1em;
}

.product-excerpt p {
    margin-bottom: 1rem;
}

.product-excerpt p:last-child {
    margin-bottom: 0;
}

.product-excerpt em,
.product-excerpt i {
    font-style: italic;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.price-range {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.affiliate-btn {
    display: inline-block;
    background: linear-gradient(135deg, #FF8C42, #E67330);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.affiliate-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
    transition: transform 0.5s ease;
    transform: translateX(-100%);
}

.affiliate-btn:hover::after {
    transform: translateX(100%);
}

.affiliate-btn:hover {
    background: linear-gradient(135deg, #E67330, #d4621f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.35);
    color: var(--text-light);
}

.affiliate-btn.primary {
    background: linear-gradient(135deg, #1B8A4A, #14693A);
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
}

.affiliate-btn.primary:hover {
    background: linear-gradient(135deg, #14693A, #0d5a2e);
    box-shadow: 0 6px 20px rgba(27, 138, 74, 0.35);
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Single Product Page */
.product-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Editorial content (no affiliate sidebar) */
.editorial-content {
    max-width: 800px;
    margin: 2rem auto;
    line-height: 1.8;
}

.product-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.product-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.product-meta-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating span {
    font-weight: 600;
    color: var(--primary-color);
}

time {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.category-tag {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.product-hero-image {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.product-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-top: 2rem;
}

.product-content-wrapper.product-image-right {
    grid-template-columns: 1fr 300px;
    align-items: start;
}

.product-image-sidebar {
    position: sticky;
    top: 100px;
}

.product-image-sidebar img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: block;
}

.product-sidebar {
    position: relative;
}

.affiliate-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.affiliate-card.sticky {
    position: sticky;
    top: 100px;
}

.affiliate-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.affiliate-card .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.disclosure {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
}

.product-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.product-content p {
    margin-bottom: 1rem;
}

.product-content em,
.product-content i {
    font-style: italic;
    color: var(--text-primary);
}

.product-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.product-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tags strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.tag {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.tag:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Star Rating */
.star-rating {
    display: inline-flex;
    gap: 0.2rem;
    align-items: center;
}

.star {
    font-size: 1.2rem;
    line-height: 1;
}

.star-full {
    color: #ffc107;
}

.star-half {
    color: #ffc107;
    opacity: 0.6;
}

.star-empty {
    color: #e0e0e0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.pagination a {
    color: var(--primary-color);
    background: var(--bg-primary);
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.pagination span {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    font-weight: 600;
}

/* Responsive adjustments for product pages */
@media (max-width: 968px) {
    article.product-card,
    article.product-card.image-right {
        grid-template-columns: 1fr;
    }

    article.product-card.image-right .product-image,
    article.product-card.image-right .product-content {
        order: initial;
    }
    
    article.product-card.full-width-no-border {
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }
    
    /* Energy section responsive */
    article.product-card.full-width-no-border.energy-article.image-left,
    article.product-card.full-width-no-border.energy-article.image-right {
        grid-template-columns: 1fr;
    }
    
    article.product-card.full-width-no-border.energy-article.image-right .energy-image-side,
    article.product-card.full-width-no-border.energy-article.image-right .product-content {
        order: initial;
    }
    
    .energy-image-side {
        margin-bottom: 1.5rem;
    }

    .product-content-wrapper {
        grid-template-columns: 1fr;
    }

    .product-content-wrapper.product-image-right {
        grid-template-columns: 1fr;
    }

    .product-image-sidebar {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }

    .affiliate-card.sticky {
        position: relative;
        top: 0;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-unit); }
.mt-2 { margin-top: calc(var(--spacing-unit) * 2); }
.mt-3 { margin-top: calc(var(--spacing-unit) * 3); }
.mb-1 { margin-bottom: var(--spacing-unit); }
.mb-2 { margin-bottom: calc(var(--spacing-unit) * 2); }
.mb-3 { margin-bottom: calc(var(--spacing-unit) * 3); }

/* Homepage Three-Column Layout */
.homepage-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.homepage-main {
    min-width: 0;
}

/* News Sidebar */
.news-sidebar {
    position: sticky;
    top: 100px;
}

.news-sidebar-inner {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.news-sidebar-header {
    background: linear-gradient(135deg, #0d7a3e 0%, #1B8A4A 40%, #14693A 100%);
    padding: 1rem 1.25rem;
}

.news-sidebar-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.news-sidebar-content {
    padding: 1rem 1.25rem;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.news-item a {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: var(--transition);
}

.news-item a:hover {
    color: var(--primary-color);
}

.news-see-all {
    display: block;
    text-align: center;
    padding: 0.75rem 0 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.news-see-all:hover {
    color: var(--accent-color);
}

.news-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
    margin: 0;
}

/* News Single Page (full width) */
.news-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.news-single .product-header h1 {
    color: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 800;
    -webkit-text-fill-color: var(--text-primary);
}

.news-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.news-content p {
    margin-bottom: 1rem;
}

.news-content h2,
.news-content h3,
.news-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.news-content ul,
.news-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.news-content li {
    margin-bottom: 0.5rem;
}

.news-content strong {
    font-weight: 600;
}

/* Right Placeholder */
.homepage-right-placeholder {
    position: sticky;
    top: 100px;
    min-height: 300px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
}

.homepage-right-placeholder h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

/* Responsive: collapse sidebars on mobile */
@media (max-width: 768px) {
    .homepage-layout {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        position: relative;
        top: 0;
    }

    .homepage-right-placeholder {
        position: relative;
        top: 0;
        min-height: 200px;
    }
}
