* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General link styling */
a {
    color: inherit;
    text-decoration: underline;
}

a:visited {
    color: inherit;
}

a:hover {
    color: inherit;
}

/* Exceptions for navigation and button links */
.nav-item a, .social-link, .logo a, .product-image, .back-to-home {
    text-decoration: none;
}

/* Generic button style used across pages */
.btn, a.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* glass base */
    background-color: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 14px 20px;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover, a.btn:hover, button.btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn:active, a.btn:active, button.btn:active {
    transform: translateY(0);
}

/* Icon inside buttons */
.btn .btn-icon {
    display: inline-flex;
    margin-right: 10px;
}
.btn .btn-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Special larger Gallery button with stronger hover */
.btn-gallery {
    padding: 20px 42px;
    font-size: 2rem;
    letter-spacing: 0.04em;
    border-width: 1px;
    min-width: 300px;
    border-radius: 16px;
}
.btn-gallery:hover {
    transform: translateY(-2px) scale(1.07);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
}
.btn-gallery:focus-visible {
    outline: 2px solid rgba(255,255,255,0.35);
    outline-offset: 2px;
    border-color: rgba(255,255,255,0.35);
}

@font-face {
    font-family: 'HelveticaLTStd Bold';
    src: url('https://db.onlinewebfonts.com/t/52fc208e73504d98d1c9c520e3fc22a5.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    padding: 0;
    padding-top: 100px; /* Add padding to account for fixed header */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #000;
    z-index: 1000;
    height: 80px;
}

.logo {
    text-align: left;
    flex: 0;
    margin-left: 0px; /* Reduced from 20px to align with header edge */
    margin-bottom: 15px; /* Match sidebar item margin-bottom */
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 0; /* Add padding similar to nav items */
    transition: color 0.2s; /* Add hover transition like nav items */
    white-space: nowrap; /* Prevent text wrapping */
}

.logo h1:hover {
    color: #aaa; /* Same hover color as nav items */
}

.top-right {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-right: 0; /* Align with right edge similar to how logo aligns with left edge */
}

.dropdown-container {
    position: relative;
}

.language-btn, .currency-btn, .agent-btn {
    background: transparent;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.language-btn:hover, .currency-btn:hover, .agent-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.agent-btn .agent-text {
    text-transform: uppercase;
}

.agent-menu .dropdown-item {
    text-transform: uppercase;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    margin-left: 3px;
    stroke: currentColor;
    fill: none;
}

.flag-icon {
    width: 20px;
    height: auto;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(20, 20, 20, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    min-width: 150px;
    z-index: 100;
    display: none;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
}

.dropdown-menu.active {
    display: block;
    animation: fadeIn 0.2s ease forwards;
}

.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    position: relative;
}

.dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.currency-symbol {
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container adjustments */
.container {
    display: flex;
    position: relative;
    min-height: calc(100vh - 100px);
    padding: 0 20px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    position: fixed;
    top: 100px; /* Position below the header */
    left: 20px;
    bottom: 20px;
    overflow: visible; /* Change from auto to visible */
    padding-right: 10px;
    display: flex;
    flex-direction: column;
}

.sidebar ul {
    list-style: none;
    overflow: visible; /* Change from auto to visible */
    padding-right: 5px;
}

.sidebar li:first-child {
    margin-bottom: 0;
    background-color: #000;
    padding-bottom: 10px;
}

.sidebar li {
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.sidebar-heading {
    font-family: 'HelveticaLTStd Bold', 'Helvetica', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-top: 15px; /* Increase from 5px to 15px to match bottom margins */
    cursor: default;
}

/* First sidebar heading should have smaller top margin */
.sidebar li:first-child + li .sidebar-heading {
    margin-top: 5px;
}

.divider {
    height: 1px;
    background-color: #333;
    margin: 15px 0; /* This is already equal, but we'll ensure consistency */
}

.search-container {
    margin-bottom: 15px;
    cursor: default;
}

.search-input {
    width: 100%;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border-radius: 12px;
}

.search-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(0, 0, 0, 0.45);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.categories-container {
    margin-bottom: 10px;
}

.category-list {
    list-style: none;
    margin-left: 5px;
}

.category-item {
    margin-bottom: 8px;
    padding: 2px 0;
    transition: color 0.2s;
    font-size: 0.8rem;
    cursor: pointer;
    position: relative;
}

.category-item:hover {
    color: #aaa;
}

.category-item.active {
    color: #fff;
}

/* Reset all underlines by default */
.category-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fff;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

/* Show underline only on hover for non-active items */
.category-item:not(.active):hover::after {
    width: 20px;
    opacity: 1;
}

/* Show underline always for active items (except "All") */
.category-item.active:not(:first-child)::after {
    width: 20px;
    opacity: 1;
}

/* Special override for the "All" category - never show underline */
.category-list li:first-child.category-item::after {
    display: none !important;
}

.nav-item {
    transition: color 0.2s;
}

.nav-item:hover {
    color: #aaa;
}

.nav-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.social-item {
    margin-bottom: 8px;
    position: relative;
    padding-left: 24px; /* Space for icon */
}

.social-link {
    display: block;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 16px;
}

.icon-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.social-icon {
    width: 16px;
    height: 16px;
    display: block;
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
    filter: brightness(0.8);
}

.social-item:hover {
    color: #fff;
}

.social-item:hover .social-icon {
    opacity: 1;
    filter: brightness(1.2) sepia(0.1) hue-rotate(10deg);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-right: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Default 2 columns for mobile */
    gap: 30px;
    flex-grow: 1;
    margin-left: 270px;
}

/* Tablet and small desktop */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on tablets */
    }
}

/* Desktop */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
    }
}

