/*
Theme Name: Eton Hymnal
Theme URI: https://etonhymnal.co.uk
Description: A custom child theme for Eton Hymnal based on Storefront
Author: TGA Digital
Author URI: https://tgadigital.co.uk
Template: storefront
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eton-hymnal
*/

/* Import Storefront styles */
@import url("../storefront/style.css");

/* Variables */
:root {
    --eton-blue: #A0D1CA;
    --dark-green: #1D332E;
    --light-bg: #F5F8F7;
    --white: #FFFFFF;
}

/* Global Styles */
body {
    background-color: var(--light-bg);
    color: var(--dark-green);
}

.button, button {
    background-color: var(--eton-blue);
    color: var(--dark-green);
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 500;
}

.button.outline {
    background-color: transparent;
    border: 2px solid var(--eton-blue);
}

/* Header Styles */
.site-header {
    background-color: var(--white); /* Full width white */
    padding: 0; /* Remove padding here */
    margin-bottom: 0;
    /* Background removed */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); /* Shadow applied here */
}

.site-header .col-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem; /* Padding applied here */
    gap: 2rem;

}

/* Logo */
.site-branding {
    margin: 0;
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dark-green);
}

.brand-link svg {
    color: var(--eton-blue);
    width: 40px;
    height: 40px;
}

.brand-link span {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-green);
}

/* Navigation */
.main-navigation {
    margin: 0;
    padding: 0;
}

.main-navigation ul.menu {
    display: flex;
    gap: 2rem;
    margin: 0;
    align-items: center;
}

.main-navigation ul.menu > li > a {
    color: #4A5568;
    padding: 0;
    font-weight: 500;
    font-size: 1rem;
}

/* Search in Navigation */
.main-navigation .header-search {
    margin: 0;
    position: relative;
}

.main-navigation .header-search form {
    margin: 0;
    position: relative;
}

.main-navigation .header-search form::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23718096" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>') no-repeat center;
    pointer-events: none;
    opacity: 0.7;
}

.main-navigation .header-search input[type="search"] {
    border-radius: 50px;
    background-color: #F5F8F7;
    border: 1px solid #E2E8F0;
    padding: 0.5em 1em 0.5em 2.5em;
    width: 240px;
    font-size: 0.95rem;
}

.main-navigation .header-search input[type="search"]::placeholder {
    color: #718096;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions .desktop-only-actions {
    display: flex;
    align-items: center;
    gap: 1rem; /* Match parent .header-actions gap */
}

.cart-contents {
    color: var(--dark-green);
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 0.5rem;
    position: relative;
}

.cart-contents .amount {
    display: none; /* Keep amount hidden, count will be styled below */
}

/* Add styling for the cart count badge */
.cart-contents .count {
    display: inline-block; /* Make visible */
    position: absolute;
    top: -10px;            /* Position above the parent */
    right: -12px;           /* Position to the right of the parent */
    font-size: 0.75em;      /* Smaller font size */
    background-color: var(--eton-blue); /* Use theme color */
    color: var(--dark-green);
    padding: 2px 6px;        /* Padding for badge look */
    border-radius: 10px;     /* Rounded corners */
    line-height: 1;        /* Ensure text fits well */
    font-weight: bold;     /* Make count bold */
    z-index: 1;            /* Ensure it's above other elements if needed */
}

/* .cart-contents::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231D332E" stroke-width="2"><path d="M9 20a1 1 0 100-2 1 1 0 000 2z"/><path d="M20 20a1 1 0 100-2 1 1 0 000 2z"/><path d="M1 1h4l2.68 13.39a2 2 0 002 1.61h9.72a2 2 0 002-1.61L23 6H6"/></svg>') no-repeat center;
} */

.header-actions .button {
    padding: 0.6em 1.2em;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    min-width: 100px;
    text-align: center;
}

.header-actions .button.outline {
    border: 1px solid var(--eton-blue);
    background: transparent;
    color: var(--dark-green);
}

