/* =============================================================================
   Victron4Less — Main Stylesheet
   =============================================================================
   This file provides all non-critical CSS. Critical above-the-fold styles
   (reset, body, header, nav, trust bar) are inlined in header.php.

   Colour Palette:
   - Primary:  #1a2332 (dark navy/charcoal)
   - Accent:   #318CE7 (blue)
   - All values reference CSS custom properties from :root in header.php.

   Organisation:
   1.  Buttons
   2.  Cards (product cards)
   3.  Price Components
   4.  Product Detail Page
   5.  Category / Listing Page
   6.  Homepage
   7.  Comparison Page
   8.  Tools / Calculator Pages
   9.  Guide / Article Pages
   10. Breadcrumbs
   11. Search Page
   12. Pagination
   13. Newsletter / Footer
   14. Error Pages
   15. Utility Classes
   16. Animations
   17. Responsive Breakpoints
   18. Print Styles
   ========================================================================== */


/* =============================================================================
   1. BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Accent (primary CTA) */
.btn-accent {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
}

.btn-accent:hover,
.btn-accent:focus-visible {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: var(--color-text-inverse);
}

/* Outline */
.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border-dark);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

/* Success */
.btn-success {
    background: var(--color-success);
    color: var(--color-text-inverse);
    border-color: var(--color-success);
}

.btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: var(--color-text-inverse);
}

/* Size variants */
.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
}

/* Icon-only button */
.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-md);
    line-height: 1;
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}


/* =============================================================================
   2. CARDS (Product Cards)
   ========================================================================== */

.product-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: var(--color-text);
    text-decoration: none;
}

.product-card__link:hover {
    color: var(--color-text);
}

.product-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-md);
}

.product-card__image .price-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    z-index: 1;
}

.product-card__details {
    padding: var(--space-md) var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-top: auto;
    padding-top: var(--space-sm);
}

.product-card__retailers {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

/* Savings badge for best deals */
.product-card__savings {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-success);
    margin-top: var(--space-xs);
}

.product-card__rrp {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 2px;
    text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   List / Spreadsheet View
   When .product-list replaces .product-grid the container becomes a table-
   like layout: each product is a single row with columns for image, name,
   price and retailer count.
   -------------------------------------------------------------------------- */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Column header row (inserted by JS) */
.product-list-header {
    display: none;
}

/* Reset card to a flat row */
.product-list .product-card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--color-border);
    flex-direction: row;
}

.product-list .product-card:last-child {
    border-bottom: none;
}

.product-list .product-card:hover {
    transform: none;
    background: var(--color-bg);
}

.product-list .product-card__link {
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 0;
}

/* Thumbnail — small square */
.product-list .product-card__image {
    width: 56px;
    min-width: 56px;
    height: 56px;
    aspect-ratio: auto;
    overflow: hidden;
    background: var(--color-bg-white);
    border-radius: 0;
    margin: var(--space-sm) var(--space-md);
    flex-shrink: 0;
}

.product-list .product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* Hide the floating price badge in list view */
.product-list .product-card__image .price-badge {
    display: none;
}

/* Details become a row of inline items */
.product-list .product-card__details {
    flex: 1;
    flex-direction: row;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-lg);
    min-width: 0;
}

