/*
Theme Name: Toller
Theme URI: https://danniharris.com
Author: Andrew
Description: A warm, handcrafted WooCommerce theme for the Danni Harris Toller Plush store. Fraunces + Plus Jakarta Sans, glassmorphism header, animated footer silhouettes, and Customizer-editable front page.
Version: 6.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: toller
*/

/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    --color-forest: #1B4D3E;
    --color-forest-dark: #133A2E;
    --color-rust: #D96C48;
    /* Decorative only (badges, stars, accents) */
    --color-rust-dark: #B4532F;
    /* Text & buttons: passes WCAG AA on white and cream */
    --color-cream: #F7F5EB;
    --color-sand: #E8E4D5;
    --color-charcoal: #2C2C2C;
    --color-gold: #F4D03F;
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius-pill: 50px;
    --radius-card: 24px;
    --shadow-soft: 0 10px 40px rgba(27, 77, 62, 0.08);
    --shadow-lift: 0 20px 50px rgba(27, 77, 62, 0.14);
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --container-width: 1400px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Fix: Sticky Footer Layout */
body {
    background-color: var(--color-cream);
    color: var(--color-charcoal);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    font-size: 18px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-optical-sizing: auto;
    color: var(--color-forest);
    margin-top: 0;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.01em;
}

a {
    color: var(--color-forest);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: var(--color-rust-dark);
}

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

/* Rounded corners only for content images (not logos, icons, payment badges) */
.entry-content img,
.entry-thumbnail img,
.post-card img {
    border-radius: 12px;
}

/* --- Accessibility helpers --- */
.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 !important;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link:focus {
    clip: auto !important;
    clip-path: none;
    width: auto;
    height: auto;
    margin: 0;
    top: 12px;
    left: 12px;
    z-index: 100000;
    padding: 12px 20px;
    background: #fff;
    color: var(--color-forest);
    font-weight: 700;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lift);
}

:focus-visible {
    outline: 3px solid var(--color-rust-dark);
    outline-offset: 3px;
    border-radius: 6px;
}

.hero-section :focus-visible,
.site-footer :focus-visible,
.announcement-bar :focus-visible {
    outline-color: var(--color-gold);
}

/* --- Scroll reveal (enabled only when JS runs) --- */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* =========================================
   2. HEADER (Glassmorphism)
   ========================================= */
.announcement-bar {
    background: var(--color-forest);
    color: var(--color-cream);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 9px 20px;
}

.announcement-bar p {
    margin: 0;
}

.site-header {
    position: sticky;
    top: 20px;
    z-index: 1000;
    margin: 20px auto 40px auto;
    width: 95%;
    max-width: var(--container-width);
}

/* Keep the sticky header clear of the WP admin bar */
.admin-bar .site-header {
    top: 52px;
}

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

@media screen and (max-width: 600px) {

    /* Admin bar scrolls away on small screens */
    .admin-bar .site-header {
        top: 20px;
    }
}

.header-inner {
    background: rgba(255, 255, 255, 0.9);
    /* Slightly transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-pill);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled .header-inner {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(27, 77, 62, 0.12);
}

/* --- DESKTOP ORDERING --- */
.site-branding {
    font-size: 1.6rem;
    margin: 0;
    order: 1;
    margin-right: auto;
}

.site-title {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: inherit;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

.custom-logo {
    max-height: 56px;
    width: auto;
}

.main-navigation {
    order: 2;
}

.header-cart {
    order: 3;
    margin-left: 30px;
}

/* --- Cart Icon Animation --- */
@keyframes cartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        color: var(--color-rust);
    }

    100% {
        transform: scale(1);
    }
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--color-forest);
    padding: 8px 16px 8px 12px;
    border-radius: var(--radius-pill);
}

.cart-link:hover {
    color: var(--color-forest);
    background: rgba(27, 77, 62, 0.07);
}

.cart-link__icon {
    position: relative;
    display: inline-flex;
}

.cart-link__count {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--color-rust-dark);
    color: #fff;
    font-size: 11px;
    line-height: 19px;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 0 0 2px #fff;
}

.cart-link__count.is-empty {
    display: none;
}

.cart-link.cart-updated .cart-link__icon {
    animation: cartPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Desktop Nav Styles */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    position: relative;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Mobile Menu Styles --- */
.menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    width: 30px;
    height: auto;
    z-index: 1002;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-forest);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* --- Hamburger Animation (Using .is-active class) --- */