.header-actions .button:not(.outline) {
    background: var(--eton-blue);
    color: var(--dark-green);
    border: none;
}

/* Hide WooCommerce elements we don't want */
/* .woocommerce-Price-amount, */ /* Removed to show price again */
/* .count {
    display: none !important;  <- Removed this rule */
/*} */

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Hide desktop elements */
    .main-navigation,
    .header-actions .desktop-only-actions {
        display: none;
    }

    /* Show mobile toggle button */
    .mobile-menu-button-wrap {
        display: block;
    }
    
    .site-header .col-full {
        gap: 1rem; /* Reduce gap on mobile */
        justify-content: space-between; /* Ensure space between logo and right side */
        flex-wrap: nowrap; /* Prevent wrapping */
    }
    
    .site-branding {
        flex-shrink: 0; /* Prevent logo from shrinking */
    }
    
    .header-actions {
        /* Ensure cart icon and menu button are grouped */
        display: flex;
        align-items: center;
        gap: 1rem; 
    }

    /* Prevent scrolling when mobile menu is open */
    .mobile-nav-open body {
        overflow: hidden;
    }

    /* Hide main toggle button when nav is open - Replaced by icon swap */
    /* .mobile-nav-open .mobile-menu-button-wrap {
        display: none;
    } */

    /* Ensure icon swap within the main toggle button */
    /* Remove less specific rules */
    /*.menu-toggle .icon-close {
        display: none; 
    }
    .mobile-nav-open .menu-toggle .icon-menu {
        display: none; 
    }
    .mobile-nav-open .menu-toggle .icon-close {
        display: block; 
    }*/

    /* Default state for icons inside the main toggle button */
    .mobile-menu-button-wrap .menu-toggle .icon-menu {
        display: block; /* Show hamburger by default */
    }
    .mobile-menu-button-wrap .menu-toggle .icon-close {
        display: none;  /* Hide close icon by default */
    }

    /* State when mobile nav is open */
    .mobile-nav-open .mobile-menu-button-wrap .menu-toggle .icon-menu {
        display: none; /* Hide hamburger */
    }
    .mobile-nav-open .mobile-menu-button-wrap .menu-toggle .icon-close {
        display: block; /* Show close icon */
    }
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background-color: rgba(160, 209, 202, 0.2); /* Eton Blue at 20% opacity */
    display: flex;
    align-items: center;
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    padding-left: calc(100vw / 2 - 100% / 2);
    padding-right: calc(100vw / 2 - 100% / 2);
    box-sizing: border-box;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    color: var(--dark-green);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--dark-green);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    border-radius: 12px;
    width: 100%;
    height: auto;
}

/* Features Section */
.features-section {
    background-color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    padding-left: calc(100vw / 2 - 100% / 2);
    padding-right: calc(100vw / 2 - 100% / 2);
    box-sizing: border-box;
}

.features-section .col-full {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.features-section h2 {
    font-size: 2.5rem;
    color: var(--dark-green);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.feature-icon {
    color: var(--eton-blue);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--dark-green);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--dark-green);
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
}

/* Remove whitespace between header and content on homepage */
.home.page:not(.page-template-template-homepage) .site-header {
    margin-bottom: 0;
}

/* No Recordings Available Section */
.no-recordings-section {
    background-color: var(--light-bg);
    padding: 3rem 0;
    text-align: center;
}

.no-recordings-section .col-full {
    max-width: 1200px; /* Match other sections */
    margin: 0 auto;
    padding: 0 2rem; /* Match other sections */
}

.no-recordings-heading {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700; /* font-bold */
    color: var(--dark-green);
    margin-bottom: 1rem; /* mb-4 */
}

.no-recordings-text {
    color: var(--dark-green);
    opacity: 0.8; /* Make slightly less prominent than heading */
    margin-bottom: 1.5rem; /* mb-6 */
}