/* Product name takes most space */
.product-list .product-card__name {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0;
    -webkit-line-clamp: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Price column */
.product-list .product-card__price {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    margin-top: 0;
    padding-top: 0;
    min-width: 80px;
    text-align: right;
}

/* Retailers column */
.product-list .product-card__retailers {
    font-size: 0.8rem;
    white-space: nowrap;
    margin-top: 0;
    min-width: 80px;
    text-align: right;
    color: var(--color-text-light);
}

/* Savings / RRP in list view */
.product-list .product-card__savings {
    font-size: 0.8rem;
    white-space: nowrap;
    margin-top: 0;
    min-width: 70px;
    text-align: right;
}

.product-list .product-card__rrp {
    font-size: 0.8rem;
    white-space: nowrap;
    margin-top: 0;
    text-align: right;
}

/* Alternating row stripes */
.product-list .product-card:nth-child(even) {
    background: var(--color-bg);
}

.product-list .product-card:nth-child(even):hover {
    background: var(--color-accent-light);
}

.product-list .product-card:nth-child(odd):hover {
    background: var(--color-accent-light);
}

/* Mobile: stack name above price/retailers */
@media (max-width: 639px) {
    .product-list .product-card__details {
        flex-wrap: wrap;
        gap: 0 var(--space-md);
    }

    .product-list .product-card__name {
        flex-basis: 100%;
        margin-bottom: var(--space-xs);
    }

    .product-list .product-card__price,
    .product-list .product-card__retailers {
        text-align: left;
        min-width: auto;
    }
}


/* =============================================================================
   3. PRICE COMPONENTS
   ========================================================================== */

/* Inline price badge */
.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.price-badge.price-drop {
    background: var(--color-success);
    color: var(--color-text-inverse);
}

.price-badge.price-drop::before {
    content: "\2193";
    font-weight: 700;
}

.price-badge.price-up {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.price-badge.price-up::before {
    content: "\2191";
    font-weight: 700;
}

/* Price comparison table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.price-table th {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: 0.875rem var(--space-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.price-table td {
    padding: 0.875rem var(--space-md);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    font-size: 0.9rem;
}

.price-table tbody tr:last-child td {
    border-bottom: none;
}

.price-table tbody tr:hover {
    background: var(--color-accent-light);
}

.price-table .retailer-logo {
    width: 80px;
    height: auto;
    object-fit: contain;
}

.price-table .buy-btn {
    white-space: nowrap;
}

/* Availability indicator */
.price-table .availability {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.price-table .availability::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.price-table .availability.in-stock {
    color: var(--color-success);
}

.price-table .availability.in-stock::before {
    background: var(--color-success);
}

.price-table .availability.out-of-stock {
    color: var(--color-danger);
}

.price-table .availability.out-of-stock::before {
    background: var(--color-danger);
}

.price-note {
    display: block;
    font-size: 0.72rem;
    color: var(--color-accent);
    margin-top: 0.25rem;
    line-height: 1.3;
}

.price-note::before {
    content: "\1F3F7\FE0F  ";
}


/* =============================================================================
   4. PRODUCT DETAIL PAGE
   ========================================================================== */

.product-hero {
    display: flex;
    gap: var(--space-2xl);
    padding: var(--space-2xl) 0;
}

.product-gallery {
    flex: 0 0 45%;
    max-width: 45%;
}

.product-gallery .gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
}

.product-gallery .gallery-main img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: var(--space-lg);
}

.product-gallery .gallery-thumbs {
    display: flex;
    gap: var(--space-sm);
}

.product-gallery .gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.product-gallery .gallery-thumb:hover,
.product-gallery .gallery-thumb.active {
    border-color: var(--color-accent);
}

.product-gallery .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-info h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: var(--space-sm);
}

.product-info .product-sku,
.product-info .product-version {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    display: block;
}

/* Price summary */
.product-price-summary {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.price-from {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-accent);
    display: inline;
}

.price-rrp {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.price-rrp-saving {
    font-weight: 600;
    color: var(--color-success);
    margin-left: var(--space-sm);
}

.price-retailers {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.price-unavailable {
    font-size: 1.1rem;
    color: var(--color-text-light);
    font-style: italic;
}

.price-context {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: var(--space-sm);
    line-height: 1.5;
}

.product-short-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

/* Quick specs grid */
.product-quick-specs {
    margin-bottom: var(--space-lg);
}

.product-quick-specs dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0 var(--space-2xl);
}

.quick-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    gap: var(--space-sm);
}

.quick-spec-item dt {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.quick-spec-item dd {
    color: var(--color-text-light);
    text-align: right;
}

/* Spec table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
}

.spec-table tr:nth-child(even) {
    background: var(--color-bg);
}

.spec-table th,
.spec-table td {
    padding: 0.75rem var(--space-md);
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border);
}

.spec-table th {
    font-weight: 600;
    color: var(--color-text);
    width: 40%;
    white-space: nowrap;
}

.spec-table td {
    color: var(--color-text-light);
}

/* Product downloads */
.product-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
}

.product-downloads .btn {
    font-size: 0.85rem;
}

.product-downloads .btn svg {
    width: 1rem;
    height: 1rem;
}

/* Product description prose */
.product-description {
    line-height: 1.75;
    color: var(--color-text);
    margin: var(--space-lg) 0;
}

.product-description p {
    margin-bottom: var(--space-md);
}

.product-description h2,
.product-description h3 {
    font-weight: 700;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.product-description h2 {
    font-size: 1.35rem;
}

.product-description h3 {
    font-size: 1.1rem;
}

.product-description ul,
.product-description ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.product-description li {
    margin-bottom: var(--space-xs);
}

/* Application guide & tool links on product pages */
.product-application ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg) 0;
}

.product-application li {
    position: relative;
    padding: var(--space-sm) 0 var(--space-sm) 1.75rem;
    line-height: 1.6;
    color: var(--color-text);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--color-border);
}

.product-application li:last-child {
    border-bottom: none;
}

.product-application li::before {
    content: "\2714";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

.product-tools h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

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

.tool-link-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.tool-link-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.tool-link-card strong {
    color: var(--color-accent);
    font-size: 0.95rem;
}

.tool-link-card span {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.4;
}

/* Price history chart */
.price-history-chart {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    margin: var(--space-xl) 0;
}

.price-history-chart h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

/* Related products */
.related-products {
    padding: var(--space-2xl) 0;
}

.related-products h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.related-products .product-grid {
    /* inherits grid from category listing */
}


/* =============================================================================
   5. CATEGORY / LISTING PAGE
   ========================================================================== */

/* Category header banner */
.category-header {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-2xl) 0;
    margin-bottom: 0;
}

