/*
 * Corte de Valor — Global Styles
 * Following WordPress best practices for Block Themes
 */

/* Smooth transitions buttons */
.wp-block-button__link {
    transition: opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.wp-block-button__link:hover {
    opacity: 0.9;
}

/* Outline button style */
.is-style-outline .wp-block-button__link {
    background: transparent !important;
    border: 1px solid currentColor;
    color: inherit !important;
}

.is-style-outline .wp-block-button__link:hover {
    opacity: 1;
    background: var(--wp--preset--color--primary-brand) !important;
    color: var(--wp--preset--color--surface-bright) !important;
    border-color: var(--wp--preset--color--primary-brand);
}

/* Tertiary button (Granate/Burgundy) */
.is-style-tertiary .wp-block-button__link {
    background: var(--wp--preset--color--tertiary-brand) !important;
}

.is-style-tertiary .wp-block-button__link:hover {
    opacity: 0.9;
}

/* Bordered group */
.is-style-bordered {
    border: 1px solid var(--wp--preset--color--outline-variant);
    padding: var(--wp--preset--spacing--30);
}

/* Navigation hover effect */
.wp-block-navigation-item__content {
    transition: opacity 0.2s ease;
    position: relative;
}

.wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.wp-block-navigation-item__content:hover::after {
    width: 100%;
}

/* Navigation submenu */
.wp-block-navigation-submenu .wp-block-navigation__submenu-container {
    border: none !important;
    box-shadow: 0 4px 20px rgba(26, 26, 27, 0.08);
}

/* Product cards hover effect */
.wp-block-post {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.wp-block-post:hover {
    box-shadow: 0 4px 20px rgba(26, 26, 27, 0.06);
}

/* WooCommerce products grid spacing */
.woocommerce .products ul,
.woocommerce ul.products {
    margin: 0 -16px;
}

/* Input fields focus state */
.wp-block-search__input:focus,
.wp-block-search .wp-block-search__input:focus {
    border-bottom-color: var(--wp--preset--color--primary-brand) !important;
    outline: none !important;
}

/* Ninja Forms styling */
.nf-form-content {
    padding: 0 !important;
    max-width: 480px;
    margin: 0 auto;
}

.nf-form-content input:not([type=submit]),
.nf-form-content textarea,
.nf-form-content select {
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid var(--wp--preset--color--neutral) !important;
    background: transparent !important;
    font-family: var(--wp--preset--font-family--inter) !important;
}

.nf-form-content input:focus,
.nf-form-content textarea:focus,
.nf-form-content select:focus {
    border-bottom-color: var(--wp--preset--color--primary-brand) !important;
}

.ninja-forms-field {
    border-radius: 0 !important;
    font-family: var(--wp--preset--font-family--inter) !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    font-size: var(--wp--preset--font-size--label-md) !important;
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) !important;
    background: var(--wp--preset--color--primary-brand) !important;
    color: var(--wp--preset--color--surface-bright) !important;
    border: none !important;
    transition: opacity 0.3s ease !important;
    cursor: pointer !important;
}

.ninja-forms-field:hover {
    opacity: 0.9 !important;
}

/* Cover block text shadows for readability */
.wp-block-cover.has-custom-content-position .wp-block-cover__inner-container {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Separator styling */
.wp-block-separator {
    opacity: 0.3;
}

/* Post excerpt styling */
.wp-block-post-excerpt__more-text {
    font-size: var(--wp--preset--font-size--label-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Skip link for accessibility */
.skip-link.screen-reader-text {
    position: absolute;
    top: -1000px;
    left: 6px;
    z-index: 100000;
    padding: 15px 23px 14px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    background-color: var(--wp--preset--color--primary-brand);
    color: var(--wp--preset--color--surface-bright);
}

.skip-link.screen-reader-text:focus {
    top: 7px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .wp-block-columns {
        flex-wrap: wrap !important;
    }

    .wp-block-cover {
        min-height: 60vh !important;
    }
}

/* WooCommerce mini cart styling */
.wc-block-mini-cart__button {
    border: none !important;
    background: transparent !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection style */
::selection {
    background: var(--wp--preset--color--primary-brand);
    color: var(--wp--preset--color--surface-bright);
}

/* Footer link hover */
footer a {
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 0.8;
}

/* Main content area */
.wp-site-blocks main {
    flex: 1;
}

/* Ensure cover backgrounds span full width */
.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

/* WooCommerce price color */
.wc-block-product-price,
.woocommerce-Price-amount {
    color: var(--wp--preset--color--primary-brand);
    font-weight: 600;
}

/* Product title font in WooCommerce blocks */
.wc-block-components-product-name {
    font-family: var(--wp--preset--font-family--playfair);
    font-weight: 600;
}

/* Add to cart button in blocks */
.wc-block-components-product-button .wp-block-button__link {
    font-size: var(--wp--preset--font-size--label-sm) !important;
    padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20) !important;
}

/* WooCommerce Tabs */
.woocommerce-tabs .wc-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--wp--preset--color--outline-variant, #c7c6ca);
}

.woocommerce-tabs .wc-tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs .wc-tabs li a {
    display: block;
    padding: 1rem 1.5rem;
    font-family: var(--wp--preset--font-family--inter, Inter);
    font-size: var(--wp--preset--font-size--label-md, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--wp--preset--color--outline, #76777b);
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.woocommerce-tabs .wc-tabs li.active a {
    color: var(--wp--preset--color--primary-brand, #1a1a1b);
    border-bottom-color: var(--wp--preset--color--primary-brand, #1a1a1b);
}

.woocommerce-tabs .wc-tabs li a:hover {
    color: var(--wp--preset--color--primary-brand, #1a1a1b);
}

.woocommerce-Tabs-panel {
    padding-top: 1.5rem;
}

.woocommerce-Tabs-panel h2 {
    font-family: var(--wp--preset--font-family--playfair-display, "Playfair Display");
    font-size: var(--wp--preset--font-size--headline-sm, 1.5rem);
    margin-bottom: 1rem;
}
