/**
 * Old Pump Soaps - Custom Styles
 * Rustic handmade aesthetic with navy blue, cream, and sage green
 */

/* =======================
   Global Styles
   ======================= */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Rustic texture overlay (subtle) */
.wp-block-group.alignfull {
    position: relative;
}

.wp-block-group.alignfull::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.02;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="600" height="600" filter="url(%23noise)" opacity="0.4"/></svg>');
}

/* =======================
   Typography
   ======================= */

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

/* =======================
   Buttons
   ======================= */

.wp-block-button__link,
.wc-block-components-button,
.woocommerce button.button {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(31, 45, 61, 0.1);
}

.wp-block-button__link:hover,
.wc-block-components-button:hover,
.woocommerce button.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 45, 61, 0.15);
}

/* =======================
   Cards & Containers
   ======================= */

.wp-block-group.has-white-background-color {
    box-shadow: 0 2px 12px rgba(31, 45, 61, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-group.has-white-background-color:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(31, 45, 61, 0.12);
}

/* =======================
   Site Header
   ======================= */

.wp-block-site-logo img {
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(31, 45, 61, 0.1);
}

.wp-block-site-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.wp-block-site-title a:hover {
    color: var(--wp--preset--color--sage-green) !important;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
    color: var(--wp--preset--color--navy-blue);
}

/* =======================
   WooCommerce Specific
   ======================= */

/* Product Grid */
.wc-block-grid__products {
    gap: 2rem !important;
}

.wc-block-grid__product {
    border: 1px solid #f4f1ed;
    border-radius: 8px;
    padding: 1.5rem;
    background: white;
    transition: all 0.3s ease;
}

.wc-block-grid__product:hover {
    border-color: var(--wp--preset--color--sage-green);
    box-shadow: 0 8px 24px rgba(31, 45, 61, 0.12);
    transform: translateY(-4px);
}

/* Product Images */
.wc-block-grid__product-image img,
.woocommerce-product-gallery__image img {
    border-radius: 4px;
}

/* Product Price */
.wc-block-grid__product-price,
.woocommerce-Price-amount {
    font-weight: 600;
    color: var(--wp--preset--color--navy-blue);
}

/* Add to Cart Button */
.wc-block-grid__product-add-to-cart .wp-block-button__link,
.woocommerce button.button.alt {
    background-color: var(--wp--preset--color--sage-green) !important;
    border: none;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link:hover,
.woocommerce button.button.alt:hover {
    background-color: var(--wp--preset--color--navy-blue) !important;
}

/* Product Rating */
.wc-block-grid__product-rating .star-rating,
.woocommerce .star-rating {
    color: var(--wp--preset--color--sage-green);
}

/* Mini Cart */
.wc-block-mini-cart__button {
    background: transparent !important;
    color: var(--wp--preset--color--navy-blue) !important;
}

.wc-block-mini-cart__badge {
    background-color: var(--wp--preset--color--sage-green) !important;
}

/* Cart Page */
.wc-block-cart {
    margin-top: 2rem;
}

.wc-block-cart-item__image img {
    border-radius: 4px;
}

/* Checkout */
.wc-block-checkout {
    margin-top: 2rem;
}

.wc-block-components-checkbox__input:checked {
    background-color: var(--wp--preset--color--sage-green);
    border-color: var(--wp--preset--color--sage-green);
}

/* Product Categories */
.product-category a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-category a:hover h3 {
    color: var(--wp--preset--color--sage-green) !important;
}

/* =======================
   Forms
   ======================= */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    border: 2px solid #e8e5e1;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--wp--preset--color--sage-green);
    outline: none;
}

/* =======================
   Breadcrumbs
   ======================= */

.woocommerce-breadcrumb {
    font-size: 0.875rem;
    color: var(--wp--preset--color--dark-navy);
    margin-bottom: 2rem;
}

.woocommerce-breadcrumb a {
    color: var(--wp--preset--color--sage-green);
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* =======================
   Responsive Adjustments
   ======================= */

@media (max-width: 768px) {
    .wc-block-grid__products {
        gap: 1rem !important;
    }
    
    .wc-block-grid__product {
        padding: 1rem;
    }
}

/* =======================
   Accessibility
   ======================= */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    clip: auto !important;
    display: block;
    height: auto;
    left: 5px;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--wp--preset--color--sage-green);
    outline-offset: 2px;
}

/* =======================
   Footer Adjustments
   ======================= */

/* Remove excessive top spacing on footer */
.wp-site-blocks > footer {
    margin-top: 0 !important;
}

footer .wp-block-group.alignfull {
    padding-top: var(--wp--preset--spacing--40) !important;
}
