/*
Theme Name: Light Catalogue
Theme URI: https://example.com/
Author: Your Name
Description: A responsive light WooCommerce-ready catalogue theme inspired by a strong supplement-store layout. Includes backend-editable hero banner, WordPress menus, search, cart icon, footer columns, and ad areas.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: light-catalogue
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-logo, custom-menu, featured-images, e-commerce, blog, translation-ready
*/

:root {
    --lc-white: #ffffff;
    --lc-bg: #f7f8f5;
    --lc-bg-soft: #f1f4ee;
    --lc-text: #111713;
    --lc-muted: #667168;
    --lc-border: #e2e8df;
    --lc-accent: #baf200;
    --lc-accent-dark: #7ea800;
    --lc-dark: #101511;
    --lc-card: #ffffff;
    --lc-shadow: 0 14px 35px rgba(20, 31, 22, .08);
    --lc-width: 1440px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--lc-text);
    background: var(--lc-white);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed !important;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: #fff;
    color: #111;
    z-index: 999999;
    box-shadow: var(--lc-shadow);
}

/* =========================================================
   HEADER
========================================================= */

.site-header {
    background: var(--lc-white);
    border-top: 5px solid var(--lc-accent);
    position: sticky;
    top: 0;
    z-index: 999;
}

.admin-bar .site-header {
    top: 32px;
}

.header-main {
    border-bottom: 1px solid var(--lc-border);
}

.header-main-inner {
    width: min(var(--lc-width), calc(100% - 40px));
    min-height: 74px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) minmax(260px, 760px) auto;
    gap: 28px;
    align-items: center;
}

.menu-trigger {
    width: 44px;
    height: 44px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--lc-text);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.menu-trigger-lines {
    width: 25px;
    display: grid;
    gap: 5px;
}

.menu-trigger-lines span {
    display: block;
    width: 25px;
    height: 2px;
    background: currentColor;
    border-radius: 20px;
    transition: transform .2s ease, opacity .2s ease;
}

.menu-trigger.is-active .menu-trigger-lines span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-trigger.is-active .menu-trigger-lines span:nth-child(2) {
    opacity: 0;
}

.menu-trigger.is-active .menu-trigger-lines span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-branding {
    min-width: 0;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.custom-logo {
    display: block;
    width: auto;
    max-width: 190px;
    max-height: 52px;
}

.site-title {
    margin: 0;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.6px;
    text-transform: uppercase;
}

.site-title a {
    color: var(--lc-text);
}

.header-search {
    width: 100%;
}

.header-product-search {
    position: relative;
    width: 100%;
    margin: 0;
}

.header-product-search .header-search-field {
    width: 100%;
    height: 46px;
    padding: 0 54px 0 16px;
    color: var(--lc-text);
    background: #ffffff;
    border: 1px solid #d9e0d6;
    border-radius: 5px;
    outline: none;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.header-product-search .header-search-field::placeholder {
    color: #667168;
    opacity: 1;
}

.header-product-search .header-search-field:focus {
    border-color: #a7c94a;
    box-shadow: 0 0 0 3px rgba(186, 242, 0, .14);
}

.header-product-search .header-search-button {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: #172019;
    background: transparent;
    border: 0;
    border-radius: 4px;
    box-shadow: none;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.header-product-search .header-search-button:hover,
.header-product-search .header-search-button:focus {
    color: #6f9300;
    background: #f3f8e9;
    outline: none;
}

.header-product-search .header-search-icon {
    display: block;
    width: 21px;
    height: 21px;
}

.header-cart {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cart-link {
    position: relative;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    color: #172019;
    background: #ffffff;
    border: 1px solid #d9e0d6;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(20, 31, 22, .04);
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.cart-link svg {
    display: block;
    width: 24px;
    height: 24px;
}

.cart-link:hover,
.cart-link:focus {
    color: #6f9300;
    background: #f7faef;
    border-color: #cfd9c6;
    box-shadow: 0 5px 14px rgba(20, 31, 22, .07);
    transform: translateY(-1px);
    outline: none;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111713;
    background: var(--lc-accent);
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
}

/* Secondary navigation */
.header-nav {
    background: #fbfcfa;
    border-bottom: 1px solid var(--lc-border);
}

.header-nav-inner {
    width: min(var(--lc-width), calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.primary-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-menu > li {
    position: relative;
    border-right: 1px solid var(--lc-border);
}

.primary-menu > li:first-child {
    border-left: 1px solid var(--lc-border);
}

.primary-menu > li > a {
    position: relative;
    min-height: 50px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #151b16;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    transition: color .2s ease, background .2s ease;
}

.primary-menu > li > a::before {
    content: "◇";
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lc-accent-dark);
    background: #f0f6df;
    border: 1px solid #dce8b8;
    border-radius: 50%;
    font-size: 12px;
}

.primary-menu > li > a::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: -1px;
    height: 3px;
    background: var(--lc-accent);
    transform: scaleX(0);
    transition: transform .2s ease;
}

.primary-menu > li:hover > a,
.primary-menu > li.current-menu-item > a {
    color: var(--lc-accent-dark);
    background: #fff;
}

.primary-menu > li:hover > a::after,
.primary-menu > li.current-menu-item > a::after {
    transform: scaleX(1);
}

.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 9px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--lc-border);
    box-shadow: var(--lc-shadow);
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
    display: block;
}

.primary-menu .sub-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--lc-text);
    font-size: 13px;
    font-weight: 700;
}

.primary-menu .sub-menu a:hover {
    background: var(--lc-bg-soft);
    color: var(--lc-accent-dark);
}

.mobile-navigation {
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--lc-border);
}

