/* 
 * VVES Theme - Custom CSS
 * This file contains custom styles for the VVES Theme
 */

/* General Styles */
:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #4338ca;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none !important;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none !important;
}

/* Header and Navigation */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    margin-right: 2rem;
}

/* Ensure dropdown caret is visible when active on any viewport */
.nav-item.active .dropdown-toggle::after,
.nav-link.active.dropdown-toggle::after,
.dropdown-toggle.active::after,
.navbar-nav .active.dropdown-toggle::after,
li.active .dropdown-toggle::after {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Simple, clean navigation styling */
.navbar-nav {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-item {
    margin: 0 0.5rem;
    position: relative;
}

.navbar-nav .nav-link {
    color: #555;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
    text-decoration: none !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .active > .nav-link, 
.navbar-nav .nav-link.active {
    color: var(--primary);
}

/* Simple active indicator - positioned to not conflict with dropdown arrows */
.navbar-nav .active > .nav-link:before,
.navbar-nav .nav-link.active:before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background-color: var(--primary);
}

/* Dropdown menus */
.navbar-nav .dropdown-menu {
    margin-top: 0.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    padding: 0.5rem 0;
}

.navbar-nav .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    color: #555;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
    background-color: #f8f9fa;
    color: var(--primary);
}

/* Add dropdown caret icon */
.navbar-nav .nav-link.dropdown-toggle::after {
    display: inline-block !important;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    position: relative;
    z-index: 2; /* Ensure it's above any other pseudo-elements */
}

/* Custom classes added by JavaScript */
.dropdown-arrow-visible::after {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.active-dropdown::after {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* Use a brighter color for active dropdown arrows */
    border-top-color: var(--primary) !important;
}

/* Mobile navigation improvements */
@media (max-width: 991.98px) {
    /* Mobile navbar layout */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        margin-right: 0;
    }
    
    /* Center logo on mobile */
    .text-center img.custom-logo,
    .text-center a {
        max-height: 40px;
        width: auto;
        display: inline-block;
    }
    
    /* Clean hamburger button */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        color: #333;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }
    
    /* Simple, clean mobile menu */
    .navbar-collapse {
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(0,0,0,0.1);
    }
    
    /* Full width nav items on mobile */
    .navbar-nav .nav-item {
        margin: 0;
        width: 100%;
    }
    
    /* Clean list items */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        color: #333;
        display: block;
    }
    
    /* Last item has no border */
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    /* Simple active state */
    .navbar-nav .active > .nav-link,
    .navbar-nav .nav-link.active {
        color: var(--primary);
        font-weight: 600;
    }
    
    /* Override desktop active indicator */
    .navbar-nav .active > .nav-link:before,
    .navbar-nav .nav-link.active:before {
        display: none;
    }
    
    /* Mobile dropdown toggle icon positioning */
    .navbar-nav .nav-link.dropdown-toggle::after {
        float: right;
        margin-top: 8px;
        display: inline-block !important;
    }
    
    /* Clean dropdown styling */
    .navbar-nav .dropdown-menu {
        padding: 0 0 0 1rem;
        margin: 0;
        border: none;
        box-shadow: none;
        background-color: #f8f9fa;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.6rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .navbar-nav .dropdown-item:last-child {
        border-bottom: none;
    }
}