.no-recordings-button {
    background-color: var(--eton-blue);
    color: var(--white); /* Override default button text color */
    padding: 0.75rem 1.5rem; /* px-6 py-3 */
    border-radius: 4px; /* rounded-md (using theme default) */
    display: inline-block;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

.no-recordings-button:hover {
    background-color: var(--eton-blue);
    color: var(--white);
    opacity: 0.9; /* hover:bg-opacity-90 */
}

/* Community CTA Section */
.community-cta-section {
    background-color: var(--dark-green);
    color: var(--white);
    padding: 4rem 0; /* py-16 */
    text-align: center;
    /* Full-width background */
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    padding-left: calc(100vw / 2 - 100% / 2);
    padding-right: calc(100vw / 2 - 100% / 2);
    box-sizing: border-box;
}

.community-cta-section .col-full {
    max-width: 1200px; /* Match other sections */
    margin: 0 auto;
    padding: 0 2rem; /* Match other sections */
}

.community-cta-heading {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    margin-bottom: 1rem; /* mb-4 */
    color: var(--white);
}

.community-cta-text {
    font-size: 1.125rem; /* text-lg */
    margin-bottom: 2rem; /* mb-8 */
    max-width: 42rem; /* max-w-2xl */
    margin-left: auto;
    margin-right: auto;
}

.community-cta-button {
    background-color: var(--eton-blue);
    color: var(--white); /* Ensure white text */
    padding: 0.75rem 2rem; /* px-8 py-3 */
    border-radius: 4px; /* rounded-md (using theme default) */
    display: inline-block;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

.community-cta-button:hover {
    background-color: var(--eton-blue);
    color: var(--white);
    opacity: 0.9; /* hover:bg-opacity-90 */
}

/* Mobile Menu Styles */
.mobile-menu-button-wrap {
    display: none; /* Hidden by default */
}

.menu-toggle {
    background: none;
    border: 1px solid var(--eton-blue);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    line-height: 0; /* Prevent extra space */
}

/* Override Storefront pseudo-elements for menu toggle */
.site-header .menu-toggle::before,
.site-header .menu-toggle::after,
.site-header .menu-toggle span::before {
    display: none;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--dark-green);
}

.menu-toggle .icon-close {
    display: none;
}

.mobile-nav-open .menu-toggle .icon-menu {
    display: none;
}

.mobile-nav-open .menu-toggle .icon-close {
    display: block;
}

#mobile-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--white);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav-open #mobile-navigation {
    transform: translateX(0);
}

.mobile-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none; /* Different style for close */
}

.mobile-nav-content {
    padding: 4rem 1.5rem 1.5rem; /* Space for close button */
}

.mobile-search-form {
    position: relative;
    margin-bottom: 2rem;
}

.mobile-search-form .search-field {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    background-color: var(--light-bg);
}

.mobile-search-form .search-submit {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--dark-green);
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    border-top: 1px solid #E2E8F0;
}

.mobile-menu li {
    border-bottom: 1px solid #E2E8F0;
}

