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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 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: 20px;
    flex-grow: 1;
    margin-left: 270px;
    padding: 0 15px;
}

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

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

/* Gallery page: responsive column layout */
/* Base/Desktop default - 4 columns */
.gallery-page .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
    padding: 0 20px;
    margin-left: 270px;
    width: calc(100% - 270px);
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Gallery page: Small tablets - 3 columns */
@media (min-width: 600px) and (max-width: 767px) {
    .gallery-page .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
        padding: 0 15px;
        margin-left: 0;
        width: 100%;
    }
}

/* Gallery page: Laptop and medium displays - 4 columns */
@media (min-width: 768px) and (max-width: 1399px) {
    .gallery-page .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 25px;
        padding: 0 20px;
    }
}

/* Gallery page: Larger displays - 5 columns */
@media (min-width: 1400px) {
    .gallery-page .products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 30px;
        padding: 0 30px;
    }
}

/* Adjust margin and layout for mobile */
@media (max-width: 767px) {
    .products-grid {
        margin-left: 0;
        padding: 0 12px;
        gap: 15px;
    }
    
    /* Gallery page mobile - optimized spacing */
    .gallery-page .products-grid {
        margin-left: 0;
        width: 100%;
        padding: 0 12px;
        gap: 15px;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .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;
    padding: 0;
    width: 100%; /* Ensure product stays within grid cell */
    box-sizing: border-box;
    overflow: hidden; /* Prevent content from extending outside */
}

.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;
    padding: 0; /* No padding - let children control their own spacing */
    box-sizing: border-box;
    overflow: hidden; /* Ensure no text escapes the product card */
    width: 100%;
}

/* Container for product name - allows full single-line text by default */
.product-name-container {
    position: relative;
    overflow: visible; /* Allow single-line text to show fully */
    width: 100%;
    margin-bottom: 8px;
    font-family: 'HelveticaLTStd-Bold', 'Helvetica', sans-serif;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1.2em;
    line-height: 1.2;
    padding: 0 4px; /* Reduced padding for more space */
    box-sizing: border-box;
}

/* Inner text element - by default shows full text on single line */
.product-name-inner {
    display: inline-block;
    white-space: nowrap;
    max-width: none; /* No constraint by default - show full text */
    overflow: visible; /* Allow text to show beyond container if single line */
    text-overflow: clip; /* No ellipsis by default */
    position: relative;
    padding: 0 2px;
}

/* When text-overflow class is added (actually wraps to 2+ rows), enable ellipsis */
.product-name-container.text-overflow {
    overflow: hidden; /* Hide overflow for multi-line text */
}

.product-name-container.text-overflow .product-name-inner {
    max-width: 100%; /* Constrain to container width */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Show ellipsis */
    white-space: nowrap; /* Force single line */
}

/* When product is hovered and text overflows, enable LED-board style scrolling after 0.55s delay */
.product:hover .product-name-container.text-overflow {
    text-align: left; /* Align left for scrolling animation */
    justify-content: flex-start;
    overflow: hidden; /* Always hide overflow during animation */
}

.product:hover .product-name-container.text-overflow .product-name-inner {
    animation: ledScroll 9s ease-in-out 0.55s infinite;
    text-overflow: clip;
    max-width: none;
    overflow: visible; /* Allow text to extend for animation, but container clips it */
    padding-right: 40px; /* Add space at the end for gap before loop */
    display: inline-block;
    will-change: transform; /* Optimize animation performance */
}

/* LED board style continuous scroll animation - scrolls from left to right (text moves left) */
@keyframes ledScroll {
    0%, 10% {
        transform: translateX(0);
    }
    45%, 55% {
        transform: translateX(calc(-100% + 100px));
    }
    90%, 100% {
        transform: translateX(0);
    }
}

/* Stop animation immediately when not hovering */
.product:not(:hover) .product-name-inner {
    animation: none !important;
    transform: translateX(0) !important;
}

