/**
 * Dentalvarehuset Custom Styles
 * Brand: rgb(204, 0, 98) - Deep Pink/Magenta
 * Based on Hyvä Theme
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ========================================================================== */

:root {
    /* Brand Colors */
    --color-brand: rgb(204, 0, 98);
    --color-brand-rgb: 204, 0, 98;
    --color-brand-dark: rgb(150, 0, 70);
    --color-brand-darker: rgb(100, 0, 50);

    /* Brand Opacity Variants */
    --color-brand-5: rgba(204, 0, 98, 0.05);
    --color-brand-10: rgba(204, 0, 98, 0.1);
    --color-brand-15: rgba(204, 0, 98, 0.15);
    --color-brand-20: rgba(204, 0, 98, 0.2);
    --color-brand-30: rgba(204, 0, 98, 0.3);
    --color-brand-50: rgba(204, 0, 98, 0.5);
    --color-brand-70: rgba(204, 0, 98, 0.7);

    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Neutral Colors */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Stone / Warm Gray Colors (Porsgrund-inspired) */
    --color-stone-50: #FAFAF9;
    --color-stone-100: #F5F5F4;
    --color-stone-200: #E7E5E4;
    --color-stone-300: #D6D3D1;
    --color-stone-400: #A8A29E;
    --color-stone-500: #78716C;
    --color-stone-600: #57534E;
    --color-stone-700: #44403C;
    --color-stone-800: #292524;
    --color-stone-900: #1C1917;
    --color-charcoal: #1A1A1A;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'EB Garamond', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    --spacing-3xl: 4rem;      /* 64px */

    /* Border Radius */
    --radius-sm: 0.25rem;     /* 4px */
    --radius-md: 0.5rem;      /* 8px */
    --radius-lg: 0.75rem;     /* 12px */
    --radius-xl: 1rem;        /* 16px */
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-brand: 0 4px 14px 0 rgba(var(--color-brand-rgb), 0.25);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

* {
    box-sizing: border-box;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Text Colors */
.text-brand { color: var(--color-brand); }
.text-brand-dark { color: var(--color-brand-dark); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-gray-700 { color: var(--color-gray-700); }

/* Stone / Charcoal Text Colors */
.text-charcoal { color: var(--color-charcoal); }
.text-stone-400 { color: var(--color-stone-400); }
.text-stone-500 { color: var(--color-stone-500); }
.text-stone-600 { color: var(--color-stone-600); }

/* Background Colors */
.bg-brand { background-color: var(--color-brand); }
.bg-brand-5 { background-color: var(--color-brand-5); }
.bg-brand-10 { background-color: var(--color-brand-10); }
.bg-gray-50 { background-color: var(--color-gray-50); }
.bg-gray-100 { background-color: var(--color-gray-100); }

/* Stone / Charcoal Background Colors */
.bg-charcoal { background-color: var(--color-charcoal); }
.bg-stone-50 { background-color: var(--color-stone-50); }
.bg-stone-100 { background-color: var(--color-stone-100); }
.bg-stone-200 { background-color: var(--color-stone-200); }

/* Border Colors */
.border-brand { border-color: var(--color-brand); }
.border-gray-200 { border-color: var(--color-gray-200); }
.border-gray-300 { border-color: var(--color-gray-300); }

/* Stone Border Colors */
.border-stone-200 { border-color: var(--color-stone-200); }
.border-stone-300 { border-color: var(--color-stone-300); }

/* ==========================================================================
   BUTTON COMPONENTS
   ========================================================================== */

/* Primary Button - Brand Pink */
.btn-primary,
.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    background-color: var(--color-brand);
    border: 2px solid var(--color-brand);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover,
.btn-brand:hover {
    background-color: var(--color-brand-dark);
    border-color: var(--color-brand-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-brand);
}

.btn-primary:active,
.btn-brand:active {
    background-color: var(--color-brand-darker);
    border-color: var(--color-brand-darker);
    transform: translateY(0);
}

.btn-primary:disabled,
.btn-brand:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button - White with Brand Border */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    color: var(--color-brand);
    background-color: #ffffff;
    border: 2px solid var(--color-brand);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background-color: var(--color-brand-10);
}

/* Outline Button */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    color: var(--color-brand);
    background-color: transparent;
    border: 2px solid var(--color-brand);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    background-color: var(--color-brand);
    color: #ffffff;
}

/* Link Button */
.btn-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-brand);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.btn-link:hover {
    color: var(--color-brand-dark);
    border-bottom-color: var(--color-brand-dark);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Full Width Button */
.btn-block {
    width: 100%;
    display: flex;
}

/* Icon Button */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--color-gray-700);
}