.mobile-menu li a {
    display: block;
    padding: 1rem 0;
    color: var(--dark-green);
    text-decoration: none;
    font-weight: 500;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-actions .button {
    width: 100%;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Hide desktop elements */
    .main-navigation,
    .header-actions .desktop-only-actions {
        display: none;
    }

    /* Show mobile toggle button */
    .mobile-menu-button-wrap {
        display: block;
    }
    
    .site-header .col-full {
        gap: 1rem; /* Reduce gap on mobile */
        justify-content: space-between; /* Ensure space between logo and right side */
        flex-wrap: nowrap; /* Prevent wrapping */
    }
    
    .site-branding {
        flex-shrink: 0; /* Prevent logo from shrinking */
    }
    
    .header-actions {
        /* Ensure cart icon and menu button are grouped */
        display: flex;
        align-items: center;
        gap: 1rem; 
    }

    /* Prevent scrolling when mobile menu is open */
    .mobile-nav-open body {
        overflow: hidden;
    }

    /* Hide main toggle button when nav is open - Replaced by icon swap */
    /* .mobile-nav-open .mobile-menu-button-wrap {
        display: none;
    } */

    /* Ensure icon swap within the main toggle button */
    /* Remove less specific rules */
    /*.menu-toggle .icon-close {
        display: none; 
    }
    .mobile-nav-open .menu-toggle .icon-menu {
        display: none; 
    }
    .mobile-nav-open .menu-toggle .icon-close {
        display: block; 
    }*/

    /* Default state for icons inside the main toggle button */
    .mobile-menu-button-wrap .menu-toggle .icon-menu {
        display: block; /* Show hamburger by default */
    }
    .mobile-menu-button-wrap .menu-toggle .icon-close {
        display: none;  /* Hide close icon by default */
    }

    /* State when mobile nav is open */
    .mobile-nav-open .mobile-menu-button-wrap .menu-toggle .icon-menu {
        display: none; /* Hide hamburger */
    }
    .mobile-nav-open .mobile-menu-button-wrap .menu-toggle .icon-close {
        display: block; /* Show close icon */
    }
}

/* --- Intermediate Breakpoint Adjustments --- */

/* Breakpoint 1: Adjust spacing and sizes */
@media (max-width: 1180px) {
    .brand-link span {
        font-size: 1.5rem; /* Slightly smaller logo text */
    }
    
    .main-navigation .header-search input[type="search"] {
        width: 180px; /* Narrower search bar */
    }
    
    .site-header .col-full {
        gap: 1rem; /* Reduce overall gap */
    }
    
    .main-navigation ul.menu {
        gap: 1.5rem; /* Reduce nav link gap */
    }
}

/* Breakpoint 2: Stack action buttons */
@media (max-width: 1050px) {
    .header-actions .desktop-only-actions {
        flex-direction: column;
        align-items: flex-end; /* Align buttons to the right */
        gap: 0.5rem; /* Reduce gap between stacked buttons */
    }
    
    /* Optional: Adjust cart margin if needed */
    .header-actions .cart-contents {
        margin-right: 0; /* Remove right margin if buttons stack */
    }
}

/* --- Mobile Menu Styles --- */
.mobile-menu-button-wrap {
    display: none; /* Hidden by default */
}

.menu-toggle {
    background: none;
    border: 1px solid var(--eton-blue);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    line-height: 0; /* Prevent extra space */
}

/* Override Storefront pseudo-elements for menu toggle */
.site-header .menu-toggle::before,
.site-header .menu-toggle::after,
.site-header .menu-toggle span::before {
    display: none;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--dark-green);
}

.menu-toggle .icon-close {
    display: none;
}

.mobile-nav-open .menu-toggle .icon-menu {
    display: none;
}

.mobile-nav-open .menu-toggle .icon-close {
    display: block;
}

#mobile-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--white);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav-open #mobile-navigation {
    transform: translateX(0);
}

.mobile-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none; /* Different style for close */
}

.mobile-nav-content {
    padding: 4rem 1.5rem 1.5rem; /* Space for close button */
}

.mobile-search-form {
    position: relative;
    margin-bottom: 2rem;
}

.mobile-search-form .search-field {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    background-color: var(--light-bg);
}

.mobile-search-form .search-submit {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--dark-green);
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    border-top: 1px solid #E2E8F0;
}

.mobile-menu li {
    border-bottom: 1px solid #E2E8F0;
}