.category-header h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.category-header p {
    color: rgba(255, 255, 255, 0.75);
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.6;
}

.category-header .category-desc {
    margin-bottom: var(--space-sm);
}

.category-header .category-count {
    display: inline-block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

/* Listing layout — sidebar + main content */
.listing-layout {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

.listing-main {
    flex: 1;
    min-width: 0;
}

/* Listing controls bar */
.listing-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.listing-sort {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
}

.listing-sort select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    background: var(--color-bg-white);
    cursor: pointer;
}

.listing-controls .sort-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
}

.listing-controls .sort-dropdown select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    background: var(--color-bg-white);
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: var(--space-xs);
}

.view-btn {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--color-border-dark);
    background: var(--color-bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text-light);
    transition: all var(--transition-fast);
}

.view-btn.active,
.view-btn:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.listing-controls .view-toggles {
    display: flex;
    gap: var(--space-xs);
}

.listing-controls .view-toggles button {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--color-border-dark);
    background: var(--color-bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text-light);
    transition: all var(--transition-fast);
}

.listing-controls .view-toggles button.active,
.listing-controls .view-toggles button:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

/* Filter toggle button — hidden on desktop, visible on mobile */
.filter-toggle {
    display: none;
}

.listing-controls .filter-toggle-btn {
    display: none;
}

/* Category page layout wrapper (legacy class) */
.category-layout {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

.category-layout .category-content {
    flex: 1;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Filter Sidebar
   -------------------------------------------------------------------------- */
.filter-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 0;
    border: 1px solid var(--color-border);
    position: sticky;
    top: 6rem;
    overflow: hidden;
    z-index: 1;
}

/* Filter header bar */
.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.filter-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
    margin: 0;
}

.filter-close {
    display: none;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.filter-close:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* Filter groups */
.filter-group {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-group h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-group h4::after {
    content: "\25BE";
    font-size: 0.75rem;
    color: var(--color-text-light);
    transition: transform var(--transition-fast);
}

.filter-group.collapsed h4::after {
    transform: rotate(-90deg);
}

.filter-group.collapsed .filter-options,
.filter-group.collapsed .price-range-form {
    display: none;
}

/* Filter option links */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-options li {
    margin: 0;
}

.filter-options a {
    display: block;
    padding: 0.4rem 0.625rem;
    font-size: 0.85rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.filter-options a:hover {
    background: var(--color-bg);
    color: var(--color-accent);
}

.filter-options a.active {
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--color-text);
    cursor: pointer;
}

.filter-group input[type="checkbox"] {
    accent-color: var(--color-accent);
    width: 1rem;
    height: 1rem;
}

/* Price range filter */
.price-range-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.price-range-inputs {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.price-range-inputs input {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    background: var(--color-bg-white);
    transition: border-color var(--transition-fast);
}

.price-range-inputs input:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 140, 231, 0.12);
}

.price-range-inputs span {
    color: var(--color-text-light);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.price-range-form .btn {
    width: 100%;
}

/* Clear filters */
.filter-clear {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-decoration: none;
    margin-top: var(--space-xs);
    transition: color var(--transition-fast);
}

.filter-clear:hover {
    color: var(--color-accent);
}

.filter-clear-all {
    width: 100%;
    text-align: center;
}

/* No results state */
.no-results {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--color-text-light);
}

.no-results h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.no-results p {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.no-results a {
    color: var(--color-accent);
    font-weight: 600;
}


/* =============================================================================
   6. HOMEPAGE
   ========================================================================== */

/* Hero section */
.hero {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-3xl) 0 calc(var(--space-3xl) + 0.5rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    opacity: 0.9;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.025em;
}

.hero .hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 52ch;
    margin: 0 auto var(--space-2xl);
    line-height: 1.6;
}

.hero p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 50ch;
    margin: 0 auto var(--space-xl);
    line-height: 1.6;
}

.hero .hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search-group {
    display: flex;
    align-items: center;
    background: var(--color-bg-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
}

.hero-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--color-text-light);
    pointer-events: none;
    flex-shrink: 0;
}

.hero .hero-search input {
    flex: 1;
    padding: 1.1rem 1.25rem 1.1rem 3.25rem;
    border: none;
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
    min-width: 0;
    background: transparent;
    color: var(--color-text);
}

.hero .hero-search input::placeholder {
    color: var(--color-text-light);
}

