/* static/css/base.css - MOBILE-FIRST Base styles with scroll navbar */

/* ========================================
   RESET & BASE STYLES - MOBILE (320px+)
   ======================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    border-left: 3px solid #009D94;
    border-right: 3px solid #009D94;
    min-height: 100vh;
    padding-top: 65px;
}

/* Prevent body scroll when cart is open */
body.cart-open {
    overflow: hidden;
}

/* ===== NAVBAR - MOBILE FIRST WITH SCROLL BEHAVIOR ===== */
.navbar {
    background-color: #009D94;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    padding: 6px 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    color: #0d3b66;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    
    /* Scroll behavior transitions */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Scroll states */
.navbar-scrollable {
    /* Ready for scroll behavior */
}

.navbar-hidden {
    transform: translateY(-100%);
}

.navbar-visible {
    transform: translateY(0);
}

.navbar-locked {
    transform: translateY(0) !important;
}

/* Enhanced shadow when scrolled */
.navbar-scrollable:not(.navbar-hidden) {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.navbar-left {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo {
    height: 45px;
    width: 45px;
    margin-right: 8px;
    border-radius: 4px;
}

.brand {
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #0d3b66;
    margin-left: 4px;
}

/* Header Trust Badges - Hidden on mobile */
.header-trust-badges {
    display: none;
}

.trust-badge-link {
    display: inline-block;
    transition: transform 0.2s ease;
}

.trust-badge-link:hover {
    transform: scale(1.05);
}

.trust-badge {
    height: 24px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Navbar Center - Navigation */
.navbar-center {
    justify-self: center;
}

/* Hamburger Menu - Visible on mobile */
.hamburger {
    color: #0d3b66;
    background: rgba(13, 59, 102, 0.1);
    border-radius: 8px;
    padding: 8px;
    border: none;
    cursor: pointer;
    display: block;
    min-width: 44px;
    min-height: 44px;
}

.hamburger:hover {
    background: rgba(13, 59, 102, 0.2);
}

.hamburger-icon {
    height: 24px;
    width: 24px;
}

/* Desktop Nav - Hidden on mobile */
.desktop-nav {
    display: none;
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 65px;
    left: 12px;
    right: 12px;
    background-color: #008080;
    border: 2px solid #0d3b66;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    z-index: 1000;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: #0d3b66;
    padding: 14px 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(13, 59, 102, 0.2);
    transition: background-color 0.2s;
    font-size: 15px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    background-color: rgba(13, 59, 102, 0.1);
}

/* Navbar Right - Cart */
.navbar-right {
    justify-self: end;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: #009D94;
    color: white;
    padding: 24px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-text {
    text-align: center;
}

.footer-text p {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

/* Footer Navigation - Mobile First */
.footer-navigation {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-nav-section {
    text-align: center;
}

.footer-nav-title {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-links li {
    margin: 0.5rem 0;
}

.footer-nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-nav-links a:hover {
    color: #ffffff;
}

/* Footer Trust Badges - Bottom Position */
.footer-trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
}

.footer-trust-badge-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-trust-badge-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.footer-trust-badge {
    height: 30px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ===== UTILITY CLASSES ===== */
.page-title {
    font-size: 1.7rem;
    margin-bottom: 24px;
    color: #0d3b66;
    text-align: center;
    font-weight: bold;
}

/* ===== BUTTON STYLES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: #009D94;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== CART NOTIFICATIONS ===== */
.cart-notification {
    position: fixed;
    top: 70px;
    right: 10px;
    left: 10px;
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: none;
    font-size: 0.9rem;
}

.cart-notification.success {
    background: #10b981;
}

.cart-notification.error {
    background: #ef4444;
}

.cart-notification.show {
    transform: translateX(0);
}

/* ===== SITEJABBER SECTION ===== */
.sitejabber-section {
    margin: 1.5rem 0;
    text-align: center;
}

.sitejabber-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
}

.sitejabber-fallback {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
}

.review-prompt h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.review-prompt p {
    color: #e5e7eb;
    font-size: 13px;
    margin-bottom: 12px;
}

.review-link {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.review-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.stjr-badge {
    transition: opacity 0.3s ease;
}

/* ===== ACCESSIBILITY ===== */

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 10000;
    background: #009D94;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* Focus indicators - enhanced */
.navbar *:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    border-radius: 4px;
}

.desktop-nav a:focus-visible {
    outline: 2px solid #0d3b66;
    outline-offset: 4px;
}

button:focus-visible {
    outline: 3px solid rgba(13, 59, 102, 0.6);
    outline-offset: 2px;
}

/* Ensure navbar is visible when any interactive element has focus */
.navbar:focus-within {
    transform: translateY(0) !important;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    80% {
        transform: translateY(-1px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   SMALL PHONES (480px+)
   ======================================== */
@media (min-width: 480px) {
    .navbar {
        padding: 8px 12px;
    }
    
    .brand {
        font-size: 1.3rem;
    }
    
    .logo {
        height: 48px;
        width: 48px;
    }
    
    .cart-notification {
        right: 10px;
        left: auto;
        max-width: 300px;
    }
    
    .footer-navigation {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .sitejabber-fallback {
        padding: 15px;
    }
    
    .review-prompt h4 {
        font-size: 17px;
    }
    
    .review-prompt p {
        font-size: 14px;
    }
    
    .footer-trust-badge {
        height: 35px;
    }
}

/* ========================================
   TABLETS (768px+)
   ======================================== */
@media (min-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .navbar {
        padding: 10px 15px;
    }
    
    .navbar-left {
        gap: 12px;
    }
    
    .logo {
        height: 50px;
        width: 50px;
        margin-right: 12px;
    }
    
    .brand {
        font-size: 1.4rem;
        margin-left: 8px;
    }
    
    /* Show header badges on tablet+ */
    .header-trust-badges {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .trust-badge {
        height: 28px;
    }
    
    .mobile-menu {
        top: 70px;
        left: 15px;
        right: 15px;
    }
    
    .mobile-menu a {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .main-content {
        margin: 40px auto;
        padding: 0 20px;
    }
    
    .page-title {
        font-size: 2rem;
        margin-bottom: 32px;
    }
    
    .footer-navigation {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        margin-bottom: 2.5rem;
    }
    
    .footer-nav-section {
        text-align: left;
    }
    
    .footer-nav-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-nav-links a {
        font-size: 0.9rem;
    }
    
    .footer-trust-badges {
        gap: 20px;
        margin: 2rem 0;
    }
    
    .footer-trust-badge {
        height: 40px;
    }
    
    .sitejabber-section {
        margin: 2rem 0;
    }
    
    .sitejabber-container {
        max-width: 400px;
        padding: 0;
    }
    
    .sitejabber-fallback {
        padding: 20px;
    }
    
    .review-prompt h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .review-prompt p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .review-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ========================================
   DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {
    .navbar {
        padding: 12px 20px;
    }
    
    .navbar-left {
        gap: 16px;
    }
    
    .brand {
        font-size: 1.6rem;
    }
    
    .trust-badge {
        height: 32px;
    }
    
    /* Hide hamburger, show desktop nav */
    .hamburger {
        display: none;
    }
    
    .desktop-nav {
        display: flex;
        gap: 2rem;
    }
    
    .desktop-nav a {
        color: #0d3b66;
        font-weight: 500;
        text-decoration: none;
        padding: 8px 16px;
        border-radius: 6px;
        transition: background-color 0.2s;
    }
    
    .desktop-nav a:hover {
        background-color: rgba(13, 59, 102, 0.1);
    }
    
    .cart-notification {
        right: 20px;
        padding: 1rem 1.5rem;
        max-width: 300px;
        font-size: 1rem;
    }
    
    .site-footer {
        padding: 32px 0;
        margin-top: 60px;
    }
    
    .footer-content {
        padding: 0 20px;
    }
    
    .footer-text p {
        font-size: 0.9rem;
    }
    
    .footer-navigation {
        gap: 3rem;
    }
}

/* ========================================
   VERY SMALL SCREENS (320px)
   ======================================== */
@media (max-width: 320px) {
    .header-trust-badges {
        display: none !important;
    }
    
    .brand {
        font-size: 1.1rem;
    }
    
    .logo {
        height: 40px;
        width: 40px;
    }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .navbar,
    .mobile-menu {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar,
    .site-footer {
        border: 2px solid currentColor;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}