/*
Theme Name: TwentyHonduras
Theme URI: https://example.com/twenty-honduras
Author: Antigravity
Author URI: https://example.com
Description: A premium, minimalist, mobile-first theme for cosmetics.
Version: 1.0.0
Text Domain: twentyhonduras
*/

:root {
    /* Premium Palette */
    --color-bg: #f8f9fa;
    /* Blanco Ahumado */
    --color-bg-white: #ffffff;
    --color-text-main: #121212;
    /* Negro Profundo */
    --color-text-light: #757575;

    /* Brand Colors */
    --color-primary: #7a2cbe;
    /* Color Morado */
    --color-secondary: #d6d8dd;
    /* Gris Claro */
    --color-black: #121212;

    /* Functional Colors */
    --color-accent: var(--color-primary);
    --color-border: #d6d8dd;
    --color-bg-secondary: #f8f9fa;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-text-light);
    /* Subtle hover */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Minimal Layout Containers */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Utility */
.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-4 {
    gap: 1rem;
}

/* Buttons & Inputs */
button,
input[type="submit"],
.button,
.wc-block-grid__product-add-to-cart .wp-block-button__link {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    /* Slightly rounded */
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover,
input[type="submit"]:hover,
.button:hover {
    background-color: #5a2094;
    /* Darker Purple */
    transform: translateY(-1px);
}

button.alt,
.button.alt {
    background-color: var(--color-black);
}

button.alt:hover,
.button.alt:hover {
    background-color: #333;
}

/* Header & Navigation */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-branding img,
.custom-logo {
    max-height: 50px;
    /* Constrain logo height */
    width: auto;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.main-navigation li {
    position: relative;
    /* For dropdown positioning */
}

.main-navigation a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    padding: 10px 0;
    white-space: nowrap;
    /* Prevent wrapping like "LO \n NUEVO" */
}

.main-navigation a:hover {
    color: var(--color-primary);
}

/* Dropdowns */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
    padding: 10px 0;
    flex-direction: column;
    gap: 0;
    z-index: 999;
}

.main-navigation ul li:hover>ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 10px 20px;
    font-size: 0.9rem;
    text-transform: none;
    /* Submenus normal case */
    color: var(--color-text-light);
}

.main-navigation ul ul a:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
}


/* Single Product */
.single-product .product {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

@media (min-width: 768px) {
    .single-product .product {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* Product Gallery */
.woocommerce-product-gallery {
    position: relative;
    opacity: 1 !important;
    /* Fix WC hiding it initially */
}

/* Reset Wrapper to let FlexSlider work */
.woocommerce-product-gallery__wrapper {
    display: block !important;
    margin: 0 !important;
}

/* Main Image Container */
.woocommerce-product-gallery__image {
    width: 100%;
    display: block;
}

.woocommerce-product-gallery img {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    height: auto;
    display: block;
}

/* Thumbnails Grid (FlexSlider generates this list) */
.flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px !important;
    padding: 0 !important;
    list-style: none !important;
}

.flex-control-thumbs li {
    width: calc(25% - 7.5px);
    /* 4 per row */
    cursor: pointer;
    list-style: none;
}

.flex-control-thumbs img {
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
    border-radius: 4px;
}

.flex-control-thumbs img.flex-active,
.flex-control-thumbs img:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.summary.entry-summary h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.price {
    font-size: 1.5rem;
    color: var(--color-text-main);
    font-weight: 500;
    display: block;
    margin-bottom: 1.5rem;
}

/* WooCommerce Tables (Cart/Checkout) */
.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.shop_table th,
.shop_table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.shop_table th {
    background: var(--color-bg-secondary);
    font-weight: 600;
}

/* Messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem 1.5rem;
    background: var(--color-bg-secondary);
    border-top: 3px solid var(--color-primary);
    /* Cleaner top border instead of left */
    border-left: none;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    align-items: center;
    gap: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    /* Make icon distinct flex item */
    content: '';
    display: inline-block;
    position: relative;
    /* Not absolute */
    margin-right: 0 !important;
    /* Gap handles spacing */
    font-family: WooCommerce;
    /* If using default font */
    /* If WC adds content via CSS, this ensures it takes space */
}

.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
    margin-left: auto;
    /* Push to right */
    white-space: nowrap;
}

/* Related & Upsells */
.related.products,
.up-sells.products,
.cross-sells.products {
    margin-top: 4rem;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
}

.related.products ul.products,
.up-sells.products ul.products,
.cross-sells.products ul.products,
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.related.products ul.products li.product,
.up-sells.products ul.products li.product {
    list-style: none;
    margin: 0;
    width: 100%;
    /* Force grid width */
    display: flex;
    /* Make card a flex container */
    flex-direction: column;
    height: 100%;
    /* Fill grid cell height */
}

/* Product Card Inside Grid */
ul.products li.product img {
    margin-bottom: 1rem;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1/1;
    /* Square images for consistency */
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem;
    color: var(--color-text-main);
    padding: 0.5rem 0;
    min-height: 3rem;
    /* Align lines */
}

ul.products li.product .price {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

/* Lightbox / Popup Tweaks */
.pswp__bg {
    opacity: 0.8 !important;
    /* Lighter background */
    background: #121212 !important;
}

.pswp__scroll-wrap {
    padding: 40px;
    /* Add padding so image doesn't touch edges */
}

/* Force image to not be 100% full screen */
.pswp__img {
    max-height: 85vh !important;
    max-width: 85vw !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    background: #fff;
}

/* Close button more visible */
.pswp__button--close {
    opacity: 1 !important;
    background-color: var(--color-primary) !important;
    border-radius: 50%;
    margin-top: 10px;
    margin-right: 10px;
}

/* Header Search */
.header-search form {
    position: relative;
    max-width: 300px;
}

.header-search input[type="search"] {
    background: var(--color-bg-secondary);
    border: 1px solid transparent;
    border-radius: 30px;
    /* Fully rounded */
    padding: 8px 15px;
    padding-right: 40px;
    /* Space for hidden icon if we add one */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 250px;
}

.header-search input[type="search"]:focus {
    background: #fff;
    border-color: var(--color-primary);
    width: 300px;
    /* Expand on focus */
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-search button {
    display: none;
    /* Hide default ugly button, or we can style it as an icon */
}

/* Adjust nav to make room */
.main-navigation {
    margin-right: auto;
    /* Push nav left, tools right */
    margin-left: 2rem;
}

.site-tools {
    margin-left: 5rem;
    /* More space between Menu and Search */
}

/* Indicators */
.menu-item-has-children>a::after {
    content: ' ▾';
    font-size: 0.8em;
    margin-left: 4px;
}

.site-tools a {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="text"],
input[type="email"],
select,
textarea {
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    width: 100%;
    max-width: 100%;
}


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f9f9f9 0%, #e6e6e6 100%);
    /* Subtle premium gray */
    padding: 6rem 0 !important;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    font-weight: 700;
    line-height: 1.2;
}

/* Category Grid */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-card .img-wrapper {
    overflow: hidden;
    border-radius: 12px;
}

.category-card .img-wrapper img {
    transition: transform 0.5s ease;
}

.category-card:hover .img-wrapper img {
    transform: scale(1.05);
    /* Zoom effect */
}