.hero .hero-search button {
    padding: 1.1rem 2rem;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.hero .hero-search button:hover {
    background: var(--color-accent-hover);
}

.hero-popular-searches {
    margin-top: var(--space-lg);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.hero-popular-searches a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.hero-popular-searches a:hover {
    color: #ffffff;
}

/* Generic section */
.section {
    padding: var(--space-2xl) 0;
}

.section-alt {
    background: var(--color-bg);
}

/* Force 4-col grid for product grids */
.product-grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .product-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 768px) {
    .product-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .product-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 3-col grid for listing pages (sidebar present) */
.product-grid-3 {
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
    .product-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .product-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.section-title + .section-subtitle {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    font-size: 1rem;
}

/* Category showcase */
.category-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.category-showcase .category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    color: var(--color-text);
}

.category-showcase .category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
}

.category-showcase .category-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--space-sm);
}

.category-showcase .category-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
}

.category-showcase .category-card .card-count {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

/* Price drops section */
.price-drops-section {
    background: var(--color-bg);
}

.price-drops-section .product-grid {
    /* inherits grid */
}

/* Stats bar */
.stats-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    text-align: center;
}

.stats-bar .stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.stats-bar .stat-item strong {
    color: var(--color-text);
    font-weight: 700;
}

.stats-bar .stat-divider {
    width: 1px;
    height: 1.25rem;
    background: var(--color-border);
}


/* =============================================================================
   7. COMPARISON PAGE
   ========================================================================== */

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.compare-header {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
}

.compare-header img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    margin: 0 auto var(--space-sm);
}

.compare-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.compare-table td,
.compare-table th {
    padding: 0.75rem var(--space-md);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    text-align: center;
}

.compare-table th {
    text-align: left;
    font-weight: 600;
    background: var(--color-bg);
    white-space: nowrap;
}

.compare-row:nth-child(even) td,
.compare-row:nth-child(even) th {
    background: var(--color-bg);
}

.compare-highlight {
    background: var(--color-accent-light) !important;
    font-weight: 600;
}

.compare-winner {
    background: var(--color-success-light) !important;
    color: var(--color-success);
    font-weight: 700;
}


/* =============================================================================
   8. TOOLS / CALCULATOR PAGES
   ========================================================================== */

.tool-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
}

.calculator-form {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.calculator-form h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-bg-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(49, 140, 231, 0.12);
}

.form-group input::placeholder {
    color: var(--color-text-light);
}

.form-group .form-hint {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

/* Calculator results */
.calculator-results {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.calculator-results h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.result-item .result-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.result-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Result status indicators */
.result-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.result-status.pass {
    background: var(--color-success-light);
    color: var(--color-success);
}

.result-status.warning {
    background: #fffbeb;
    color: var(--color-warning);
}

.result-status.fail {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.result-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}


/* =============================================================================
   9. GUIDE / ARTICLE PAGES
   ========================================================================== */

.article-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    max-width: 100%;
}

.article-header {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

.article-header h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: var(--space-sm);
}

.article-header .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.article-header .article-meta span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Article prose typography */
.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--color-text);
}

.article-content p {
    margin-bottom: var(--space-lg);
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.article-content ul,
.article-content ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.article-content li {
    margin-bottom: var(--space-sm);
}

.article-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    background: var(--color-accent-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text);
}

.article-content code {
    font-family: var(--font-mono);
    background: var(--color-bg);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.article-content pre {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--space-lg) 0;
    line-height: 1.6;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-content img {
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem var(--space-md);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    font-size: 0.95rem;
}

.article-content table th {
    font-weight: 600;
    background: var(--color-bg);
}

/* Table of contents sidebar */
.table-of-contents {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.table-of-contents h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.table-of-contents ol {
    list-style: none;
    padding: 0;
    counter-reset: toc-counter;
}

.table-of-contents li {
    counter-increment: toc-counter;
    margin-bottom: var(--space-sm);
}

.table-of-contents li a {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    padding: var(--space-xs) 0;
    border-left: 2px solid transparent;
    padding-left: var(--space-md);
    transition: all var(--transition-fast);
}

.table-of-contents li a:hover,
.table-of-contents li a.active {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
}

/* Author card */
.author-card {
    display: flex;
    gap: var(--space-md);
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    margin: var(--space-xl) 0;
}

.author-card .author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-card .author-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.author-card .author-info p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}


/* =============================================================================
   10. BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
    padding: var(--space-md) var(--container-padding);
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    gap: 0;
    padding: 0;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
}

.breadcrumbs li + li::before {
    content: "\203A";
    display: inline-block;
    margin: 0 var(--space-sm);
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1;
}

.breadcrumbs a {
    color: var(--color-text-light);
    transition: color var(--transition-fast);
}

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

.breadcrumbs .current {
    color: var(--color-text);
    font-weight: 500;
}


/* =============================================================================
   11. SEARCH PAGE
   ========================================================================== */

.search-hero {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-2xl) 0;
    text-align: center;
}

.search-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.search-hero .hero-search {
    max-width: 560px;
    margin: 0 auto;
}

.search-hero .hero-search form {
    display: flex;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.search-hero .hero-search input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
    min-width: 0;
}