/* Page Banner */
.page-banner {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.page-banner img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.page-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Post Featured Image */
.post-featured-image {
    height: 500px;
    overflow: hidden;
}

.post-featured-image img, .archive-post-img {
    margin-right: 0.5rem;
}

/* Category and Tags */
.cat-links a,
.tags-links a {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 3px 10px;
    font-size: 0.8rem;
    border-radius: 3px;
    text-decoration: none;
}

.cat-links a {
    background-color: var(--primary);
    color: white;
}

.cat-links a:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.tags-links a {
    background-color: #f1f5f9;
    color: #64748b;
}

.tags-links a:hover {
    background-color: #e2e8f0;
    color: #334155;
    text-decoration: none;
}

/* Comments */
.comment-list {
    padding: 0;
    list-style: none;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-meta {
    margin-bottom: 0.5rem;
}

.comment-metadata {
    font-size: 0.8rem;
    color: #6c757d;
}

.comment-content {
    margin-top: 0.5rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer-widget-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Widgets */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.widget ul {
    padding-left: 0;
    list-style: none;
}

.widget ul li:last-child {
    border-bottom: none;
}

/* Search Form */
.search-form .input-group {
    border-radius: 0.25rem;
    overflow: hidden;
}

/* WooCommerce */
.woocommerce-LoopProduct-link {
    text-decoration: none !important;
}

.product-category.product {
    margin-bottom: 2rem;
}

.price {
    color: var(--primary) !important;
    font-weight: 600;
}

/* Cart Badge Styling */
.cart-count {
    transition: all 0.3s ease;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: cartBadgeUpdate 0.4s ease-in-out;
}

/* Animation for cart badge when updating */
@keyframes cartBadgeUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Cart icon hover effect */
.btn-link:hover .fa-shopping-cart {
    color: var(--primary);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .page-banner {
        height: 200px;
    }
    
    .post-featured-image {
        height: 300px;
    }
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Utilities */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

/* Animation */
.fade-in {
    animation: fadeIn ease 0.5s;
}

@keyframes fadeIn {
    0% {opacity: 0;}
    100% {opacity: 1;}
}

#menu-menu {
    width: 100%;
}

/* Account Dropdown Styling */
.dropdown-item {
    color: #555;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
    padding-left: 1.7rem;
}

/* Clean hover for all links in navigation/dropdowns */
header a, 
header a:hover,
.navbar-nav a,
.navbar-nav a:hover,
.dropdown-menu a,
.dropdown-menu a:hover,
.dropdown-item,
.dropdown-item:hover {
    text-decoration: none !important;
}

/* Blog & Single Post Styling */
/* Entry Content - blog post styling */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: #111;
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111;
}

.entry-content ul, 
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.75rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: rgba(79, 70, 229, 0.05);
    color: #444;
    font-style: italic;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 600;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.entry-content figure {
    margin: 2rem 0;
}

.entry-content figcaption {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

/* Post Author Box */
.author-box {
    border-radius: 0.5rem;
}

/* Author Social Links */
.author-social .btn {
    transition: all 0.3s ease;
}

.author-social .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Related Posts */
.card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Post Navigation Links */
.post-nav-link {
    transition: all 0.3s ease;
}

.post-nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Social Share Buttons */
.social-sharing a {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f5f5f5;
}

.social-sharing a:hover {
    background-color: var(--primary);
    color: white !important;
    transform: translateY(-2px);
}

/* Comments Styling Improvements */
.comment-list {
    margin-top: 2rem;
}

.comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author .avatar {
    margin-right: 1rem;
}

.comment-metadata {
    margin-bottom: 1rem;
}

.comment-reply-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    background-color: #f5f5f5;
    color: #555;
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    background-color: var(--primary);
    color: white;
}

.comment-respond {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-family: inherit;
    font-size: 1rem;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.comment-form textarea {
    min-height: 150px;
}

.comment-form label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.comment-form .form-submit {
    margin-top: 1.5rem;
}

/* Blog Archive */
.blog-post-card {
    transition: all 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.blog-post-card .card-img-top {
    transition: transform 0.5s ease;
}

.blog-post-card:hover .card-img-top {
    transform: scale(1.05);
}

/* No Products Found */
.no-products-found {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-products-found .card {
    max-width: 700px;
    margin: 0 auto;
}

.search-icon-circle {
    width: 80px;
    height: 80px;
    background-color: rgba(79, 70, 229, 0.1);
    border-radius: 50%;
    color: var(--primary);
    margin-bottom: 1rem;
}

.no-products-found p {
    max-width: 500px;
}

/* Responsive */
@media (max-width: 767.98px) {
    .entry-content {
        font-size: 1rem;
    }
    
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    .entry-content h3 {
        font-size: 1.3rem;
    }
}