.product-price {
    color: #fff;
    margin-bottom: 8px;
    text-align: center;
    font-family: 'HelveticaLTStd', 'Helvetica', sans-serif;
    font-weight: normal;
    line-height: 1.4;
    padding: 4px 8px; /* Add horizontal padding to text only */
    box-sizing: border-box;
}

.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);
}

/* Smart search suggestions dropdown */
.search-dropdown {
    position: fixed;
    z-index: 1200;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    background: rgba(12, 12, 14, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    color: #fff;
}

.search-dropdown[hidden] {
    display: none !important;
}

.search-dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.search-dropdown-backdrop[hidden] {
    display: none !important;
}

html.search-menu-open,
body.search-menu-open {
    overflow: hidden;
}

.search-dropdown--modal {
    top: 50%;
    left: 50%;
    right: auto;
    width: min(560px, calc(100vw - 32px));
    max-height: min(78vh, 640px);
    transform: translate(-50%, -50%);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.search-dropdown-modal-head {
    flex-shrink: 0;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-dropdown-modal-title {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
}

.search-dropdown-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    outline: none;
}

.search-dropdown-modal-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.09);
}

.search-dropdown-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    max-height: none;
}

.search-dropdown-empty {
    padding: 18px 12px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    text-align: center;
}

.search-dropdown-section + .search-dropdown-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.search-dropdown-heading {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 4px 8px 6px;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
}

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

.search-dropdown-thumb {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
}

.search-dropdown-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .search-dropdown:not(.search-dropdown--modal) {
        left: 8px !important;
        right: 8px;
        width: auto !important;
        max-width: calc(100vw - 16px);
    }

    .search-dropdown--modal {
        width: calc(100vw - 24px);
        max-height: min(85vh, 680px);
    }
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 20000;
    padding: 10px 14px;
    transform: translateY(-160%);
    color: #050505;
    background: #f2f0ea;
    border: 2px solid #050505;
    text-decoration: none;
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: 2px solid #f2f0ea;
    outline-offset: 2px;
}