.search-hero .hero-search button {
    padding: 0.875rem 1.5rem;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-hero .hero-search button:hover {
    background: var(--color-accent-hover);
}

/* Search results */
.search-results {
    padding: var(--space-xl) 0;
}

.search-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

.search-meta strong {
    color: var(--color-text);
}

.search-result-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
    transition: box-shadow var(--transition-fast);
}

.search-result-item:hover {
    box-shadow: var(--shadow-md);
}

.search-result-item .result-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
}

.search-result-item .result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-sm);
}

.search-result-item .result-content {
    flex: 1;
    min-width: 0;
}

.search-result-item .result-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.search-result-item .result-content h3 a {
    color: var(--color-text);
}

.search-result-item .result-content h3 a:hover {
    color: var(--color-accent);
}

.search-result-item .result-content p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.search-result-item .result-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent);
    white-space: nowrap;
    align-self: center;
}

/* Search input group (used in 404 and search pages) */
.search-input-group {
    display: flex;
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.search-input-group input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
    min-width: 0;
}

.search-input-group .btn {
    border-radius: 0;
}


/* =============================================================================
   12. PAGINATION
   ========================================================================== */

.pagination {
    padding: var(--space-xl) 0;
}

.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
}

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

.pagination .current {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
    font-weight: 600;
}

.pagination .disabled {
    color: var(--color-text-light);
    opacity: 0.5;
    pointer-events: none;
}

.pagination .ellipsis {
    border: none;
    background: none;
    color: var(--color-text-light);
}


/* =============================================================================
   13. NEWSLETTER / FOOTER
   ========================================================================== */

/* Newsletter / Price Alert section */
.footer-newsletter {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-2xl) 0;
}

.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
}

.newsletter-text h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.newsletter-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
}

.newsletter-form {
    flex-shrink: 0;
    width: 100%;
    max-width: 440px;
}

/* Joined input + button pill */
.newsletter-input-group {
    display: flex;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--color-bg-white);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.newsletter-input-group input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    outline: none;
    min-width: 0;
    background: transparent;
    color: var(--color-text);
}

.newsletter-input-group input::placeholder {
    color: var(--color-text-light);
}

.newsletter-input-group .btn {
    border-radius: 0;
    flex-shrink: 0;
    padding: 0.875rem 1.5rem;
    border: none;
    font-size: 0.9rem;
}

.newsletter-privacy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: var(--space-sm);
}

/* Mobile: stack text above form */
@media (max-width: 639px) {
    .newsletter-inner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }

    .newsletter-form {
        max-width: 100%;
    }
}

/* Footer main links */
.footer-main {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-2xl) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.footer-col h4 {
    color: var(--color-text-inverse);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-text-inverse);
}

/* Footer logo */
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-inverse);
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: var(--space-md);
}

.footer-logo:hover {
    color: var(--color-text-inverse);
}

.footer-about {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
    max-width: 40ch;
    margin-bottom: var(--space-md);
}

.footer-author {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

.footer-author strong {
    color: rgba(255, 255, 255, 0.7);
}

/* Footer bottom */
.footer-bottom {
    background: #080d14;
    padding: var(--space-lg) 0;
}

.footer-bottom-inner {
    text-align: center;
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.footer-disclaimer strong {
    color: rgba(255, 255, 255, 0.8);
}

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.6;
    max-width: 80ch;
    margin: 0 auto var(--space-sm);
}

.footer-update {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
}


/* =============================================================================
   14. ERROR PAGES
   ========================================================================== */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: var(--space-2xl) 0;
}

.error-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
    letter-spacing: -0.04em;
}

.error-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: var(--space-md) 0 var(--space-sm);
}

.error-content > p {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.error-search {
    max-width: 440px;
    margin: 0 auto var(--space-2xl);
}

.error-links {
    margin: var(--space-xl) 0;
}

.error-links h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.error-link-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.error-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.error-link-card:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.error-link-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.error-home {
    margin-top: var(--space-xl);
}


/* =============================================================================
   15. UTILITY CLASSES
   ========================================================================== */

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* Text sizes */
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.15rem; }

/* Text colours */
.text-muted   { color: var(--color-text-light); }
.text-accent  { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

/* Font weight */
.fw-bold     { font-weight: 700; }
.fw-semibold { font-weight: 600; }

/* Spacing helpers: 1 = sm, 2 = md, 3 = lg */
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Display helpers */
.hidden { display: none; }

.visible-mobile  { display: none; }
.visible-desktop { display: block; }


/* =============================================================================
   16. ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base) ease both;
}

.animate-slide-up {
    animation: slideUp var(--transition-slow) ease both;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* =============================================================================
   17. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --- Small tablets and up (480px) --- */
@media (min-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .error-code {
        font-size: 8rem;
    }
}

/* --- Tablets (640px) --- */
@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .category-showcase {
        grid-template-columns: repeat(3, 1fr);
    }

    .newsletter-form {
        flex: 1;
        max-width: 440px;
    }

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

    .tool-layout {
        flex-direction: row;
    }

    .tool-layout .calculator-form {
        flex: 1;
    }

    .tool-layout .calculator-results {
        flex: 1;
    }

    .search-result-item .result-image {
        width: 120px;
        height: 120px;
    }
}