.mobile-navigation.is-open {
    display: block;
}

.mobile-menu {
    width: min(var(--lc-width), calc(100% - 28px));
    margin: 0 auto;
    padding: 10px 0 16px;
    list-style: none;
}

.mobile-menu li {
    border-bottom: 1px solid var(--lc-border);
}

.mobile-menu a {
    display: block;
    padding: 12px 2px;
    font-weight: 750;
}

.mobile-menu .sub-menu {
    margin: 0;
    padding: 0 0 8px 20px;
    list-style: none;
}

/* =========================================================
   HERO / BANNER
========================================================= */

.home-hero {
    background: var(--lc-bg);
    border-bottom: 1px solid var(--lc-border);
}

.hero-inner {
    min-height: 575px;
    display: grid;
    grid-template-columns: 46% 54%;
    width: min(100%, 1920px);
    margin: 0 auto;
}

.hero-copy-wrap {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 70px 64px 70px 30px;
    background:
        radial-gradient(circle at 10% 10%, rgba(186,242,0,.16), transparent 24%),
        linear-gradient(135deg, #ffffff 0%, #f6f8f2 100%);
}

.hero-copy {
    width: min(650px, 100%);
}

.hero-eyebrow {
    margin: 0 0 12px;
    color: #6e9200;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    max-width: 650px;
    color: #101511;
    font-size: clamp(58px, 6vw, 92px);
    line-height: .88;
    letter-spacing: -4px;
    text-transform: uppercase;
    font-weight: 950;
}

.hero-title .accent {
    color: var(--lc-accent-dark);
}

.hero-description {
    max-width: 590px;
    margin: 24px 0 0;
    color: #445047;
    font-size: 17px;
    line-height: 1.55;
}

.hero-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    margin-top: 34px;
    padding: 0 28px;
    color: #0d120e;
    background: var(--lc-accent);
    border: 2px solid var(--lc-accent);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .2px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.hero-button:hover {
    background: #c8fa27;
    box-shadow: 0 10px 24px rgba(126,168,0,.18);
    transform: translateY(-2px);
}

.hero-media {
    position: relative;
    min-height: 575px;
    overflow: hidden;
    background: #eef1eb;
}

.hero-media.has-image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 90px;
    background: linear-gradient(90deg, rgba(247,248,245,.95), rgba(247,248,245,0));
    pointer-events: none;
}

.hero-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    text-align: center;
    color: var(--lc-muted);
}

.hero-placeholder strong {
    display: block;
    color: var(--lc-text);
    font-size: 22px;
    margin-bottom: 6px;
}

/* =========================================================
   ADS
========================================================= */

.ad-zone {
    width: min(var(--lc-width), calc(100% - 40px));
    margin: 18px auto;
    text-align: center;
}

.ad-zone .widget {
    margin: 0;
}

.ad-zone img,
.ad-zone iframe,
.ad-zone ins {
    max-width: 100%;
}

/* =========================================================
   CONTENT
========================================================= */

.site-main {
    min-height: 55vh;
}

.content-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
}

.content-narrow {
    width: min(820px, 100%);
    margin: 0 auto;
}

.entry-title,
.page-title {
    margin: 0 0 20px;
    color: var(--lc-text);
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -2px;
}

.entry-content {
    color: #3f4942;
    font-size: 17px;
}

.entry-content h2,
.entry-content h3 {
    color: var(--lc-text);
    line-height: 1.2;
}

.entry-content h2 {
    margin-top: 42px;
    font-size: clamp(28px, 4vw, 42px);
}

.entry-content h3 {
    margin-top: 30px;
    font-size: 27px;
}

.featured-image {
    overflow: hidden;
    margin-bottom: 32px;
    border-radius: 10px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 25px;
}

.post-card {
    overflow: hidden;
    background: var(--lc-card);
    border: 1px solid var(--lc-border);
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(20,31,22,.05);
}

.post-card-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--lc-bg-soft);
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-content {
    padding: 22px;
}

.post-card-title {
    margin: 8px 0 10px;
    font-size: 22px;
    line-height: 1.25;
}

