/*
Theme Name: Óticas Afagu
Description: Template WordPress para Óticas Afagu com integração WooCommerce
Version: 1.0
Author: Óticas Afagu
Text Domain: oticas-afagu
*/

/* Estilos compartilhados para todas as páginas */

/* Header Styles */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Top bar styles */
.top-bar {
    background: #13b5c5;
    color: white;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    width: 100%;
}

.top-bar a {
    color: white;
    transition: color 0.3s ease;
}

.top-bar a:hover {
    color: #4cc4d0;
}

/* Main header styles */
.main-header {
    padding: 1rem 0;
}

/* Logo styles */
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #13b5c5;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 0.5rem;
}

/* Navigation styles */
.nav-link {
    color: #374151;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #13b5c5;
}

.nav-link.active {
    color: #13b5c5;
    font-weight: bold;
}

/* Search bar styles */
.search-container {
    position: relative;
}

.search-input {
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    width: 100%;
    min-width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #13b5c5;
    box-shadow: 0 0 0 3px rgba(19, 181, 197, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* Cart button styles */
.cart-button {
    position: relative;
    color: #374151;
    transition: color 0.3s ease;
}

.cart-button:hover {
    color: #13b5c5;
}

.cart-counter {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #13b5c5;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    min-width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cart-counter:hover {
    transform: scale(1.1);
    background: #0f9fb0;
}

/* Mobile menu styles */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: #374151;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.mobile-menu-button:hover {
    color: #13b5c5;
    background-color: rgba(19, 181, 197, 0.1);
}

.mobile-menu {
    display: none;
    padding-bottom: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.25rem;
    margin: 0.25rem 0;
}

.mobile-menu a:hover {
    color: #13b5c5;
    background-color: rgba(19, 181, 197, 0.1);
    transform: translateX(0.25rem);
}

.mobile-menu a.active {
    color: #13b5c5;
    font-weight: bold;
    background-color: rgba(19, 181, 197, 0.1);
}

/* Animation for mobile menu */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive header adjustments */
@media (max-width: 1024px) {
    .nav-desktop {
        display: none;
    }
    
    .mobile-menu-button {
        display: block;
    }
    
    .search-input {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        font-size: 0.75rem;
    }
    
    .top-bar .flex {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .main-header {
        padding: 0.75rem 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .search-input {
        min-width: 120px;
        font-size: 0.875rem;
    }
    
    .header-actions {
        gap: 0.75rem;
    }
}

@media (max-width: 640px) {
    .top-bar {
        display: none;
    }
    
    .search-input {
        display: none;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
}

/* Smooth transitions */
.transition {
    transition: all 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #13b5c5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f9fb0;
}

/* Hover effects */
.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Animation for hero section */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

/* Product grid responsive */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Store card styles */
.store-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.store-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Policy navigation styles */
.policy-nav {
    display: block;
    padding: 0.5rem 1rem;
    color: #6b7280;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.policy-nav:hover {
    color: #13b5c5;
    border-left-color: #13b5c5;
}

.policy-nav.active {
    color: #13b5c5;
    border-left-color: #13b5c5;
}

/* Tab styles */
.tab-button {
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #374151;
}

.tab-button.active {
    color: #13b5c5;
    border-bottom-color: #13b5c5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .store-card {
        padding: 1rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #13b5c5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WooCommerce specific styles */
.woocommerce .woocommerce-breadcrumb {
    margin-bottom: 1rem;
}

.woocommerce .woocommerce-breadcrumb a {
    color: #13b5c5;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    color: #0f9fb0;
}

.woocommerce .price {
    color: #13b5c5;
    font-weight: bold;
}

.woocommerce .price del {
    color: #9ca3af;
}

.woocommerce .button {
    background-color: #13b5c5;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.woocommerce .button:hover {
    background-color: #0f9fb0;
    color: white;
}

.woocommerce .button.alt {
    background-color: #13b5c5;
}

.woocommerce .button.alt:hover {
    background-color: #0f9fb0;
}

/* Product single page */
.woocommerce div.product {
    margin-bottom: 2rem;
}

.woocommerce div.product .product_title {
    color: #374151;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.woocommerce div.product .price {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    margin-bottom: 1.5rem;
    color: #6b7280;
}

/* Cart and checkout */
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout .cart-collaterals {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* My Account */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    color: #374151;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background-color: #13b5c5;
    color: white;
}