/* Top Line: Move down and rotate 45 deg */
.menu-toggle.is-active .hamburger-line:nth-of-type(1) {
    transform: translateY(9px) rotate(45deg);
}

/* Middle Line: Fade out */
.menu-toggle.is-active .hamburger-line:nth-of-type(2) {
    opacity: 0;
}

/* Bottom Line: Move up and rotate -45 deg */
.menu-toggle.is-active .hamburger-line:nth-of-type(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (min-width: 901px) {

    /* Animated underline on desktop nav */
    .main-navigation a::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -6px;
        height: 2px;
        background: var(--color-rust);
        border-radius: 2px;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s var(--ease-out);
    }

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

@media (max-width: 900px) {
    .header-inner {
        padding: 12px 18px;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: flex !important;
        order: 1;
    }

    .site-branding {
        order: 2;
        flex-grow: 1;
        text-align: center;
        margin-right: 0;
        font-size: 1.35rem;
    }

    .header-cart {
        order: 3;
        z-index: 20;
        margin-left: 0;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        order: 4;
        margin-top: 15px;

        /* GLASSMORPHISM RESTORED */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.4);

        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 1001;
    }

    .main-navigation.toggled {
        display: block !important;
        animation: slideDown 0.3s ease forwards;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .main-navigation li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        display: block;
        padding: 15px;
        font-size: 1.1rem;
        color: var(--color-forest);
    }
}

@media (max-width: 600px) {

    /* Badge only on small screens */
    .cart-link__total {
        display: none;
    }

    .cart-link {
        padding: 8px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   3. BUTTONS, FORMS & NOTICES (global + WooCommerce)
   ========================================= */

/* Button Styling */
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wp-block-button__link {
    background: var(--color-forest) !important;
    color: #fff !important;
    border-radius: var(--radius-pill) !important;
    padding: 12px 24px !important;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.wp-block-button__link:hover {
    background: var(--color-rust-dark) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(180, 83, 47, 0.25);
}

/* Primary "alt" buttons (Proceed to checkout, Place order) */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background: var(--color-rust-dark) !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background: var(--color-forest) !important;
    box-shadow: 0 10px 20px rgba(27, 77, 62, 0.25);
}

.button:disabled,
.button.disabled,
.button[disabled],
.woocommerce button.button:disabled,
.woocommerce button.button:disabled[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Form fields */
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select,
.woocommerce .coupon .input-text,
.woocommerce .woocommerce-ordering select,
.search-form .search-field,
.select2-container--default .select2-selection--single {
    background: #fff;
    border: 1.5px solid rgba(27, 77, 62, 0.2);
    border-radius: 14px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-charcoal);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce form .form-row .input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce .coupon .input-text:focus,
.search-form .search-field:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--color-forest);
    box-shadow: 0 0 0 4px rgba(27, 77, 62, 0.12);
    outline: none;
}

.select2-container--default .select2-selection--single {
    height: auto;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.6 !important;
    padding: 0 !important;
    color: var(--color-charcoal);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 10px !important;
}

.woocommerce form .form-row label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-forest);
}

.woocommerce .coupon .input-text {
    min-width: 180px;
}

/* Notices (clean white alert with soft shadow, no green side border) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error,
.woocommerce-page .woocommerce-message,
.woocommerce-page .woocommerce-info,
.woocommerce-page .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
div.woocommerce-message,
div.woocommerce-info,
div.woocommerce-error {
    background: #fff !important;
    color: var(--color-charcoal) !important;
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
    padding: 18px 24px 18px 3.5em !important;
    margin-bottom: 35px !important;
}

.woocommerce-message::after,
.woocommerce-info::after,
.woocommerce-error::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--color-forest) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.woocommerce-error::before {
    color: #B3261E !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.woocommerce-message .button,
.woocommerce-info .button {
    padding: 8px 18px !important;
    font-size: 0.9rem;
    float: right !important;
    margin-top: -4px !important;
}

/* --- Password Reveal Fix --- */
.woocommerce form .woocommerce-input-wrapper {
    position: relative;
}

.show-password-input {
    width: auto !important;
    background: transparent !important;
    color: var(--color-forest) !important;
    position: absolute !important;
    top: 50% !important;
    right: 10px !important;
    transform: translateY(-50%) !important;
    z-index: 100 !important;
    min-width: unset !important;
    margin: 0 !important;
    border: none !important;
    padding: 5px !important;
}

.woocommerce form .woocommerce-input-wrapper input[type="password"] {
    padding-right: 45px !important;
}