.mobile-menu li a {
    display: block;
    padding: 1rem 0;
    color: var(--dark-green);
    text-decoration: none;
    font-weight: 500;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-actions .button {
    width: 100%;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Hide desktop elements */
    .main-navigation,
    .header-actions .desktop-only-actions {
        display: none;
    }

    /* Show mobile toggle button */
    .mobile-menu-button-wrap {
        display: block;
    }
    
    .site-header .col-full {
        gap: 1rem; /* Reduce gap on mobile */
        justify-content: space-between; /* Ensure space between logo and right side */
        flex-wrap: nowrap; /* Prevent wrapping */
    }
    
    .site-branding {
        flex-shrink: 0; /* Prevent logo from shrinking */
    }
    
    .header-actions {
        /* Ensure cart icon and menu button are grouped */
        display: flex;
        align-items: center;
        gap: 1rem; 
    }

    /* Prevent scrolling when mobile menu is open */
    .mobile-nav-open body {
        overflow: hidden;
    }

    /* Hide main toggle button when nav is open - Replaced by icon swap */
    /* .mobile-nav-open .mobile-menu-button-wrap {
        display: none;
    } */

    /* Ensure icon swap within the main toggle button */
    /* Remove less specific rules */
    /*.menu-toggle .icon-close {
        display: none; 
    }
    .mobile-nav-open .menu-toggle .icon-menu {
        display: none; 
    }
    .mobile-nav-open .menu-toggle .icon-close {
        display: block; 
    }*/

    /* Default state for icons inside the main toggle button */
    .mobile-menu-button-wrap .menu-toggle .icon-menu {
        display: block; /* Show hamburger by default */
    }
    .mobile-menu-button-wrap .menu-toggle .icon-close {
        display: none;  /* Hide close icon by default */
    }

    /* State when mobile nav is open */
    .mobile-nav-open .mobile-menu-button-wrap .menu-toggle .icon-menu {
        display: none; /* Hide hamburger */
    }
    .mobile-nav-open .mobile-menu-button-wrap .menu-toggle .icon-close {
        display: block; /* Show close icon */
    }
} 

/* --- Custom Footer Styles --- */
body footer.site-footer.custom-footer {
    background-color: var(--dark-green);
    color: #D1D5DB; /* text-gray-300 equivalent */
    padding: 3rem 0; /* py-12 */
    border-top: none; /* Remove potential parent theme border */
}

/* Remove default Storefront footer padding/background if necessary - No longer needed with custom footer.php */
/* body footer.site-footer {
    background-color: transparent; 
    padding: 0; 
} */

.custom-footer .col-full {
    max-width: 1400px; /* Match header */
}

/* Increased specificity to override parent theme */
body footer.site-footer.custom-footer a:not(.button):not(.components-button) {
    color: #D1D5DB;
    transition: color 0.15s ease-in-out;
}

/* General hover rule (can likely be simplified later if needed) */
.custom-footer a:hover {
    color: var(--eton-blue);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Mobile default */
    gap: 2rem; /* gap-8 */
    margin-bottom: 2rem; /* Space before copyright */
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr); /* md:grid-cols-4 */
    }
}

.footer-logo .brand-link {
    margin-bottom: 1rem; /* mb-4 */
    color: var(--white); /* White logo text AND icon */
}

.footer-logo .brand-link span {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600; /* font-semibold */
    color: var(--white); /* Explicitly white */
}

.footer-logo .brand-link svg {
    color: var(--eton-blue); /* Icon color */
}

.footer-description {
    margin-bottom: 1rem; /* mb-4 */
    font-size: 0.9rem;
    line-height: 1.6;
    color: #D1D5DB; /* Use the base gray for description */
}

/* Increased specificity */
body footer.site-footer.custom-footer .footer-heading {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    margin-bottom: 1rem; /* mb-4 */
    color: var(--white); /* Ensure white */
}

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

.footer-menu li,
.footer-contact-info li {
    margin-bottom: 0.5rem; /* space-y-2 */
}

.footer-contact-info li {
    display: flex;
    align-items: flex-start; /* Align icon with start of text */
    gap: 0.5rem; /* space between icon and text */
}

.footer-contact-info svg {
    color: var(--eton-blue);
    flex-shrink: 0;
    margin-top: 0.15em; /* Align icon slightly better */
}

.footer-copyright {
    border-top: 1px solid #4B5563; /* border-gray-700 equivalent */
    margin-top: 2rem; /* mt-8 */
    padding-top: 2rem; /* pt-8 */
    text-align: center;
    color: #9CA3AF; /* text-gray-400 equivalent */
    font-size: 0.875rem;
}