/* Adjust margin and layout for mobile */
@media (max-width: 767px) {
    .products-grid {
        margin-left: 0;
        padding: 0 15px;
    }
    
    .sidebar {
        position: fixed;
        top: 80px; /* Position below header */
        left: -270px; /* Hide off-screen by default */
        bottom: 0;
        width: 250px;
        background-color: #000;
        transition: left 0.3s ease;
        z-index: 900;
        padding: 20px;
        overflow-y: auto;
    }
    
    /* Hide currency text on mobile, show only symbol */
    .currency-text, .agent-text {
        display: none;
    }
    
    .currency-btn {
        padding: 5px;
    }
    
    .sidebar.active {
        left: 0; /* Show sidebar when active */
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }
    
    /* Overlay when menu is open */
    .menu-overlay {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 899;
        display: none;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Adjust layout for mobile */
    .container {
        flex-direction: column;
        padding: 0;
    }
    
    .products-grid {
        margin-left: 0;
        width: 100%;
        padding: 0 15px;
    }
    
    /* Center logo in mobile view */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0; /* Reset margin for mobile */
        margin-bottom: 0; /* Reset margin for mobile */
    }
    
    .logo h1 {
        font-size: 2rem; /* Slightly smaller on mobile */
    }
    
    .menu-toggle {
        display: flex; /* Show on mobile */
        justify-content: center;
        align-items: center;
    }
    
    /* Ensure other mobile header elements are properly positioned */
    .top-right {
        position: absolute;
        right: 15px;
        margin-right: 0; /* Ensure this applies to mobile too */
    }
    
    /* Reposition toast for mobile */
    .toast-container {
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        padding: 0.5rem;
    }
    
    .toast {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Fix for social icons on mobile */
    .social-item {
        margin-bottom: 15px;
        padding-left: 30px; /* More space for icon on mobile */
    }
    
    .icon-wrapper {
        width: 20px;
        height: 20px;
    }
    
    .social-icon {
        width: 20px;
        height: 20px;
    }
    
    .social-link {
        font-size: 1rem;
        line-height: 20px; /* Match the increased icon size */
    }
}

.product {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    background-color: #000;
}

.product:hover .product-image img {
    transform: scale(1.03); /* Reduced from 1.05 for a more subtle effect */
    opacity: 0.9; /* Add a subtle opacity change on hover */
}

.product-info {
    margin-top: 10px;
}

.product-name {
    margin-bottom: 5px;
    font-family: 'HelveticaLTStd-Bold', 'Helvetica', sans-serif;
    font-weight: bold;
    text-align: center;
}

.product-price {
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'HelveticaLTStd', 'Helvetica', sans-serif;
    font-weight: normal;
}

.checkout-btn {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: normal;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s ease;
    font-family: 'HelveticaLTStd', 'Helvetica', sans-serif;
}

.checkout-btn:hover {
    background-color: #ddd;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1100; /* Higher than header to ensure toasts appear above everything */
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-width: 320px;
    max-height: 100vh;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    overflow: hidden;
    padding: 1rem;
    padding-right: 1.5rem;
    border-radius: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.75rem;
    border: 1px solid #333;
    background-color: #000;
    color: #fff;
    animation: slide-in-from-left 0.3s ease forwards;
    touch-action: none;
    user-select: none;
}

.toast-content {
    display: grid;
    gap: 0.25rem;
    width: 100%;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.toast-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

.toast-description a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
    transition: opacity 0.2s;
}

.toast-description a:hover {
    opacity: 0.8;
}

.toast-close {
    position: absolute;
    right: 0.25rem;
    top: 0.25rem;
    padding: 0.25rem;
    border-radius: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.toast:hover .toast-close {
    opacity: 1;
}

.toast-close:hover {
    color: rgba(255, 255, 255, 1);
}

.toast-close:focus {
    opacity: 1;
    outline: none;
}

@keyframes slide-in-from-left {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-in-from-bottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Use slide from left animation for all screen sizes */
.toast {
    animation: slide-in-from-left 0.3s ease forwards;
}

/* Override the previous media query that changed animation on larger screens */
@media (min-width: 640px) {
    .toast {
        animation: slide-in-from-left 0.3s ease forwards;
    }
}

/* Loading indicator for lazy loading */
.loading-indicator {
    text-align: center;
    padding: 50px 0;
    width: 100%;
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer credits */
.footer-credits {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #333;
    font-size: 0.8rem;
    color: #666;
    font-family: 'HelveticaLTStd', 'Helvetica', sans-serif;
    width: 100%;
}

.footer-credits a {
    color: #999;
}

/* Menu toggle button styles */
.menu-toggle {
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    cursor: pointer;
    padding: 10px;
    display: none; /* Hidden by default */
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1010;
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.menu-toggle svg {
    width: 30px;
    height: 30px;
    display: block;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: flex; /* Show on mobile */
        justify-content: center;
        align-items: center;
    }
    
    /* Ensure other mobile header elements are properly positioned */
    .top-right {
        position: absolute;
        right: 15px;
        margin-right: 0; /* Ensure this applies to mobile too */
    }
}

/* Add to ensure body can't scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2px;
    transition: transform 0.2s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Mobile adjustments for back to top button */
@media (max-width: 767px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* KakoBuy Registration Button */
.kakobuy-register {
    display: block;
    padding: 8px 10px; /* Even smaller padding */
    margin: 5px 0; /* Reduced margin */
    background-color: #000;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-family: 'HelveticaLTStd-Bold', 'Helvetica', sans-serif;
    font-size: 0.85rem; /* Smaller font */
    text-transform: uppercase;
    border: 2px solid #333; /* Match website's color scheme */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(51, 51, 51, 0.4); /* Subtle glow matching border */
}

.kakobuy-register:hover {
    background-color: rgba(51, 51, 51, 0.2);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3); /* Subtle red glow on hover */
    border-color: #666; /* Lighter border on hover */
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 3px rgba(231, 76, 60, 0.3); /* Subtle red text glow */
}

.kakobuy-register::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(231, 76, 60, 0.1); /* Slight red tint in the animation */
    transform: rotate(30deg);
    transition: all 0.5s ease;
}

.kakobuy-register:hover::after {
    left: 130%;
}

/* Product container with fixed dimensions for uniform appearance */
.product-container {
    position: relative;
    width: 100%;
    height: 300px; /* Fixed height container for all product images */
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background-color: #000;
}

.product-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed to contain to show full image */
    transition: transform 0.3s ease;
}

/* Styling for already reported buttons */
.report-dead-link.already-reported {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.report-dead-link.already-reported svg {
    fill: rgba(255, 0, 0, 0.3);
    stroke: rgba(255, 0, 0, 0.3);
}