/*
Theme Name:        ThreeOaks Suppliers
Theme URI:         https://threeoakssuppliers.com
Author:            ThreeOaks Team
Author URI:        https://threeoakssuppliers.com
Description:       A modern, professional WooCommerce theme for ThreeOaks Suppliers — your trusted home and general supply store. Features a responsive layout, WooCommerce integration, Customizer options, and a clean olive-green and gold design.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       threeoaks
Tags:              woocommerce, e-commerce, online-store, responsive-layout, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, left-sidebar, right-sidebar, blog, threaded-comments
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
    /* Brand Colors */
    --color-primary: #3a6641;
    /* Olive Green */
    --color-primary-dark: #2d5233;
    --color-primary-light: #4e8a58;
    --color-secondary: #c8970a;
    /* Deep Gold */
    --color-secondary-dark: #a67c08;
    --color-accent: #e8c44a;
    /* Light Gold */

    /* Neutrals */
    --color-bg: #f9f7f4;
    --color-surface: #ffffff;
    --color-text: #2c2c2c;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* Typography */
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.65;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 96px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
    --shadow-card: 0 2px 12px rgba(58, 102, 65, 0.08);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Container */
    --container-max: 1280px;
    --container-wide: 1440px;

    /* Header */
    --header-height: 72px;
    --header-height-mobile: 60px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-xl);
}

.container--wide {
    width: 100%;
    max-width: var(--container-wide);
    margin-inline: auto;
    padding-inline: var(--space-xl);
}

.section-padding {
    padding-block: var(--space-3xl);
}

.section-padding--sm {
    padding-block: var(--space-2xl);
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header .section-title {
    margin-bottom: var(--space-sm);
}

.badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.btn--secondary:hover {
    background: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn--outline:hover {
    background: #fff;
    color: var(--color-primary);
}

.btn--ghost {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--ghost:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn--sm {
    padding: 8px 18px;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 16px 36px;
    font-size: 1.0625rem;
}

/* Grid utilities */
.grid {
    display: grid;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.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;
}

/* ============================================================
   WORDPRESS CORE
   ============================================================ */
.wp-block-image img {
    border-radius: var(--radius-md);
}

.alignleft {
    float: left;
    margin-right: var(--space-lg);
}

.alignright {
    float: right;
    margin-left: var(--space-lg);
}

.aligncenter {
    display: block;
    margin-inline: auto;
}

.alignfull {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
}

.alignwide {
    width: min(100%, 1100px);
    margin-inline: auto;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    top: -9999px;
    left: var(--space-lg);
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    z-index: 99999;
    font-weight: 600;
}

.skip-link:focus {
    top: var(--space-lg);
}

/* ============================================================
   STICKY HEADER OFFSET
   ============================================================ */
.site-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.admin-bar .site-header.is-sticky {
    top: 32px;
}

body.has-sticky-header {
    padding-top: var(--header-height);
}

@media (max-width: 782px) {
    .admin-bar .site-header.is-sticky {
        top: 46px;
    }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.site-main {
    min-height: 60vh;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: var(--space-xl);
    align-items: start;
}

.content-area--no-sidebar {
    grid-template-columns: 1fr;
}

.content-area--sidebar-left {
    grid-template-columns: 310px 1fr;
}

/* Entry content styles */
.entry-content {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.entry-content p {
    margin-bottom: var(--space-lg);
}

.entry-content ul,
.entry-content ol {
    list-style: revert;
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.entry-content blockquote {
    border-left: 4px solid var(--color-secondary);
    padding: var(--space-md) var(--space-xl);
    background: var(--color-border-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--space-xl) 0;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-xl);
}

.entry-content th,
.entry-content td {
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    text-align: left;
}

.entry-content th {
    background: var(--color-primary);
    color: #fff;
}

.entry-content tr:nth-child(even) td {
    background: var(--color-border-light);
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb-wrap {
    padding: var(--space-md) 0;
    background: var(--color-border-light);
    border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.breadcrumb-list a {
    color: var(--color-primary);
}

.breadcrumb-list a:hover {
    color: var(--color-primary-dark);
}

.breadcrumb-separator {
    color: var(--color-text-light);
}

/* ============================================================
   PAGE HERO BANNER (inner pages)
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: var(--space-2xl) 0;
    text-align: center;
    color: #fff;
}

.page-hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #fff;
    margin-bottom: var(--space-sm);
}

.page-hero__subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   BLOG / ARCHIVE
   ============================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.post-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.post-card__thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card__thumbnail img {
    transform: scale(1.05);
}

.post-card__body {
    padding: var(--space-lg);
}

.post-card__meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    display: flex;
    gap: var(--space-md);
}

.post-card__title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.post-card__title a {
    color: var(--color-text);
}

.post-card__title a:hover {
    color: var(--color-primary);
}

.post-card__excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
    flex-wrap: wrap;
}

.pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-header {
    margin-bottom: var(--space-xl);
}

.single-post-thumbnail {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
    aspect-ratio: 16/7;
}

.single-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.post-tags a {
    background: var(--color-border-light);
    color: var(--color-text-muted);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.post-tags a:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.site-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
}

.widget {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-card);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.widget ul li {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.9375rem;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--color-text-muted);
}

.widget ul li a:hover {
    color: var(--color-primary);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404-wrap {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.error-404-code {
    font-size: clamp(6rem, 15vw, 12rem);
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--color-primary);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: -2rem;
}

.error-404-wrap h1 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: var(--space-md);
}

/* ============================================================
   COMMENT STYLES
   ============================================================ */
.comments-area {
    margin-top: var(--space-2xl);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-border);
}

.comment-list {
    padding: 0;
}

.comment {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.comment-author {
    font-weight: 700;
    color: var(--color-text);
}

.comment-metadata {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.comment-content p {
    font-size: 0.9375rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition-fast);
    margin-bottom: var(--space-md);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(58, 102, 65, 0.12);
}

.comment-form .submit {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.comment-form .submit:hover {
    background: var(--color-primary-dark);
}

/* ============================================================
   FORMS (generic)
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(58, 102, 65, 0.12);
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .container {
        padding-inline: var(--space-lg);
    }

    .content-area {
        grid-template-columns: 1fr;
    }

    .content-area--sidebar-left {
        grid-template-columns: 1fr;
    }

    .site-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding-inline: var(--space-md);
    }

    .section-padding {
        padding-block: var(--space-2xl);
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
    }
}