.footer-legal-links {
    margin-top: 0.5rem; /* mt-2 */
}

.footer-legal-links a {
    margin: 0 0.5rem; /* space-x-4 */
    color: #9CA3AF; /* text-gray-400 equivalent */
}

.footer-legal-links a:hover {
    /* This rule is now redundant, handled by .custom-footer a:hover */
    /* color: var(--eton-blue); */
}

/* Remove the specific #E5E7EB rules */
/* .footer-menu li a,
.footer-contact-info li span,
.footer-contact-info li a {
    color: #E5E7EB; 
} */

/* Ensure non-link contact info uses base gray */
.footer-contact-info li span {
    color: #D1D5DB;
}

/* Rely on .custom-footer a for link colors */

/* Consolidate hover rules - Commented out as .custom-footer a:hover should cover these */
/* .custom-footer a:hover,
.footer-menu li a:hover, 
.footer-contact-info li a:hover { 
    color: var(--eton-blue);
} */

/* Product Card Styling for Screenshot Match (Independent of .woocommerce body class) */
/* General Product Card Styling */
ul.products li.product {
    border: 1px solid #e0e0e0; /* Lighter border */
    border-radius: 8px;        /* Rounded corners */
    overflow: hidden;          /* Keep content within rounded corners */
    background-color: #ffffff; /* Ensure white background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow */
    padding: 0;                /* Remove default padding if any */
    margin-bottom: 1.5em;      /* Adjust spacing between products */
    text-align: left;          /* Align text left */
}

/* Ensure link wraps image and text content below */
ul.products li.product a.woocommerce-LoopProduct-link {
    display: block;
    position: relative; /* Needed for absolute positioning of icon */
    margin-bottom: 0;   /* Remove default bottom margin */
    text-decoration: none;
}

/* Remove underline from image link */
ul.products li.product a img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0; /* Remove default margins */
}

/* Style for the headphone icon overlay */
ul.products li.product .product-audio-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(160, 200, 200, 0.8); /* Semi-transparent teal background */
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Adjust icon size */
    z-index: 10; /* Ensure it's above the image */
}

/* Container for text content below image */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .price,
ul.products li.product .button {
     padding-left: 15px;
     padding-right: 15px;
}

/* Product Title */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1em; /* Adjust as needed */
    color: #333;
    margin-top: 15px;
    margin-bottom: 5px;
    padding-top: 0;
}

/* Product Price */
ul.products li.product .price {
    display: inline;
    font-size: 1.1em;
    font-weight: bold;
    color: #444;
    /* margin-bottom: 15px; */ /* Removed margin-bottom */
    padding-right: 0; /* Removed right padding to allow button float */
}

/* Add to Cart Button Styling */
ul.products li.product .button {
    background-color: #a8d8d8; /* Light teal background */
    color: #333;               /* Darker text color */
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 0.9em;
    text-shadow: none;
    display: inline-block;     /* Align with text */
    margin-bottom: 15px;       /* Space at the bottom */
    text-align: center;
    transition: background-color 0.3s ease;
    width: auto; /* Don't force full width */
    float: right; /* Float to the right */
    clear: none; /* Allow price to be on the left */
}

/* Add to Cart Button Icon (if using Font Awesome) */
ul.products li.product .button .fas {
     margin-right: 5px;
}

ul.products li.product .add_to_cart_button {
    margin-right: 15px; /* Increased spacing */
}

ul.products li.product .button:hover {
    background-color: #90c0c0; /* Slightly darker on hover */
    color: #000;
}

/* Clear floats after button if needed */
ul.products li.product::after {
    content: "";
    display: table;
    clear: both;
}

/* WooCommerce Pagination Styling */
.woocommerce-pagination {
    margin-top: 2em;
    margin-bottom: 2em;
    text-align: center;
}

.woocommerce-pagination ul.page-numbers {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: inline-flex; /* Align items horizontally */
    gap: 0.5em; /* Space between items */
}