.btn-icon:hover {
    background-color: var(--color-gray-100);
    color: var(--color-brand);
}

/* ==========================================================================
   FORM COMPONENTS
   ========================================================================== */

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-gray-900);
    background-color: #ffffff;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-10);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-gray-400);
}

/* Search Input (Larger, Prominent) */
input[type="search"].search-lg,
input.search-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-md);
}

input[type="search"].search-lg:focus,
input.search-lg:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 4px var(--color-brand-10);
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.input-group input,
.input-group select {
    border: none;
    border-radius: 0;
}

.input-group input:focus,
.input-group select:focus {
    box-shadow: none;
}

.input-group-append,
.input-group-prepend {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background-color: var(--color-gray-50);
    color: var(--color-gray-500);
    border-left: 1px solid var(--color-gray-300);
}

.input-group-prepend {
    border-left: none;
    border-right: 1px solid var(--color-gray-300);
}

/* Quantity Stepper */
.quantity-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
}

.quantity-stepper input {
    width: 3rem;
    text-align: center;
    border: none;
    border-radius: 0;
    padding: 0.5rem;
}

.quantity-stepper button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-700);
    transition: all var(--transition-fast);
}

.quantity-stepper button:hover {
    background-color: var(--color-gray-100);
    color: var(--color-brand);
}

/* Labels */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-gray-700);
}

label.required::after {
    content: " *";
    color: var(--color-error);
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-gray-700);
}

/* Error States */
input.error,
select.error,
textarea.error {
    border-color: var(--color-error);
}

input.error:focus,
select.error:focus,
textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--color-error);
}

/* ==========================================================================
   HEADER CURRENCY SELECTOR
   Plain text look with native dropdown arrow for elegant header
   ========================================================================== */

.bg-stone-100 select.currency-select,
.bg-stone-100 select:not([class*="bg-"]):not([class*="border"]) {
    display: inline !important;
    width: auto !important;
    padding: 0 !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: rgb(68, 64, 60) !important;
    background-color: transparent !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    box-shadow: none !important;
}

.bg-stone-100 select.currency-select:focus,
.bg-stone-100 select:not([class*="bg-"]):not([class*="border"]):focus {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* Header currency selector - blend with text */
.currency-select-header {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    width: 60px !important;
    height: auto !important;
    line-height: 1 !important;
    padding: 0 !important;
    padding-right: 12px !important;
    background: transparent !important;
    border: none !important;
    color: #d6d3d1 !important;
    font-size: 0.75rem !important;
    font-family: inherit !important;
    cursor: pointer !important;
}
.currency-select-header:hover {
    color: #ffffff !important;
}
.currency-select-header option {
    background: #1A1A1A !important;
    color: #d6d3d1 !important;
}

/* ==========================================================================
   CARD COMPONENTS
   ========================================================================== */

.card {
    background-color: #ffffff;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-gray-900);
}

.card-body {
    flex: 1;
}

.card-footer {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--color-gray-200);
}

/* Product Card */
.product-card {
    background-color: #ffffff;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    background-color: var(--color-gray-100);
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-content {
    padding: 1rem;
}

.product-card-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-gray-900);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-sku {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    font-family: var(--font-mono);
}

.product-card-price {
    margin-top: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-brand);
}

/* Category Card */
.category-card {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: scale(1.02);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0) 50%
    );
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.category-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