/* =========================================
   4. WOOCOMMERCE PRODUCT PAGE REDESIGN
   ========================================= */

/* Main Wrapper */
.site-main-wrapper {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    /* Bottom padding leaves room for the footer silhouettes */
    padding: 40px 20px 150px;
    flex: 1;
}

.site-main-wrapper--narrow {
    max-width: 1000px;
    padding-top: 60px;
}

/* Breadcrumb & shop header */
.woocommerce .woocommerce-breadcrumb {
    font-size: 0.9rem;
    color: rgba(44, 44, 44, 0.7);
    margin-bottom: 30px;
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--color-forest);
}

.woocommerce-products-header {
    text-align: center;
    margin-bottom: 30px;
}

.woocommerce-products-header__title {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
}

/* --- SINGLE PRODUCT LAYOUT --- */
.woocommerce div.product {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Tabs and related products span the full width under the gallery/summary */
.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .related,
.woocommerce div.product .upsells {
    grid-column: 1 / -1;
    width: 100%;
}

/* Main Image Container */
.woocommerce div.product div.images {
    width: 100% !important;
    float: none !important;
    margin-bottom: 40px;
}

/* Main Image Styling */
.woocommerce div.product div.images img {
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(27, 77, 62, 0.15);
    width: 100%;
    transition: transform 0.3s ease;
}

/* --- FIXED GALLERY THUMBNAILS --- */
.woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 20px !important;
    padding: 10px 5px 5px 5px !important;
    justify-content: center;
}

.woocommerce-product-gallery .flex-control-thumbs li {
    width: 80px !important;
    height: 80px !important;
    float: none !important;
    flex: 0 0 auto;
    list-style: none !important;
    padding: 0 !important;
}

.woocommerce-product-gallery .flex-control-thumbs img {
    border-radius: 12px !important;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    border: 2px solid transparent;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.woocommerce-product-gallery .flex-control-thumbs img:hover,
.woocommerce-product-gallery .flex-control-thumbs img.flex-active {
    opacity: 1;
    transform: translateY(-3px);
    border-color: var(--color-rust);
}

/* --- PRODUCT SUMMARY (Right Column) --- */
.woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
    position: relative !important;
    top: auto !important;
    background: #fff;
    padding: 35px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-soft);
}

.product_title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 15px;
    line-height: 1.05;
    color: var(--color-forest);
}

.woocommerce div.product .summary .price {
    color: var(--color-rust-dark);
    font-weight: 700;
    font-size: 1.8rem !important;
    display: block;
    margin-bottom: 25px;
    font-family: var(--font-body);
}

.woocommerce .price del {
    opacity: 0.55;
    font-weight: 500;
}

.woocommerce .price ins {
    text-decoration: none;
}

.woocommerce-product-details__short-description {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.7;
}

.woocommerce .star-rating span::before,
.woocommerce p.stars a {
    color: var(--color-rust);
}

/* Sale badge */
.woocommerce span.onsale {
    background: var(--color-rust-dark);
    color: #fff;
    min-height: 0;
    min-width: 0;
    line-height: 1;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    top: 16px;
    left: 16px;
    z-index: 3;
    box-shadow: 0 6px 14px rgba(180, 83, 47, 0.3);
}

.woocommerce ul.products li.product .onsale {
    top: 32px;
    left: 32px;
    right: auto;
    margin: 0;
}

/* Product tabs as pills */
.woocommerce div.product .woocommerce-tabs ul.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0 0 24px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: none !important;
    background: transparent !important;
    border-radius: var(--radius-pill) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 10px 22px !important;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(27, 77, 62, 0.15);
    color: var(--color-forest) !important;
    font-weight: 600;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    border-color: var(--color-forest);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    background: var(--color-forest);
    border-color: var(--color-forest);
    color: #fff !important;
}

.woocommerce div.product .woocommerce-tabs .panel {
    margin: 0 0 2em;
    padding: 0;
    text-align: left;
}

/* --- NEW CREATIVE QUANTITY BOX --- */
.woocommerce div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

/* Quantity Wrapper (product page + cart page) */
.woocommerce .quantity {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--color-forest);
    border-radius: 50px;
    padding: 4px;
    width: auto;
    height: 46px;
}

.woocommerce div.product .quantity {
    display: flex;
    min-width: 140px;
    height: 54px;
    padding: 5px;
}

/* "Sold individually" products render a hidden input; don't show an empty box */
.woocommerce .quantity:has(input[type="hidden"]),
.woocommerce div.product .quantity:has(input[type="hidden"]) {
    display: none;
}