.entry-meta {
    color: var(--lc-muted);
    font-size: 13px;
}

.post-card-excerpt {
    color: var(--lc-muted);
    font-size: 15px;
}

.empty-state {
    padding: 40px;
    text-align: center;
    background: var(--lc-bg);
    border: 1px solid var(--lc-border);
}

.pagination {
    margin-top: 42px;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-numbers {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lc-border);
    background: #fff;
}

.page-numbers.current {
    background: var(--lc-accent);
    border-color: var(--lc-accent);
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    margin-top: 0;
    background: #f5f7f3;
    border-top: 1px solid var(--lc-border);
}

.footer-main {
    width: min(var(--lc-width), calc(100% - 40px));
    margin: 0 auto;
    padding: 68px 0 54px;
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(160px, 1fr));
    gap: 70px;
}

.footer-brand {
    max-width: 440px;
}

.footer-brand .custom-logo {
    max-width: 210px;
    max-height: 65px;
}

.footer-site-title {
    margin: 0 0 18px;
    font-size: 27px;
    font-weight: 900;
    text-transform: uppercase;
}

.footer-description {
    margin: 22px 0 0;
    color: #526057;
    line-height: 1.6;
}

.footer-column-title {
    margin: 0 0 18px;
    color: #111713;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}

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

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #425047;
    transition: color .2s ease;
}

.footer-menu a:hover {
    color: var(--lc-accent-dark);
}

.footer-bottom {
    width: min(var(--lc-width), calc(100% - 40px));
    margin: 0 auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    border-top: 1px solid #dce2d9;
    color: #5d6a61;
    font-size: 13px;
}

.footer-bottom p {
    margin: 0;
}

.footer-trust {
    text-align: right;
}

/* Search fallback */
.search-form {
    position: relative;
    display: flex;
}

.search-form label {
    width: 100%;
}

.search-form input[type="search"] {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 14px;
    border: 1px solid #d9e0d6;
    background: #fbfcfa;
}

.search-form button {
    position: absolute;
    right: 4px;
    top: 4px;
    height: 36px;
    padding: 0 14px;
    border: 0;
    background: var(--lc-accent);
    color: #111;
    font-weight: 800;
    cursor: pointer;
}

/* WooCommerce basics */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    background: #fff;
    border: 1px solid var(--lc-border);
    padding: 14px;
    border-radius: 8px;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background: var(--lc-accent);
    color: #101511;
    border-radius: 3px;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: #c8fa27;
    color: #101511;
}

/* Responsive */
@media (max-width: 1050px) {
    .header-main-inner {
        grid-template-columns: auto minmax(150px, .7fr) minmax(220px, 1fr) auto;
        gap: 16px;
    }

    .primary-menu > li > a {
        padding: 0 16px;
    }

    .hero-inner {
        grid-template-columns: 50% 50%;
    }

    .hero-copy-wrap {
        padding-right: 35px;
    }

    .footer-main {
        gap: 35px;
    }
}

@media (max-width: 900px) {
    .menu-trigger {
        display: inline-flex;
    }

    .header-main-inner {
        grid-template-columns: auto minmax(120px,1fr) auto;
        min-height: 68px;
    }

    .header-search {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-bottom: 12px;
    }

    .header-nav {
        display: none;
    }

    .custom-logo {
        max-width: 160px;
        max-height: 46px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-copy-wrap {
        padding: 55px 25px;
        justify-content: center;
    }

    .hero-copy {
        width: min(720px,100%);
    }

    .hero-title {
        font-size: clamp(48px, 10vw, 76px);
    }

    .hero-media {
        min-height: 430px;
    }

    .hero-media::after {
        inset: 0 0 auto 0;
        width: 100%;
        height: 60px;
        background: linear-gradient(180deg, rgba(247,248,245,.95), rgba(247,248,245,0));
    }

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

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

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

@media (max-width: 620px) {
    .header-main-inner,
    .header-nav-inner,
    .content-wrap,
    .ad-zone,
    .footer-main,
    .footer-bottom {
        width: calc(100% - 28px);
    }

    .header-main-inner {
        gap: 10px;
    }

    .custom-logo {
        max-width: 135px;
    }

    .hero-copy-wrap {
        padding: 46px 18px;
    }

    .hero-eyebrow {
        font-size: 12px;
    }

    .hero-title {
        letter-spacing: -2.3px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-media {
        min-height: 320px;
    }

    .posts-grid,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-main {
        padding: 45px 0 34px;
        gap: 28px;
    }

    .footer-bottom {
        padding: 20px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .footer-trust {
        text-align: left;
    }
}


@media (max-width: 620px) {
    .header-product-search .header-search-field {
        height: 44px;
        padding-right: 50px;
        font-size: 14px;
    }

    .header-product-search .header-search-button {
        width: 36px;
        height: 36px;
    }

    .cart-link {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .cart-link svg {
        width: 22px;
        height: 22px;
    }
}
