/* ===== Common Styles for All Pages ===== */

body {
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigation */
nav {
    background: linear-gradient(135deg, #0066cc 0%, #004fa3 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 100;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.logo::before {
    content: '🏄';
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1 0 auto;
    align-items: center;
    min-width: 0;
    overflow: visible; /* Ensure dropdown is not clipped */
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-item {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    position: relative;
    z-index: 1001;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 800px;
    max-width: 90vw;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    z-index: 10000;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    pointer-events: none;
}

.dropdown-menu.active,
.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
    pointer-events: auto;
}

.nav-item:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
    border-left-color: #667eea;
    padding-left: 2rem;
}

.dropdown-column {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.dropdown-column:not(:last-child) {
    border-right: 1px solid #eee;
    padding-right: 1rem;
}

.dropdown-column:not(:first-child) {
    padding-left: 1rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.dropdown-item.main-category {
    font-weight: 600;
    border-bottom: 1px solid #eee;
    color: #333;
    padding: 0.8rem 1.5rem !important;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.dropdown-item.main-category:hover {
    background: #f5f5f5;
}

.dropdown-item.subcategory {
    padding-left: 3rem !important;
    font-size: 0.95rem;
    color: #666;
}

.dropdown-item:hover {
    background: #f5f5f5;
    border-left-color: #667eea;
    padding-left: 2rem;
}

.dropdown-icon {
    font-size: 1.5rem;
}

/* Cart */
.cart-icon {
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-icon-link {
    color: white;
    text-decoration: none;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.language-btn.active {
    background: white;
    color: #0066cc;
    border-color: white;
}

/* Footer Styles */
footer {
    background: #222;
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4, .footer-section h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-contact-info {
    line-height: 1.8;
}

.footer-contact-info a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-contact-info a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 2rem;
    text-align: center;
    color: #999;
}

@media (max-width: 768px) {
    .footer-content {
        text-align: center;
    }
}
