/*
Theme Name: Barnapole Theme | by Jeff Glasser
Theme URI: https://barnapole.com
Author: Jeff Glasser
Author URI: https://barnapole.com
Description: Custom theme for Barnapole by Jeff Glasser
Version: 1.0
*/

/* Tailwind Base Imports (handled by build process usually, but here for reference) */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Styles */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
}

/* WooCommerce Overrides */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    margin-bottom: 2rem;
}

.woocommerce span.onsale {
    background-color: #0066cc;
    line-height: 1;
    padding: 0.5rem 1rem;
    border-radius: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.woocommerce div.product p.price, 
.woocommerce div.product span.price {
    color: #0066cc;
    font-weight: 700;
    font-size: 1.5rem;
}

.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button {
    background-color: #000;
    color: #fff;
    border-radius: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
}

.woocommerce #respond input#submit:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover {
    background-color: #0066cc;
    color: #fff;
}

/* Fix for Cart Thumbnails */
.woocommerce-cart .product-thumbnail img {
    width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
}

/* Fix for Mini Cart Thumbnails */
.woocommerce-mini-cart__image img {
    width: 80px !important;
    height: auto !important;
}

/* Cart Page Thumbnail Fix */
.woocommerce-cart-form__cart-item .product-thumbnail img {
    width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
    border-radius: 8px;
}

/* Mini Cart Widget Thumbnail Fix */
.widget_shopping_cart_content .woocommerce-mini-cart-item .woocommerce-mini-cart__image img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 8px; /* Soften edges */
}

/* Ensure Logo stays small */
/* Removed global 80px constraint and selectors */

/* Contact Page Styling */
.contact-hero {
    background-color: #0066cc;
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 60px;
}

.contact-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.contact-hero p {
    font-size: 1.2rem;
    margin-top: 15px;
    opacity: 0.9;
    color: #ffffff;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #1d1d1f;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #0066cc;
}

.info-item p {
    font-size: 1rem;
    color: #4a4a4a;
    margin: 0;
}

.contact-form-wrapper {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .wc-block-cart-item__image {
        width: 100px !important;
        min-width: 100px !important;
    }
}

/* Logo Sizing Adjustments */
/* Header Logo */
header img[src*="white-logo.png"],
.custom-logo-link img, 
.site-logo img {
    max-width: 180px !important;
    height: auto !important;
    max-height: 55px !important; /* Reduced from 80px */
}

/* Footer Logo */
footer img[src*="white-logo.png"],
.site-footer img {
    max-width: 150px !important;
    height: auto !important;
    max-height: 45px !important; /* Reduced from 71px */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    header img[src*="white-logo.png"],
    .custom-logo-link img, 
    .site-logo img {
        max-width: 140px !important;
        max-height: 45px !important;
    }
    
    footer img[src*="white-logo.png"],
    .site-footer img {
        max-width: 120px !important;
        max-height: 40px !important;
    }
}

/* Stronger Logo Sizing Adjustments */
/* Header Logo - Using ID and !important to force override */
#masthead .custom-logo-link img,
#masthead .site-logo img,
.site-header .custom-logo-link img,
header .custom-logo-link img,
body .custom-logo-link img {
    width: 180px !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 55px !important;
}

/* Footer Logo - Reinforce */
footer .site-footer img,
.site-footer .footer-logo img,
body footer img[src*="white-logo.png"] {
    width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
    max-height: 45px !important;
}

@media (max-width: 768px) {
    #masthead .custom-logo-link img,
    body .custom-logo-link img {
        width: 140px !important;
        max-width: 140px !important;
        max-height: 45px !important;
    }
}

/* Override Tailwind classes for Header Logo */
header img[src*="white-logo.png"],
.flex-shrink-0.flex.items-center a img,
img.h-8.md\:h-10.w-auto {
    width: 180px !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 55px !important;
}

/* Ensure the container doesn't force size */
.flex-shrink-0.flex.items-center a {
    display: block;
    max-width: 180px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    header img[src*="white-logo.png"],
    .flex-shrink-0.flex.items-center a img,
    img.h-8.md\:h-10.w-auto {
        width: 140px !important;
        max-width: 140px !important;
        max-height: 45px !important;
    }
}

/* Fix for Related Products Thumbnails */
.related.products .product .relative.overflow-hidden img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
    min-height: 100% !important;
}

.related.products .product .relative.overflow-hidden {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Stronger Fix for Related Products Thumbnails */
body .related.products ul.products li.product .relative.overflow-hidden img,
body .related.products ul.products li.product a img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

body .related.products ul.products li.product .relative.overflow-hidden {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
}

/* Fix for Testimonials Slider */
.reviews-slider-wrapper {
    overflow: hidden; /* Prevents horizontal scroll on mobile */
    width: 100%;
    position: relative;
}

.reviews-track {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Smooth sliding animation */
    width: 100%;
}

.review-card {
    flex: 0 0 100%; /* Mobile: 1 slide per view */
    box-sizing: border-box;
    padding: 15px;
}

/* Desktop: 3 slides per view */
@media (min-width: 768px) {
    .review-card {
        flex: 0 0 33.333%;
    }
}

.slider-nav {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-dot.active {
    background-color: #0066cc; /* Barnapole Blue */
}


/* Fix for Testimonials Slider Visibility - ADDED BY MANUS */
.reviews-slider-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    min-height: 400px; /* Force height to prevent collapse */
    display: block;
}

.reviews-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: 100%;
}

.review-card {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 15px;
    height: auto;
}

@media (min-width: 768px) {
    .review-card {
        flex: 0 0 33.333%;
    }
}

/* Ensure the section itself is visible */
#barnapole-reviews-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #09090b;
    position: relative;
    z-index: 10;
}

/* Hide 'Uncategorized' text globally */
.product_meta .posted_in {
    display: none !important;
}

/* Also hide any element containing 'Uncategorized' if it's a standalone link */
a[rel="tag"]:contains("Uncategorized") {
    display: none !important;
}

/* Specific fix for the product page shown in screenshot */
.product_meta {
    display: none !important;
}

/* REMOVE UNCATEGORIZED LABELS - ADDED BY MANUS */
.product_meta .posted_in {
    display: none !important;
}
.product_meta .tagged_as {
    display: none !important;
}
/* Hide specific category links if they appear elsewhere */
a[href*="uncategorized"] {
    display: none !important;
}
/* Hide the entire meta section if it only contains categories */
.product_meta {
    font-size: 0 !important; /* Hide text nodes */
}
.product_meta > * {
    font-size: initial !important; /* Restore children if needed, but we hid them above */
    display: none !important;
}