/* The +/- Buttons */
button.qty-btn {
    background: transparent !important;
    color: var(--color-forest) !important;
    border: none !important;
    font-size: 1.5rem !important;
    width: 40px !important;
    height: 100% !important;
    padding: 0 !important;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
}

button.qty-btn:hover {
    color: var(--color-rust-dark) !important;
    background: rgba(27, 77, 62, 0.06) !important;
    transform: none !important;
}

/* The Number Input */
.woocommerce .quantity input.qty {
    border: none !important;
    background: transparent !important;
    width: 46px !important;
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-charcoal);
    padding: 0 !important;
    height: 100% !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

.woocommerce div.product .quantity input.qty {
    width: 50px !important;
    font-size: 1.2rem;
}

.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- ADD TO CART BUTTON --- */
.single_add_to_cart_button {
    flex-grow: 1;
    background-color: var(--color-forest) !important;
    color: #fff !important;
    padding: 16px 40px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s ease;
    height: 54px;
}

.single_add_to_cart_button:hover {
    background-color: var(--color-rust-dark) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(180, 83, 47, 0.3);
}

/* --- GRID FIXES (CENTERED) --- */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
}

.woocommerce ul.products li.product {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-card);
    padding: 20px;
    text-align: center;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
}

.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
    flex: 1;
}

/* Image wrapper keeps the hover zoom inside rounded corners */
.product-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 18px;
    aspect-ratio: 1 / 1;
    background: var(--color-cream);
}

.woocommerce ul.products li.product img {
    border-radius: 16px;
    margin-bottom: 15px;
    transition: transform 0.6s var(--ease-out), opacity 0.4s ease;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.woocommerce ul.products li.product .product-thumb img {
    margin: 0;
    height: 100%;
    border-radius: 0;
}

.product-thumb__alt {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

.woocommerce ul.products li.product:hover .product-thumb__alt {
    opacity: 1;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    padding: 0;
    margin-bottom: 8px;
    color: var(--color-forest);
}

.woocommerce ul.products li.product .price {
    color: var(--color-rust-dark);
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .button {
    display: block;
    width: 100%;
    margin-top: auto;
    text-align: center;
}

/* View Cart Link Styling - Forced Block for All Screens */
a.added_to_cart {
    display: block !important;
    width: 100%;
    margin-left: 0;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-forest);
    padding: 5px 0;
}

/* Shop pagination */
.woocommerce nav.woocommerce-pagination ul {
    border: none;
    display: inline-flex;
    gap: 8px;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    min-width: 44px;
    padding: 12px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    color: var(--color-forest);
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--color-forest);
    color: #fff;
}

/* --- RESPONSIVENESS FOR PRODUCT --- */
@media (max-width: 1024px) {
    .woocommerce div.product {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .woocommerce div.product div.summary {
        position: relative !important;
        top: auto !important;
        padding: 25px;
    }

    .product_title {
        font-size: 2.5rem;
    }

    .woocommerce div.product form.cart {
        flex-direction: column;
        align-items: stretch;
    }

    .woocommerce div.product .quantity {
        width: 100%;
        justify-content: space-between;
    }

    .single_add_to_cart_button {
        width: 100%;
    }
}

/* =========================================
   5. CART & CHECKOUT
   ========================================= */
.woocommerce table.shop_table {
    background: #fff;
    border: none;
    border-radius: var(--radius-card);
    border-collapse: separate;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.woocommerce table.shop_table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-forest);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    padding: 16px 20px;
    border-top: 1px solid rgba(27, 77, 62, 0.08);
}

.woocommerce table.shop_table thead th {
    border-top: none;
}

.woocommerce-cart table.cart img {
    width: 72px;
    border-radius: 12px;
}

.woocommerce-cart table.cart .product-name a {
    font-weight: 700;
}

.woocommerce a.remove {
    color: var(--color-rust-dark) !important;
    font-weight: 400;
}

.woocommerce a.remove:hover {
    background: var(--color-rust-dark);
    color: #fff !important;
}

.woocommerce .cart-collaterals .cart_totals h2,
.woocommerce-checkout h3 {
    font-size: 1.6rem;
}

.woocommerce .return-to-shop {
    text-align: center;
}

.woocommerce-checkout #payment {
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}

.woocommerce-checkout #payment div.payment_box {
    background: var(--color-cream);
    border-radius: 12px;
    color: var(--color-charcoal);
}