/* --- Tablets landscape (768px) --- */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-showcase {
        grid-template-columns: repeat(4, 1fr);
    }

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

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

    .article-layout {
        flex-direction: row;
        gap: var(--space-2xl);
    }

    .article-layout .article-main {
        flex: 1;
        max-width: 800px;
        min-width: 0;
    }

    .article-layout .article-sidebar {
        width: 240px;
        flex-shrink: 0;
    }

    .table-of-contents {
        position: sticky;
        top: 8rem;
    }

    /* Filter sidebar visible in desktop flow from 768px */
    .filter-toggle,
    .listing-controls .filter-toggle-btn {
        display: none;
    }

    .filter-close {
        display: none;
    }

    .listing-layout {
        flex-direction: row;
    }

    .filter-sidebar {
        display: block;
    }

    .category-header h1 {
        font-size: 2.25rem;
    }

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

    .visible-mobile { display: none !important; }
    .visible-desktop { display: block; }
}

/* --- Desktop (1024px) --- */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }

    .product-hero {
        gap: var(--space-3xl);
    }

    .category-header h1 {
        font-size: 2.5rem;
    }
}

/* --- Mobile-only styles (below 640px) --- */
@media (max-width: 639px) {
    .visible-mobile  { display: block !important; }
    .visible-desktop { display: none !important; }

    /* Stack product hero vertically */
    .product-hero {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .product-gallery {
        flex: none;
        max-width: 100%;
    }

    .product-info h1 {
        font-size: 1.35rem;
    }

    /* Price table responsive */
    .price-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Compare table scroll */
    .compare-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Article layout */
    .article-layout .article-sidebar {
        display: none;
    }

    /* Search result item stacks on very small screens */
    .search-result-item {
        flex-direction: column;
    }

    .search-result-item .result-image {
        width: 100%;
        height: 160px;
    }

    .search-result-item .result-price {
        align-self: flex-start;
    }

    /* Filter sidebar: slide-in overlay on mobile */
    .filter-toggle,
    .listing-controls .filter-toggle-btn {
        display: inline-flex;
    }

    .filter-close {
        display: flex;
    }

    .listing-layout {
        flex-direction: column;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 2000;
        border-radius: 0;
        border: none;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
        background: var(--color-bg-white);
    }

    .filter-sidebar.active {
        transform: translateX(0);
    }

    .filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        display: none;
    }

    .filter-overlay.active {
        display: block;
    }

    /* Hide sidebar from desktop flow */
    .category-layout {
        flex-direction: column;
    }

    .category-layout .filter-sidebar {
        width: 85%;
        max-width: 320px;
    }

    /* Hero search: stack on very small */
    .hero-search-group {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .hero-search-icon {
        display: none;
    }

    .hero .hero-search input {
        padding-left: 1.25rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .hero .hero-search button {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        padding: 0.875rem 2rem;
    }

    /* Error link grid: single column on small */
    .error-link-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Small mobile (below 380px) --- */
@media (max-width: 379px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .category-showcase {
        grid-template-columns: 1fr 1fr;
    }

    .error-link-grid {
        grid-template-columns: 1fr;
    }

    .pagination a,
    .pagination span {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }

    .error-code {
        font-size: 5rem;
    }
}


/* =============================================================================
   18. PRINT STYLES
   ========================================================================== */

@media print {
    /* Hide non-essential elements */
    .site-header,
    .trust-bar,
    .main-nav,
    .nav-toggle,
    .site-footer,
    .footer-newsletter,
    .footer-main,
    .footer-bottom,
    .breadcrumbs,
    .listing-controls,
    .filter-sidebar,
    .filter-overlay,
    .hero-search,
    .btn,
    .pagination,
    .newsletter-form,
    .skip-link,
    .table-of-contents {
        display: none !important;
    }

    /* Reset backgrounds and colours for ink saving */
    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    /* Show URLs after links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    /* Tables */
    .price-table,
    .spec-table,
    .compare-table {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .price-table th {
        background: #eee;
        color: #000;
    }

    /* Images */
    img {
        max-width: 100% !important;
    }

    /* Prevent page breaks inside key elements */
    .product-card,
    .search-result-item,
    .result-item,
    .error-content {
        break-inside: avoid;
    }
}

/* ============================================================
   Tools Page Styles
   ============================================================ */

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.tool-card-large {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-xl);
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border);
}

.tool-card-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
    color: var(--color-text);
}

.tool-card-icon-large {
    flex-shrink: 0;
}

.tool-card-content {
    flex: 1;
}

.tool-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.tool-card-desc {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.tool-card-features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tool-card-features li {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-full);
    color: var(--color-text-light);
}

.tools-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-base);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
    color: var(--color-text);
}