/* ==========================================================================
   BADGES & LABELS
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-full);
}

.badge-brand {
    background-color: var(--color-brand);
    color: #ffffff;
}

.badge-success {
    background-color: var(--color-success);
    color: #ffffff;
}

.badge-warning {
    background-color: var(--color-warning);
    color: #ffffff;
}

.badge-sale {
    background-color: var(--color-error);
    color: #ffffff;
}

.badge-new {
    background-color: var(--color-brand);
    color: #ffffff;
}

/* Product Label (Sticky on product image) */
.product-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--color-brand);
    border-radius: var(--radius-sm);
    z-index: 10;
}

.product-label.sale {
    background-color: var(--color-error);
}

.product-label.new {
    background-color: var(--color-success);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

/* Main Navigation */
.nav-main {
    background-color: var(--color-brand);
    color: #ffffff;
}

.nav-main a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.nav-main a:hover {
    color: #ffffff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background-color: var(--color-brand);
    color: #ffffff;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: #ffffff;
}

.footer-title {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.footer-link {
    display: block;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
}

.footer-link:hover {
    color: #ffffff;
}

.footer-bottom {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-in-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-wide {
    width: 100%;
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Section Spacing */
.section {
    padding: 4rem 0;
}

.section-sm {
    padding: 2rem 0;
}

.section-lg {
    padding: 6rem 0;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Typography Utilities */
.font-serif { font-family: var(--font-serif), Georgia, serif; }
.font-sans { font-family: var(--font-sans), -apple-system, sans-serif; }

/* Clamp font size for product titles */
.text-product {
    font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
    line-height: 1.2;
}

/* Letter spacing utilities */
.tracking-tight { letter-spacing: -0.02em; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-wider { letter-spacing: 0.08em; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Visibility Utilities */
.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;
}

/* Focus Visible for Accessibility */
.focus-visible:focus {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

/* ==========================================================================
   RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 640px) {
    .section {
        padding: 2rem 0;
    }

    .section-lg {
        padding: 3rem 0;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .hide-tablet {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .no-print {
        display: none !important;
    }
}

/* ==========================================================================
   MISSING TAILWIND UTILITIES
   ========================================================================== */

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

/* ==========================================================================
   FULL-WIDTH LAYOUT OVERRIDES - Remove sidebar constraints
   ========================================================================== */

/* Remove sidebar column constraints and make content full-width */
.page-wrapper,
.columns {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.column.main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.column.left,
.sidebar,
.sidebar-main,
.sidebar.left,
.sidebar.additional {
    display: none !important;
}

/* Page main content - full width */
.page-main {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Ensure containers use more screen real estate */
.container {
    max-width: 95% !important;
}

/* For very large screens, use even more width */
@media (min-width: 1536px) {
    .container,
    [class*="max-w-7xl"],
    [class*="max-w-6xl"],
    [class*="max-w-5xl"] {
        max-width: 95% !important;
    }
}

/* More specific overrides for full-width */
body .columns,
body .page-main > .columns {
    max-width: 100% !important;
    width: 100% !important;
    grid-template-columns: 1fr !important;
}

body .column.main {
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: 100% !important;
}

body .column.left,
body .sidebar {
    display: none !important;
}

/* Desktop-only utility - hidden by default, visible on lg screens (1024px+) */
.desktop-only {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-only {
    display: block !important;
  }
}

/* Desktop-flex utility - hidden by default, visible as flex on lg screens */
.desktop-flex {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-flex {
    display: flex !important;
  }
}

/* Tablet-up utility - visible on md screens (768px+) */
.tablet-up {
  display: none;
}

@media (min-width: 768px) {
  .tablet-up {
    display: block !important;
  }
}

/* Tablet-up-flex utility - visible as flex on md screens (768px+) */
.tablet-up-flex {
  display: none;
}

@media (min-width: 768px) {
  .tablet-up-flex {
    display: flex !important;
  }
}

/* Mobile-down utility - visible on small screens, hidden on lg (1024px+) */
.mobile-down {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-down {
    display: none !important;
  }
}

/* Mobile-down-flex utility - visible as flex on small screens, hidden on lg */
.mobile-down-flex {
  display: flex;
}

@media (min-width: 1024px) {
  .mobile-down-flex {
    display: none !important;
  }
}

/* Small-up utility - visible on sm screens (640px+) */
.small-up {
  display: none;
}

@media (min-width: 640px) {
  .small-up {
    display: inline !important;
  }
}

/* Small-up-flex utility - visible as flex on sm screens (640px+) */
.small-up-flex {
  display: none;
}

@media (min-width: 640px) {
  .small-up-flex {
    display: flex !important;
  }
}

/* Tablet-down utility - visible on small screens, hidden on md (768px+) */
.tablet-down {
  display: block;
}

@media (min-width: 768px) {
  .tablet-down {
    display: none !important;
  }
}

/* Tablet-down-flex utility - visible as flex on small screens, hidden on md */
.tablet-down-flex {
  display: flex;
}

@media (min-width: 768px) {
  .tablet-down-flex {
    display: none !important;
  }
}

/* ==========================================================================
   MEGA MENU STYLES
   ========================================================================== */

/* Premium Container - 1440px max-width for alignment */
.premium-container,
.max-w-\[1440px\] {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .premium-container,
    .max-w-\[1440px\] {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}


/* Link Underline Animation */
.link-underline {
    position: relative;
    text-decoration: none;
    color: var(--color-gray-700);
    transition: color var(--transition-fast);
}

.link-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: var(--color-brand);
    transition: width var(--transition-normal);
}

.link-underline:hover {
    color: var(--color-brand);
}

.link-underline:hover::after {
    width: 100%;
}

/* Mega Menu Scrollable */
.group:hover .group-hover\:visible {
    visibility: visible;
}

/* Custom Scrollbar for Mega Menu */
nav[aria-label="Hovedmeny"] .max-h-\[65vh\]::-webkit-scrollbar {
    width: 6px;
}

nav[aria-label="Hovedmeny"] .max-h-\[65vh\]::-webkit-scrollbar-track {
    background: var(--color-stone-100);
    border-radius: 3px;
}

nav[aria-label="Hovedmeny"] .max-h-\[65vh\]::-webkit-scrollbar-thumb {
    background: var(--color-stone-300);
    border-radius: 3px;
}

nav[aria-label="Hovedmeny"] .max-h-\[65vh\]::-webkit-scrollbar-thumb:hover {
    background: var(--color-stone-400);
}

/* Mega Menu Dropdown */
.nav-item .absolute {
    /* Ensure mega menu dropdown is above all content */
    z-index: 50;
}

/* Mobile menu backdrop blur */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Cart Badge Animation */
.cart-badge {
    animation: cartBadgeBump 0.3s ease-out;
}

@keyframes cartBadgeBump {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ==========================================================================
   MEGA MENU - 4-Column Grid Layout
   ========================================================================== */

/* Main Navigation Container */
/* Mega menu dropdown styles moved to template - no duplicates */

/* Test auto-sync - 21:43:50 */

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden !important;
}

/* ==========================================================================
   PAGE ALIGNMENT FIX - Center content with header/footer
   ========================================================================== */

/* Reset page layout containers */
body .page-wrapper {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure main content is centered like header/footer */
body .page-main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body #maincontent {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body #contentarea {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure columns container is full width and no margin */
body .columns {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Main column - full width */
body .column.main {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    flex-basis: 100% !important;
}

/* Category and product page containers */
body .category-page-container,
body .product-detail-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Remove any default sidebar from taking up space */
body .column.left {
    display: none !important;
}

/* ============================================================================
   CATEGORY AND PRODUCT PAGE ALIGNMENT
   ============================================================================ */

/* Center content with 1440px max-width like header/footer */
body.catalog-category-view .columns,
body.catalog-product-view .columns {
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* ============================================================================
   HIDE PARENT THEME CATEGORY HEADER - Our custom template handles it
   ============================================================================ */

/* Hide parent theme's category header blocks (before our custom template) */
body.catalog-category-view > .page-wrapper > .page-main > main > h1,
body.catalog-category-view > .page-wrapper > .page-main > main > .category-view {
    display: none !important;
}

/* Also hide by container ID if parent theme uses it */
body.catalog-category-view > .page-wrapper > .page-main > main > #category-view-container {
    display: none !important;
}

/* Hide parent blocks that appear before our custom template container */
body.catalog-category-view main > h1:first-of-type,
body.catalog-category-view main > .category-view:first-of-type {
    display: none !important;
}