.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: var(--color-cream);
}

/* Fix: Differentiate Item Price from Total */
.woocommerce-checkout-review-order-table .product-name {
    font-weight: 600;
    color: var(--color-charcoal);
}

/* Item Unit Price (if shown) or Line Subtotal within the table */
.woocommerce-checkout-review-order-table .cart_item .amount {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-charcoal);
    /* Dark grey instead of the global rust color */
}

/* Order Total - Make it pop */
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-forest);
    border-top: 2px solid var(--color-forest);
    padding-top: 15px;
    padding-bottom: 15px;
}

.woocommerce-checkout-review-order-table .order-total .amount {
    color: var(--color-rust-dark);
    /* Keep the brand color for the grand total */
}

/* Cart Actions & Coupon Layout */
.woocommerce-cart table.cart td.actions {
    padding: 20px;
}

.woocommerce-cart table.cart td.actions .coupon {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    float: left;
}

.woocommerce-cart table.cart td.actions .button {
    float: right;
}

.woocommerce-cart table.cart td.product-quantity .quantity {
    margin: 0 auto;
}

.woocommerce .cart-empty {
    text-align: center;
    font-size: 1.25rem;
    margin: 40px auto 20px;
}

/* Checkout Form Layout Polish */
.woocommerce-checkout #customer_details {
    margin-bottom: 40px;
}

.woocommerce-checkout #order_review_heading {
    margin-top: 50px;
    font-size: 1.8rem;
}

/* Product Reviews in Tabs */
#reviews #comments ol.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

#reviews #comments ol.commentlist li {
    margin-bottom: 24px;
}

#reviews #comments ol.commentlist li .comment-text {
    border: 1px solid rgba(27, 77, 62, 0.1);
    border-radius: var(--radius-card);
    background: #fff;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

#reviews #comments ol.commentlist li .avatar {
    border-radius: 50%;
}


/* =========================================
   6. CUSTOM FRONTPAGE STYLES
   ========================================= */
.hero-section {
    background-color: var(--color-forest);
    background-image: radial-gradient(circle at 85% 20%, rgba(244, 208, 63, 0.12), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(217, 108, 72, 0.18), transparent 50%);
    color: #fff;
    padding: 80px 20px 140px;
    position: relative;
    border-radius: 0 0 40px 40px;
    overflow: hidden;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-text>* {
    animation: fadeUp 0.9s var(--ease-out) both;
}

.hero-text>*:nth-child(2) {
    animation-delay: 0.1s;
}

.hero-text>*:nth-child(3) {
    animation-delay: 0.2s;
}

.hero-text>*:nth-child(4) {
    animation-delay: 0.3s;
}

.hero-text h1 {
    color: #fff;
    font-size: clamp(3rem, 6.5vw, 5.25rem);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-btn {
    background: var(--color-rust-dark);
    color: #fff;
    padding: 18px 40px !important;
    font-size: 1.1rem !important;
    border-radius: var(--radius-pill);
    font-weight: bold;
    display: inline-block;
    width: auto;
    border: 2px solid transparent;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-btn:hover {
    background: #fff;
    color: var(--color-forest);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.hero-btn--outline {
    background: transparent;
    color: var(--color-forest);
    border-color: var(--color-forest);
}

.hero-btn--outline:hover {
    background: var(--color-forest);
    color: #fff;
}

.hero-image img {
    border-radius: 40px;
    transform: rotate(3deg);
    border: 8px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    animation: heroFloat 8s ease-in-out infinite;
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-divider .shape-fill {
    fill: var(--color-cream);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes heroFloat {

    0%,
    100% {
        transform: rotate(3deg) translateY(0);
    }

    50% {
        transform: rotate(2deg) translateY(-12px);
    }
}

/* Section headings */
.featured-plush {
    padding: 80px 20px;
}

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

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: clamp(2.25rem, 4vw, 3rem);
    margin-bottom: 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-rust-dark);
}

.section-cta {
    margin: 10px 0 0;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--color-rust);
}

.text-link span {
    transition: transform 0.25s var(--ease-out);
}

.text-link:hover span {
    transform: translateX(4px);
}

/* Toller Features */
.toller-features {
    background: var(--color-sand);
    padding: 100px 20px;
    /* Extra space at the bottom is the "field" the footer silhouettes run across */
    padding-bottom: 220px;
    scroll-margin-top: 100px;
}

.toller-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.toller-image-wrapper {
    position: relative;
}

.toller-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 2px solid var(--color-rust);
    border-radius: 24px;
    z-index: 0;
}

.toller-image-wrapper img {
    position: relative;
    z-index: 1;
    display: block;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    width: 100%;
    height: auto;
}

.toller-content h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.toller-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* =========================================
   7. PAGES, POSTS & 404
   ========================================= */
.entry-header,
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.entry-title {
    font-size: clamp(2.25rem, 5vw, 3rem);
    margin-bottom: 12px;
}

.entry-meta {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(44, 44, 44, 0.7);
}

.entry-thumbnail {
    margin: 0 0 40px;
}

.entry-content a {
    text-decoration: underline;
    text-decoration-color: rgba(180, 83, 47, 0.45);
    text-underline-offset: 3px;
}

.entry-content blockquote {
    margin: 30px 0;
    padding: 10px 0 10px 24px;
    border-left: 4px solid var(--color-rust);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-forest);
}

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.post-card {
    background: #fff;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
}

.post-card__image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0;
}