.tool-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.tool-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.tool-card p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

@media (min-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tool-card-large {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ============================================================
   Guide Page Styles
   ============================================================ */

.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: 1fr 280px;
    }
}

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

.article-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .article-sidebar {
        display: block;
    }
}

.article-header {
    margin-bottom: var(--space-2xl);
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
    font-size: 0.85rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.article-featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-date,
.article-reading-time {
    color: var(--color-text-light);
}

/* Guide type badges */
.guide-type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-blue { background: #EFF6FF; color: #2563EB; }
.badge-green { background: var(--color-success-light); color: #16A34A; }
.badge-orange { background: var(--color-accent-light); color: var(--color-accent); }
.badge-purple { background: #F5F3FF; color: #7C3AED; }
.badge-grey { background: var(--color-bg); color: var(--color-text-light); }

/* Prose typography for article content */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: var(--space-2xl) 0 var(--space-md);
    color: var(--color-primary);
    scroll-margin-top: 80px;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: var(--space-xl) 0 var(--space-sm);
    color: var(--color-primary);
    scroll-margin-top: 80px;
}

.prose p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.prose ul, .prose ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
}

.prose li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.prose blockquote {
    border-left: 4px solid var(--color-accent);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    background: var(--color-accent-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

.prose img {
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
}

.prose code {
    background: var(--color-bg);
    padding: 0.1em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    font-family: var(--font-mono);
}

.prose pre {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--space-lg) 0;
}

.prose pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
}

.prose th, .prose td {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    text-align: left;
}

.prose th {
    background: var(--color-bg);
    font-weight: 600;
}

/* Table of Contents */
.table-of-contents {
    position: sticky;
    top: 100px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.table-of-contents h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

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

.toc-item {
    margin-bottom: var(--space-xs);
}

.toc-item a {
    display: block;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--color-text-light);
    transition: color var(--transition-fast);
    border-left: 2px solid transparent;
    padding-left: var(--space-sm);
}

.toc-item a:hover {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
}

.toc-level-3 {
    padding-left: var(--space-md);
}

/* Sidebar product cards */
.sidebar-products {
    margin-bottom: var(--space-xl);
}

.sidebar-products h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.sidebar-product-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--transition-fast);
    margin-bottom: var(--space-xs);
}

.sidebar-product-card:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.sidebar-product-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.sidebar-product-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
}

.sidebar-product-price {
    display: block;
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* Sidebar promo */
.sidebar-promo {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.sidebar-promo h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.sidebar-promo ul {
    list-style: none;
    padding: 0;
}

.sidebar-promo li {
    margin-bottom: var(--space-xs);
}

.sidebar-promo a {
    font-size: 0.85rem;
    color: var(--color-accent);
}

/* Author card in articles */
.author-card {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    margin-top: var(--space-2xl);
    border: 1px solid var(--color-border);
}

.author-avatar {
    flex-shrink: 0;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--color-primary);
}

.author-bio {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Guides listing page */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.guide-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
}

.guide-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
}

.guide-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-bg);
}

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

.guide-card-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.guide-card-meta {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: 0.8rem;
}

.guide-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
    line-height: 1.3;
}

.guide-card-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    flex: 1;
}

/* Guide type filter tabs */
.guide-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.guide-filter-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--color-text-light);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.guide-filter-btn:hover,
.guide-filter-btn.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Article related products section */
.article-related-products {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.article-related-products h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

/* ============================================================
   About section (homepage)
   ============================================================ */

.about-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.about-section p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    font-size: 1.05rem;
}

/* ============================================================
   Stats Bar (homepage)
   ============================================================ */

.stats-bar {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-accent);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-top: var(--space-xs);
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

/* ============================================================
   Category Showcase (homepage)
   ============================================================ */

.category-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.category-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-base);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
    color: var(--color-text);
}