.woocommerce-pagination ul.page-numbers li {
    margin: 0; /* Remove default li margin */
}

.woocommerce-pagination .page-numbers {
    display: inline-block;
    padding: 0.6em 1em;
    min-width: 36px; /* Ensure consistent width */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: var(--white);
    color: var(--dark-green);
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1.2;
    text-align: center;
}

.woocommerce-pagination .page-numbers:hover {
    background-color: var(--light-bg);
    border-color: #d0d0d0;
    color: var(--dark-green);
}

.woocommerce-pagination .page-numbers.current {
    background-color: var(--eton-blue);
    border-color: var(--eton-blue);
    color: var(--dark-green);
    font-weight: bold;
}

.woocommerce-pagination .page-numbers.dots {
    border: none;
    background: none;
    padding: 0.6em 0.5em;
}

.woocommerce-pagination ul.page-numbers li .page-numbers.current {
    background-color: var(--eton-blue); /* Changed to accent color */
    border-color: var(--eton-blue);     /* Changed to accent color */
    color: var(--dark-green);          /* Changed to dark text */
    font-weight: bold;
} 

.woocommerce-pagination ul.page-numbers li .page-numbers:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Style the WooCommerce AJAX Add to Cart 'Added' State using Sibling Combinator (Independent of .woocommerce body class) */

/* 1. Hide the original button when 'added' class is present */
ul.products li.product .button.add_to_cart_button.added {
    display: none;
}

/* 2. Style the 'View cart' link ONLY when it directly follows the hidden button */
ul.products li.product .button.add_to_cart_button.added + a.added_to_cart.wc-forward {
    /* Copy all styles from the original button */
    display: inline-block;
    background-color: var(--eton-blue);
    color: var(--dark-green);
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    text-shadow: none;
    text-align: center;
    position: relative;
    z-index: 1;
    float: right;
    clear: none;
    margin-right: 15px;
    margin-bottom: 15px;
    -webkit-appearance: none;
    cursor: pointer;
}

/* 3. Add hover state for the styled 'View cart' link */
ul.products li.product .button.add_to_cart_button.added + a.added_to_cart.wc-forward:hover {
    background-color: #8bbab3; /* Slightly darker shade of --eton-blue */
    color: var(--dark-green);
}

/* Remove the previous attempts for clarity */
/* 
#primary .woocommerce ul.products li.product a.added_to_cart.wc-forward { ... }
.woocommerce ul.products li.product .button.add_to_cart_button.added + a.added_to_cart.wc-forward { ... }
*/

/* Popular Recordings Section - Force 4 Columns */
.popular-recordings-section ul.products {
    /* Ensure default Storefront/WooCommerce grid styles apply */
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* Explicitly set 4 columns */
    gap: 2em; /* Adjust gap as needed, matching theme */
}

/* Add spacing above and below the popular recordings section (Increased Specificity) */
div#content section.storefront-product-section.popular-recordings-section {
    margin-top: 3rem; 
    margin-bottom: 4rem; /* Ensure this overrides the :last-child rule */
}

/* Remove clearfix pseudo-elements as grid handles layout */
.popular-recordings-section ul.products.columns-4::before,
.popular-recordings-section ul.products.columns-4::after {
    display: none;
}

/* Ensure list items behave correctly in the grid (Increased Specificity) */
section.popular-recordings-section ul.products.columns-4 li.product,
section.popular-recordings-section ul.products li.product { /* Added selector with .columns-4 */
    width: auto !important; /* Let the grid determine the width */
    margin: 0 !important; /* Reset margins */
    float: none !important; /* Ensure float doesn't interfere */
}

/* Responsive adjustments if needed */
@media (max-width: 768px) { /* Example breakpoint */
    .popular-recordings-section ul.products {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
    }
}

@media (max-width: 480px) { /* Example breakpoint */
    .popular-recordings-section ul.products {
        grid-template-columns: 1fr; /* 1 column on very small screens */
    }
}