.post-card__body {
    padding: 24px;
}

.post-card__title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.post-card__excerpt p {
    margin: 0;
    font-size: 1rem;
}

.navigation.pagination,
.post-navigation {
    margin-top: 50px;
}

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

.nav-links .page-numbers {
    min-width: 44px;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    text-align: center;
    font-weight: 700;
}

.nav-links .page-numbers.current,
.nav-links a.page-numbers:hover {
    background: var(--color-forest);
    color: #fff;
}

.no-results,
.error-404 {
    text-align: center;
}

.error-404__art {
    width: 160px;
    margin: 0 auto 20px;
    display: block;
    animation: tollerTrot 1.2s ease-in-out infinite;
}

.error-404 p {
    max-width: 520px;
    margin: 0 auto 30px;
}

.error-404 .hero-actions {
    justify-content: center;
}

/* =========================================
   8. FOOTER & SILHOUETTES
   ========================================= */
.site-footer {
    background: var(--color-forest);
    color: rgba(255, 255, 255, 0.85);
    padding: 70px 20px 30px;
    margin-top: auto;
    position: relative;
}

.site-footer a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 4px;
}

.site-footer a:hover {
    color: var(--color-gold);
    text-decoration-color: currentColor;
}

/* Zero-height strip on the footer's top edge: silhouettes stand on it */
.footer-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    line-height: 0;
    pointer-events: none;
}

.footer-silhouettes {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.silhouette {
    position: absolute;
    height: auto;
    opacity: 0.9;
    z-index: 20;
}

/* Adjusted for flat grass footer */
.silhouette-duck {
    bottom: 60px;
    /* Flying high */
    left: 5%;
    width: 80px;
    animation: duckFlight 6s ease-in-out infinite;
}

.silhouette-toller {
    bottom: -2px;
    /* Running on the flat ground */
    right: 5%;
    width: 140px;
    transform-origin: bottom center;
    animation: tollerTrot 1.2s ease-in-out infinite;
}

@keyframes duckFlight {

    0%,
    100% {
        transform: translate(0, 0) rotate(-3deg);
    }

    50% {
        transform: translate(-14px, -12px) rotate(2deg);
    }
}

@keyframes tollerTrot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
}

.footer-title {
    margin: 0 0 6px;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
}

.footer-blurb {
    margin: 0;
    max-width: 36ch;
    font-size: 1rem;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    font-weight: 600;
    font-size: 0.95rem;
}

.site-footer .footer-menu a {
    text-decoration: none;
}

.footer-social {
    justify-self: end;
}

.site-footer .social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.site-footer .social-link:hover {
    border-color: var(--color-gold);
}

.footer-bottom {
    max-width: var(--container-width);
    margin: 50px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 768px) {
    .silhouette-duck {
        width: 40px;
        bottom: 35px;
        left: 2%;
    }

    .silhouette-toller {
        width: 80px;
        bottom: -2px;
        right: 2%;
    }

    .site-main-wrapper {
        padding-bottom: 100px;
    }

    .toller-features {
        padding-bottom: 150px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 28px;
    }

    .footer-blurb {
        margin: 0 auto;
    }

    .footer-social {
        justify-self: center;
    }
}

@media (max-width: 900px) {

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        margin-top: 40px;
    }

    /* Toller Features Mobile */
    .toller-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .toller-image-wrapper {
        max-width: 80%;
        margin: 0 auto;
    }
}

/* =========================================
   9. REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-image img {
        animation: none;
        transform: rotate(3deg);
    }
}