/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* Lighthouse Accessibility fixes */

/* ===== TOUCH TARGETS - Minimum 48x48px ===== */
button,
.btn,
.nav-link,
.dropdown-toggle,
.dropdown-item,
.navbar-toggler,
.footer-link-btn,
.social-icon,
a[href^="tel:"],
a[href^="mailto:"] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Footer buttons need proper sizing */
.footer-link-btn {
    min-height: 36px;
    min-width: auto;
    padding: 0.5rem 0.75rem;
}

/* Social icons proper sizing */
.footer-social a,
.social-icons a {
    min-height: 44px;
    min-width: 44px;
}

/* Country selector items */
.country-selector .dropdown-item,
.country-selector-mobile .dropdown-item {
    min-height: 48px;
    padding: 0.75rem 1rem;
}

/* Cart link */
.cart-link {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem;
}

/* ===== CONTRAST IMPROVEMENTS ===== */
/* Ensure 4.5:1 contrast ratio for normal text */

/* Text muted - improved contrast */
.text-muted,
.section-subtitle,
.product-brand,
.footer-copyright {
    color: #525252 !important; /* From #6b7280 to #525252 for better contrast */
}

/* Price old - improved contrast on white */
.product-old-price {
    color: #6b7280 !important;
    text-decoration: line-through;
}

/* Footer text on dark background */
.footer-link-btn,
.footer-link-text,
.footer-contact span,
.footer-contact a {
    color: rgba(255, 255, 255, 0.95) !important;
}

.footer-contact i,
.footer-link-btn i {
    color: var(--accent-color, #ffc107) !important;
}

/* Navbar text contrast */
.fishing-nav .nav-link,
.navbar-brand {
    color: #ffffff !important;
}

/* Search placeholder contrast */
.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Country code contrast */
.country-selector .country-code {
    color: #ffffff !important;
}

/* ===== FOCUS STATES ===== */
/* Visible focus indicators for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--accent-color, #ffc107) !important;
    outline-offset: 2px !important;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-toggle:focus-visible {
    outline: 3px solid var(--accent-color, #ffc107) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.25);
}

/* Remove default outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color, #1a3a5c);
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* ===== HEADING HIERARCHY ===== */
/* Ensure visual hierarchy matches semantic hierarchy */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Product name as h3 */
.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.product-name a {
    color: inherit;
    text-decoration: none;
}

.product-name a:hover {
    color: var(--primary-color);
}

/* Section titles as h2 */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== SCREEN READER ONLY ===== */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== MOBILE ACCESSIBILITY ===== */
@media (max-width: 767.98px) {
    /* Larger touch targets on mobile */
    .nav-link,
    .dropdown-item {
        min-height: 48px;
        padding: 0.875rem 1rem;
    }
    
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
    }
    
    /* Add to cart button */
    .btn-add-cart,
    .btn-action {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Footer links */
    .footer-link-btn {
        min-height: 44px;
        padding: 0.625rem 0.5rem;
    }
    
    /* Social icons */
    .footer-social a {
        min-height: 48px;
        min-width: 48px;
    }
}