.category-card-image {
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.category-card-body {
    padding: var(--space-md);
}

.category-card-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.category-count {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* ============================================================
   Newsletter footer styles
   ============================================================ */

/* (Newsletter styles consolidated in section 13 above — no duplicates here) */

/* ============================================================
   Footer Main
   ============================================================ */

.footer-main {
    background: var(--color-primary-dark);
    padding: var(--space-2xl) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
}

.footer-about {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.footer-author {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    line-height: 1.5;
}

.footer-col h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    background: #080e18;
    padding: var(--space-lg) 0;
}

.footer-bottom-inner {
    text-align: center;
}

.footer-disclaimer {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin-bottom: var(--space-sm);
}

.footer-copyright {
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.footer-update {
    color: rgba(255,255,255,0.3);
    font-size: 0.7rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Section headers
   ============================================================ */

.section-header {
    margin-bottom: var(--space-xl);
}

.section-subtitle {
    color: var(--color-text-light);
    font-size: 1rem;
    margin-top: var(--space-sm);
}

/* ============================================================
   No results message
   ============================================================ */

.no-results, .no-prices {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-light);
}

.no-results h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.no-prices-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: left;
}

.no-prices-box h3 {
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-text);
    font-size: 1.1rem;
}

.no-prices-box p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.no-prices-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.no-prices-box li {
    padding: var(--space-xs) 0;
    color: var(--color-text);
}

.no-prices-box li::before {
    content: '→ ';
    color: var(--color-accent);
    font-weight: 600;
}

.no-prices-box a {
    color: var(--color-accent);
    text-decoration: none;
}

.no-prices-box a:hover {
    text-decoration: underline;
}

/* ============================================================
   Price context text
   ============================================================ */

.price-context {
    background: var(--color-success-light);
    border: 1px solid #bbf7d0;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    color: #166534;
    font-size: 0.95rem;
}

/* ============================================================
   Chart controls
   ============================================================ */

.chart-controls {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.chart-range {
    padding: 0.4rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg-white);
    color: var(--color-text-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chart-range:hover, .chart-range.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.price-history-chart {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
}

/* =============================================================================
   14. Floating Chat Widget
   ============================================================================= */

/* FAB button */
/* Toby FAB button */
.v4l-chat-fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 6px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(49, 140, 231, 0.4);
    transition: all 0.25s ease;
    font-family: inherit;
}
.v4l-chat-fab:hover {
    background: #2778d0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 140, 231, 0.5);
}
.v4l-fab-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
}
.v4l-fab-hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }

@media (max-width: 480px) {
    .v4l-chat-fab span { display: none; }
    .v4l-chat-fab { padding: 6px; border-radius: 50%; }
}

/* Chat panel */
.v4l-chat-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9995;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.25s ease;
}
.v4l-chat-panel.v4l-chat-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.v4l-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--color-accent);
    color: #fff;
}
.v4l-chat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}
.v4l-chat-header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
}
.v4l-chat-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.v4l-chat-expand {
    color: rgba(255,255,255,0.8);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    transition: color 0.15s;
}
.v4l-chat-expand:hover { color: #fff; }
.v4l-chat-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 22px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
.v4l-chat-close:hover { color: #fff; }

/* Messages area */
.v4l-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 280px;
    max-height: 340px;
}

.v4l-chat-welcome {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    padding: 8px;
    line-height: 1.6;
}
.v4l-chat-welcome-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.v4l-chat-welcome strong {
    color: #1e293b;
    font-size: 14px;
}

/* Bot message avatar row */
.v4l-chat-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    align-self: flex-start;
    max-width: 92%;
}
.v4l-chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
    margin-top: 2px;
}
.v4l-chat-row .v4l-chat-msg-assistant {
    max-width: 100%;
}

/* Messages */
.v4l-chat-msg {
    max-width: 88%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    word-wrap: break-word;
}
.v4l-chat-msg a { color: var(--color-accent); text-decoration: underline; }
.v4l-chat-msg strong { font-weight: 600; }
.v4l-chat-msg ul { margin: 4px 0; padding-left: 16px; }
.v4l-chat-msg li { margin-bottom: 2px; }

.v4l-chat-msg-user {
    align-self: flex-end;
    background: var(--color-accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.v4l-chat-msg-user a { color: #fff; }

.v4l-chat-msg-assistant {
    align-self: flex-start;
    background: #f1f5f9;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

/* Typing indicator with Toby avatar */
.v4l-chat-typing {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    align-self: flex-start;
}
.v4l-chat-typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 12px;
}
.v4l-chat-typing-dots span {
    width: 7px;
    height: 7px;
    background: #94a3b8;
    border-radius: 50%;
    animation: v4lBounce 1.4s ease-in-out infinite;
}
.v4l-chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.v4l-chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes v4lBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Quick reply buttons */
.v4l-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 0 2px 36px;
    align-self: flex-start;
}
.v4l-quick-reply {
    background: #fff;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: 16px;
    padding: 5px 12px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
}
.v4l-quick-reply:hover {
    background: var(--color-accent);
    color: #fff;
}

/* Input area */
.v4l-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}
.v4l-chat-input-area input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.15s;
}
.v4l-chat-input-area input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(49, 140, 231, 0.1);
    background: #fff;
}
.v4l-chat-input-area button {
    padding: 8px 12px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.v4l-chat-input-area button:hover { background: #2778d0; }
.v4l-chat-input-area button:disabled { background: #93c5fd; cursor: not-allowed; }

/* Mobile adjustments */
@media (max-width: 480px) {
    .v4l-chat-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
    }
    .v4l-chat-messages {
        max-height: 50vh;
    }
}

/* Price note under price in comparison table */
.price-note {
    display: block;
    font-size: 0.72rem;
    color: var(--color-accent);
    margin-top: 0.25rem;
    line-height: 1.3;
}
.price-note::before {
    content: "\1F3F7\FE0F  ";
}