body.home-page,
body.gallery-page {
    color-scheme: dark;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

body.home-page button,
body.home-page input,
body.gallery-page button,
body.gallery-page input {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
}

body.home-page a,
body.home-page button,
body.gallery-page a,
body.gallery-page button {
    touch-action: manipulation;
}

/* Gallery search dock selected from Product Design option three. */
body.gallery-page {
    --gallery-rail-width: 274px;
    --gallery-ink: #f2f0ea;
    --gallery-muted: #aaa79f;
    --gallery-line: rgba(242, 240, 234, 0.18);
    --gallery-line-strong: rgba(242, 240, 234, 0.42);
    --gallery-surface: rgba(255, 255, 255, 0.024);
    --gallery-accent: #b4a27c;
    min-height: 100vh;
    padding-top: 81px;
    color: var(--gallery-ink);
    background:
        radial-gradient(circle at 76% 8%, rgba(255, 255, 255, 0.045), transparent 30%),
        radial-gradient(circle at 34% 72%, rgba(180, 162, 124, 0.035), transparent 30%),
        #050505;
    font-family: 'HelveticaLTStd', 'Helvetica Neue', sans-serif;
}

.gallery-page > header {
    height: 81px;
    padding: 0 26px;
    background: rgba(5, 5, 5, 0.92);
    border-bottom: 1px solid var(--gallery-line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.gallery-page .menu-toggle {
    width: auto;
    min-width: 58px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--gallery-line);
    border-radius: 2px;
    background: transparent;
    color: var(--gallery-ink);
}

.gallery-page .menu-toggle-label {
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.gallery-page .logo {
    margin: 0;
}

.gallery-page .gallery-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--gallery-ink);
    text-decoration: none;
}

.gallery-page .gallery-brand-mark {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.gallery-page .gallery-brand span {
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 1.08rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.gallery-page .top-right {
    gap: 10px;
}

.gallery-page .dropdown-icon {
    width: 17px;
    height: 17px;
}

.gallery-page .currency-btn,
.gallery-page .agent-btn {
    min-height: 46px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--gallery-ink);
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
}

.gallery-page .currency-btn:hover,
.gallery-page .currency-btn:focus-visible,
.gallery-page .agent-btn:hover,
.gallery-page .agent-btn:focus-visible {
    border-color: var(--gallery-line);
    background: var(--gallery-surface);
}

.gallery-page .dropdown-menu {
    margin-top: 10px;
    border-color: var(--gallery-line);
    border-radius: 2px;
    background: rgba(8, 8, 8, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62);
}

.gallery-page .dropdown-item {
    min-height: 44px;
    padding: 11px 15px;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
}

.gallery-page .container {
    display: block;
    width: 100%;
    min-height: calc(100vh - 81px);
    padding: 0;
}

.gallery-page .sidebar {
    position: fixed;
    top: 81px;
    bottom: 0;
    left: 0;
    width: var(--gallery-rail-width);
    padding: 28px 24px 42px;
    overflow-y: auto;
    z-index: 850;
    background: rgba(6, 6, 6, 0.96);
    border-right: 1px solid var(--gallery-line);
}

.gallery-page .sidebar nav ul {
    display: block;
}

.gallery-page .sidebar li {
    width: 100%;
}

.gallery-page .sidebar-heading {
    margin: 24px 0 12px;
    color: var(--gallery-muted);
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.gallery-page .sidebar .divider {
    margin: 22px 0;
    border-color: var(--gallery-line);
}

.gallery-page .sidebar .nav-item a,
.gallery-page .sidebar .social-link,
.gallery-page .category-name,
.gallery-page .subcategory-name {
    color: rgba(242, 240, 234, 0.72);
    font-size: 0.9rem;
}

.gallery-page .sidebar .nav-item a:hover,
.gallery-page .sidebar .nav-item a:focus-visible,
.gallery-page .sidebar .social-link:hover,
.gallery-page .sidebar .social-link:focus-visible,
.gallery-page .category-item:hover .category-name,
.gallery-page .category-item.active .category-name {
    color: var(--gallery-ink);
}

.gallery-page .kakobuy-register {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    color: var(--gallery-ink);
    border: 1px solid var(--gallery-line-strong);
    border-radius: 2px;
    background: transparent;
    box-shadow: none;
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gallery-page .kakobuy-register::after {
    display: none;
}

.gallery-page .kakobuy-register:hover,
.gallery-page .kakobuy-register:focus-visible {
    color: #fff;
    border-color: var(--gallery-ink);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
}

.gallery-page .gallery-content {
    width: calc(100% - var(--gallery-rail-width));
    min-width: 0;
    margin-left: var(--gallery-rail-width);
    padding: 28px 0 0;
}

.gallery-page .gallery-search-dock {
    margin: 0 32px 28px;
    padding: clamp(20px, 2.3vw, 32px);
    display: grid;
    grid-template-columns: minmax(240px, 0.92fr) minmax(320px, 1.08fr);
    align-items: center;
    gap: clamp(28px, 3.5vw, 52px);
    border: 1px solid var(--gallery-line);
    background:
        radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.04), transparent 34%),
        rgba(0, 0, 0, 0.34);
}

.gallery-page .gallery-search-kicker {
    margin: 0 0 8px;
    color: var(--gallery-accent);
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.gallery-page .gallery-search-copy h2 {
    max-width: 440px;
    margin: 0;
    color: var(--gallery-ink);
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: clamp(1.65rem, 2.45vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.gallery-page .gallery-search-copy > p:last-child {
    max-width: 400px;
    margin: 12px 0 0;
    color: var(--gallery-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.gallery-page .gallery-search-control label {
    display: block;
    margin-bottom: 9px;
    color: var(--gallery-muted);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.gallery-page .gallery-search-dock .search-container {
    position: relative;
    margin: 0;
    padding: 0;
}

.gallery-page .gallery-search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    z-index: 1;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    pointer-events: none;
    transform: translateY(-50%);
}

.gallery-page .gallery-search-icon img {
    display: block;
    width: 20px;
    height: 20px;
    opacity: 0.78;
}

.gallery-page .gallery-search-dock .search-input {
    width: 100%;
    height: 56px;
    padding: 0 18px 0 52px;
    border: 1px solid var(--gallery-line-strong);
    border-radius: 2px;
    outline: 2px solid transparent;
    outline-offset: 2px;
    background: rgba(0, 0, 0, 0.56);
    color: var(--gallery-ink);
    font-family: 'HelveticaLTStd', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
}

.gallery-page .gallery-search-dock .search-input::placeholder {
    color: rgba(242, 240, 234, 0.42);
}

.gallery-page .gallery-search-dock .search-input:focus-visible {
    border-color: var(--gallery-ink);
    outline-color: var(--gallery-ink);
    box-shadow: 0 0 0 1px rgba(242, 240, 234, 0.14);
}

.gallery-page .gallery-search-note {
    margin: 8px 0 0;
    color: rgba(242, 240, 234, 0.42);
    font-size: 0.74rem;
    line-height: 1.45;
}

.gallery-page .products-grid {
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding: 0 30px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    overflow: visible;
}

.gallery-page .product {
    margin-bottom: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.gallery-page .product-container {
    height: auto;
    aspect-ratio: 1 / 1.06;
    border-radius: 0;
    background: #050505;
    border-bottom: 0;
}

.gallery-page .product-image {
    background: #050505;
}

/* Preview-only comparison state. The control that enables this is injected only on local/preview hosts. */
.gallery-page.gallery-show-product-frames .product {
    border: 1px solid var(--gallery-line);
    border-radius: 2px;
    background: rgba(7, 7, 7, 0.82);
}

.gallery-page.gallery-show-product-frames .product-container {
    background: #080808;
    border-bottom: 1px solid var(--gallery-line);
}

.gallery-page.gallery-show-product-frames .product-image {
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.035), transparent 68%),
        #080808;
}

.gallery-page .gallery-border-toggle {
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--gallery-line);
    border-radius: 2px;
    background: transparent;
    color: var(--gallery-ink);
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.gallery-page .gallery-border-toggle:hover,
.gallery-page .gallery-border-toggle:focus-visible,
.gallery-page .gallery-border-toggle[aria-pressed="true"] {
    border-color: var(--gallery-line-strong);
    background: var(--gallery-surface);
}

.gallery-page .product-image img {
    padding: 8px;
}

.gallery-page .product-info {
    margin-top: 0;
    padding: 14px;
}

.gallery-page .product-name-container {
    min-height: 1.25em;
    margin-bottom: 7px;
    padding: 0;
    justify-content: flex-start;
    overflow: hidden;
    font-size: 0.82rem;
}

.gallery-page .product-name-inner {
    display: block;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-page .product-price {
    justify-content: flex-start;
    margin-bottom: 12px;
    color: var(--gallery-ink);
    font-size: 0.9rem;
}

.gallery-page .product-buttons {
    gap: 8px;
}

.gallery-page .product-link-btn,
.gallery-page .product-agent-btn {
    min-height: 40px;
    border-radius: 2px !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.gallery-page .footer-credits {
    width: calc(100% - var(--gallery-rail-width));
    margin-left: var(--gallery-rail-width);
    padding: 42px 30px 28px;
    color: rgba(242, 240, 234, 0.44);
    border-top: 0;
    font-size: 0.72rem;
}

.gallery-page .back-to-top {
    border-color: var(--gallery-line);
    border-radius: 2px;
    background: rgba(7, 7, 7, 0.92);
}

.gallery-page .search-dropdown:not(.search-dropdown--modal) {
    padding: 10px;
    border-color: var(--gallery-line-strong);
    border-radius: 2px;
    background: rgba(7, 7, 7, 0.985);
    box-shadow: 0 26px 74px rgba(0, 0, 0, 0.7);
}

.gallery-page .search-dropdown-heading {
    color: var(--gallery-accent);
    font-family: 'HelveticaLTStd-Bold', 'Helvetica Neue', sans-serif;
    letter-spacing: 0.14em;
}

.gallery-page .search-dropdown-item {
    min-height: 44px;
    border-radius: 2px;
}

.gallery-page .search-dropdown-item:hover,
.gallery-page .search-dropdown-item.is-active {
    background: rgba(255, 255, 255, 0.065);
}

.gallery-page .search-dropdown-thumb {
    width: 34px;
    height: 34px;
    border-radius: 2px;
}

@media (min-width: 1500px) {
    .gallery-page .products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .gallery-page .gallery-search-dock {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-page .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
        padding: 0 22px;
    }
}

@media (max-width: 767px) {
    body.gallery-page {
        padding-top: 74px;
    }

    .gallery-page > header {
        height: 74px;
        padding: 0 12px;
    }

    .gallery-page .logo {
        left: 50%;
    }

    .gallery-page .gallery-brand {
        gap: 7px;
    }

    .gallery-page .gallery-brand-mark {
        width: 40px;
        height: 40px;
    }

    .gallery-page .gallery-brand span {
        font-size: 0.78rem;
        letter-spacing: 0.1em;
    }

    .gallery-page .top-right {
        right: 10px;
        gap: 2px;
    }

    .gallery-page .currency-btn,
    .gallery-page .agent-btn {
        min-height: 38px;
        padding: 0 8px;
    }

    .gallery-page .gallery-border-toggle {
        min-height: 38px;
        padding: 0 8px;
        font-size: 0.57rem;
    }

    .gallery-page .sidebar {
        top: 74px;
        left: min(-86vw, -320px);
        width: min(86vw, 320px);
        padding: 24px 22px 38px;
        border-right: 1px solid var(--gallery-line-strong);
    }

    .gallery-page .sidebar.active {
        left: 0;
    }

    .gallery-page .menu-overlay {
        top: 74px;
        background: rgba(0, 0, 0, 0.78);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .gallery-page .gallery-content {
        width: 100%;
        margin-left: 0;
        padding-top: 18px;
    }

    .gallery-page .gallery-search-dock {
        margin: 0 12px 24px;
        padding: 18px 16px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-page .gallery-search-copy h2 {
        font-size: clamp(1.7rem, 8.5vw, 2.3rem);
    }

    .gallery-page .gallery-search-copy > p:last-child {
        margin-top: 10px;
    }

    .gallery-page .gallery-search-dock .search-input {
        height: 52px;
        padding: 0 14px 0 46px;
        font-size: 0.9rem;
    }

    .gallery-page .gallery-search-icon {
        left: 15px;
        width: 18px;
        height: 18px;
    }

    .gallery-page .gallery-search-icon img {
        width: 18px;
        height: 18px;
    }

    .gallery-page .products-grid {
        width: 100%;
        margin-left: 0;
        padding: 0 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gallery-page .product-info {
        padding: 11px;
    }

    .gallery-page .product-name-container {
        font-size: 0.72rem;
    }

    .gallery-page .product-price {
        font-size: 0.8rem;
    }

    .gallery-page .product-link-btn,
    .gallery-page .product-agent-btn {
        min-height: 36px;
        padding: 8px 6px !important;
        font-size: 0.57rem !important;
    }

    .gallery-page .footer-credits {
        width: 100%;
        margin-left: 0;
        padding: 34px 16px 22px;
    }

    .gallery-page .search-dropdown:not(.search-dropdown--modal) {
        left: 8px !important;
        right: 8px;
        width: auto !important;
    }
}

@media (max-width: 430px) {
    .gallery-page .gallery-brand span {
        display: none;
    }

    .gallery-page .gallery-brand-mark {
        width: 40px;
        height: 40px;
    }
}
