/*
To change this license xxheader, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 2019-sep-23, 16:55:35
    Author     : Mats
*/

/*@media (min-width: 24em) {
    .card-columns {
        -webkit-column-count: 3;
        -moz-column-count: 3;
        column-count: 3;
    }
}*/
.message.required {
    color: red !important
}

html,
body {
    background-color: #F2F2F2;
    margin: 0;
    padding: 0;
}

#MemberLoginForm_LoginForm_Remember_Holder {
    display: none
}

/*#MemberLoginForm_LoginForm_Remember {display: none}*/
p#ForgotPassword {
    position: absolute;
    right: 20px;
}

#MemberLoginForm_LoginForm_action_doLogin {
    /*margin-top: 50px;*/
    margin-bottom: 20px;

}

a.link {
    color: #0f4c81;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

a.link:hover {
    color: #0d3f6b;
    text-decoration: underline;
}

.navbar {
    background-position: -1px 0px;
    /*background: url(/resources/themes/ALNtheme/images/wideALNlogo.png);*/
    /*background-repeat-x: no-repeat;*/
    background-repeat: no-repeat;
    /*background-size:contain;*/
    background-size: cover;
    min-height: 140px;
    /*min-height: 12vh;*/
    margin-bottom: 0px;
    background-color: #FFF;

    max-width: 1140px;
    background-image: url(/resources/themes/ALNtheme/images/wideALNlogo.png);
    margin: 0 auto;

}

@media (max-width: 767px) {
    .navbar {
        background-size: initial;
        height: 160px;
    }

}

.navbar-toggler {
    position: absolute;
    right: 0px;
    top: 0px;
}

.collapse.show {
    display: block;
    margin-top: 101px;
    background-color: #FFF;
    z-index: 999;
    border-bottom: 1px solid;
    margin-bottom: 10px;
    padding-bottom: 45px;
}

.nav-link {
    white-space: nowrap;
}

.main {
    /*background-color: #FFF   ;*/
    min-height: 80vh;
    background-color: #F2F2F2;
}

.main .container {
    /*background-color: #FFF   ;*/
    min-height: 80vh;
    background-color: #FFF;
    /*padding: 10px*/
}

@media (min-width: 12em) {
    .card-columns {
        -webkit-column-count: 3;
        -moz-column-count: 3;
        column-count: 3;
    }
}

@media (min-width: 62em) {
    .card-columns {
        -webkit-column-count: 4;
        -moz-column-count: 4;
        column-count: 4;
    }
}

@media (min-width: 75em) {
    .card-columns {
        -webkit-column-count: 5;
        -moz-column-count: 5;
        column-count: 5;
    }
}

@media (min-width: 100em) {
    .card-columns {
        -webkit-column-count: 6;
        -moz-column-count: 6;
        column-count: 6;
    }
}

.img-wrapper {
    position: relative;
    /*margin-bottom: 10px;*/
}

.img-responsive {
    width: 100%;
    height: auto;
}

.img-overlay {
    position: absolute;
    /*bottom: 8px;*/
    top: 60px;
    right: 8px;
    text-align: center;
}

.img-overlay:before {
    content: ' ';
    display: block;
    /* adjust 'height' to position overlay content vertically */
    height: 50%;
}

.btn-circle {
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 0;
    border: none;
    border-radius: 50%;
}

.btn-circle i {
    position: relative;
    top: -1px;
}

.btn-circle-sm {
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 0.9rem;
}

.btn-circle-md {
    width: 44px;
    height: 44px;
    line-height: 35px;
    font-size: 1.2rem;
}

.btn-circle-lg {
    width: 55px;
    height: 55px;
    line-height: 55px;
    font-size: 1.1rem;
}

.btn-circle-xl {
    width: 70px;
    height: 70px;
    line-height: 70px;
    font-size: 1.3rem;
}

.invisible-circle {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    vertical-align: middle;
    color: greenyellow;
    background: rgba(0, 0, 0, 0);
    padding: 0;
    border: none;
    border-radius: 50%;
}

.thumbnail-text {
    text-align: center;
    font-weight: bolder;
    font-size: 10px;
    margin-top: 5px;
    margin-bottom: 0px;
    margin-left: 5px;
    margin-right: 5px;
}

.search-field {
    max-width: 90px;
}

.side-bar-button {
    position: absolute;
    right: 0px;
    /*padding: 10px;*/
}

.v-divider-right {
    border-left: 1px solid rgb(204, 204, 204, 1);
}

/* Container custom - max width 1280px like reference */
.container-custom {
    max-width: 1280px !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1200px) {
    .container-custom {
        max-width: 1280px !important;
    }
}

/* Gallery card - no white space above images */
.gallery-card {
    position: relative;
    background: white;
    border: 1px solid rgba(15, 76, 129, 0.08);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(15, 76, 129, 0.25), 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.gallery-card-img-wrapper {
    aspect-ratio: 4/3;
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover img {
    transform: scale(1.03);
}

.card-body-custom {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title-custom {
    font-size: 0.8rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle {
    color: #4B5563;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-button-row {
    margin-top: 1rem;
}

/* Equal height cards in grid */
.gallery-grid-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.gallery-grid-row>[class*='col-'] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}

.gallery-card .img-responsive {
    max-height: 100px;
    width: auto;
    margin: 0 auto
}

.dont-break {
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
}

.SSNField.hidden.holder-validation {
    display: block !important;
}

/* Header Styles */
.header-main {
    background-color: #0A2F4F;
    margin: 0;
    padding: 0;
    border: none !important;
    border-top: none !important;
}

header {
    border-top: none !important;
}

.header-logo {
    height: 48px;
    width: auto;
}

/* Remove focus outline from logo link */
.header-main a:focus {
    outline: none;
}

.nav-link-custom {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    /* Larger than reference 0.75rem */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #D4AF37, #F0E68C);
    transition: width 0.3s ease;
}

.nav-link-custom:hover {
    color: #D4AF37;
    text-decoration: none;
}

.nav-link-custom:hover::after {
    width: 100%;
}

.nav-link-custom.active {
    color: #D4AF37;
}

/* Search Section */
.search-section {
    background-color: rgba(10, 47, 79, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container {
    background-color: white;
    border: 1px solid rgba(15, 76, 129, 0.15);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 30rem;
    width: 30rem;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: rgba(107, 114, 128, 0.7);
    flex-shrink: 0;
}

.search-input {
    background: white;
    border: none;
    outline: none;
    color: #1F2937;
    font-size: 1rem;
    width: 100%;
}

.search-input::placeholder {
    color: rgba(107, 114, 128, 0.7);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.language-switcher a:hover {
    transform: scale(1.1);
}

.language-switcher a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== STYLES MOVED FROM PAGE.SS ===== */

/* CSS Variables */
:root {
    --brand-primary: #0F4C81;
    --brand-dark: #0A2F4F;
    --brand-light: #1E6BA8;
    --accent-teal: #14B8A6;
    --accent-gold: #D4AF37;
    --accent-gold-light: #F0E68C;
    --neutral-light: #F8FAFC;
    --neutral-dark: #E2E8F0;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    letter-spacing: -0.01em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Main */
main {
    flex: 1;
}

/* Container */
.container-custom {
    max-width: 80rem;
    /* 1280px = 7xl */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header Styles - Override duplicates */
.header-main {
    background-color: var(--brand-dark);
}

.header-logo {
    height: 48px;
    width: auto;
}

/* Navigation Links - Updated to 12px/18px */
.nav-link-custom {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 12px;
    line-height: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #D4AF37, #F0E68C);
    transition: width 0.3s ease;
}

.nav-link-custom:hover {
    color: #D4AF37;
}

.nav-link-custom:hover::after {
    width: 100%;
}

.nav-link-custom.active {
    color: #D4AF37;
}

/* Search Bar */
.search-section {
    background-color: rgba(10, 47, 79, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Search Container - White and Larger */
.search-container {
    background-color: white;
    border: 1px solid rgba(15, 76, 129, 0.15);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 40rem;
    /* Larger than before (was 28rem) */
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-icon {
    width: 1rem;
    height: 1rem;
    color: rgba(107, 114, 128, 0.7);
    flex-shrink: 0;
}

.search-input {
    background: white;
    border: none;
    outline: none;
    color: #1F2937;
    font-size: 0.875rem;
    width: 100%;
}

.search-input::placeholder {
    color: rgba(107, 114, 128, 0.7);
}

/* Gallery Card */
.gallery-card {
    position: relative;
    background: white;
    border: 1px solid rgba(15, 76, 129, 0.08);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(15, 76, 129, 0.25), 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.gallery-card-img-wrapper {
    aspect-ratio: 4/3;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover img {
    transform: scale(1.03);
}

.card-body-custom {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title-custom {
    font-size: 0.8rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* text-align: center; */
}

.card-subtitle {
    color: #4B5563;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-button-row {
    margin-top: 1rem;
}

/* Use .btn .btn-primary for all buttons */

/* Equal height cards in grid */
.gallery-grid-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.gallery-grid-row>[class*='col-'] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Sidebar */
.sidebar-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title .accent-bar {
    width: 0.25rem;
    height: 1.25rem;
    background: var(--accent-gold);
    border-radius: 9999px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 0.625rem 0 0.625rem 0.75rem;
    border-left: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 0.875rem;
}

.sidebar-list li:hover {
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
}

.social-icon {
    width: 24px;
    height: 24px;
    color: #4B5563;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.social-icon:hover {
    color: var(--brand-primary);
    transform: scale(1.1);
}

/* Footer */
.footer-main {
    background-color: var(--brand-dark);
    padding: 1rem 0;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    margin: 0;
}

/* Page subtitle */
.page-subtitle {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.page-subtitle .brand-link {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Content area styling */
.content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.typography h1 {
    color: var(--brand-dark);
    margin-bottom: 1.5rem;
}

.typography p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Image Overlay */
.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    z-index: 2;
}

.gallery-card:hover .img-overlay {
    opacity: 1;
}

.img-overlay .btn-circle,
.img-overlay .btn-circle-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--brand-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    padding: 0;
}

.img-overlay .btn-circle:hover,
.img-overlay .btn-circle-sm:hover {
    background: var(--brand-primary);
    color: white;
    transform: scale(1.15);
}

.checkmarker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--brand-primary);
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.checkmarker.visible {
    display: flex !important;
    background: var(--accent-gold);
    color: white;
}

.invisible-circle {
    display: none;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination-wrapper a {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pagination-wrapper a:hover {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links-desktop {
        display: none !important;
    }
}

/* Modal Styles - Match Design */
.modal-dialog {
    max-width: 1120px;
    width: 90vw;
    margin: 2.5vh auto;
    height: 95vh;
}

.modal-content {
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 76, 129, 0.08);
    box-shadow: 0 20px 40px -10px rgba(15, 76, 129, 0.25);
    overflow: hidden;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: white;
    color: #111827;
    border-bottom: 1px solid rgba(15, 76, 129, 0.08);
    padding: 1.5rem;
    position: relative;
}

.modal-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.25rem;
    color: var(--brand-dark);
}

.modal-header .close {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    color: #6B7280;
    opacity: 1;
    text-shadow: none;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}



.modal-body {
    padding: 2rem;
    background: white;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    background: #F8FAFC;
    border-top: 1px solid rgba(15, 76, 129, 0.08);
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.modal-footer .btn {
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    border: none;
    color: white;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary {
    background: #E2E8F0;
    color: #374151;
    border: none;
}

.modal-footer .btn-secondary:hover {
    background: #CBD5E1;
}

/* Fix button icons in modal */
.modal-footer .btn .fa,
.modal-footer .btn-circle .fa,
.modal-footer .btn-circle-sm .fa {
    display: inline-block;
    font-size: inherit;
    line-height: 1;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(10, 47, 79, 0.7);
}

.modal-backdrop.show {
    opacity: 1;
}

/* Mobile responsive - almost full screen */
@media (max-width: 768px) {
    .modal-dialog {
        width: 95vw;
        margin: 2.5vh auto;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-body {
        max-height: calc(95vh - 120px);
        padding: 1rem;
    }
}

/* Modal Action Button - Bottom Right Circular */
.modal-action-btn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.3);
    z-index: 10;
    padding: 0;
}

.modal-action-btn:hover {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(15, 76, 129, 0.4);
}

.modal-action-btn .fa {
    font-size: 1.25rem;
    line-height: 1;
}

/* Mobile Menu Styles */
.mobile-menu {
    background-color: rgba(10, 47, 79, 0.95);
    display: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    display: block;
}

.mobile-nav-link:hover {
    color: var(--accent-gold);
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent-gold);
}

.mobile-nav-link.active {
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
    background-color: rgba(255, 255, 255, 0.05);
}

.mobile-language-switcher a img {
    transition: transform 0.3s ease;
}

.mobile-language-switcher a:hover img {
    transform: scale(1.1);
}

/* Product Selector Styles */
.product-selector {
    padding: 0;
}

.product-selector .form-control {
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 76, 129, 0.15);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-selector .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
    outline: none;
}

.product-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
}

.product-toggle {
    background: white;
    border: 2px solid rgba(15, 76, 129, 0.15);
    border-radius: 0.5rem;
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin: 0.2rem !important;
    text-transform: none;
    letter-spacing: normal;
}

.product-toggle:hover {
    background: rgba(15, 76, 129, 0.05);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(15, 76, 129, 0.15);
}

.product-toggle.btn-primary,
.product-toggle[class*="btn-primary"] {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    border-color: var(--brand-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.2);
}

.product-toggle.btn-primary:hover,
.product-toggle[class*="btn-primary"]:hover {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(15, 76, 129, 0.3);
}

/* Mobile product selector */
@media (max-width: 767px) {
    .product-selector {
        padding: 0;
        margin: 0.75rem 0;
    }
}

/* ============================================
   GLOBAL BUTTON STYLING
   ============================================ */

.btn,
a.btn,
button.btn,
input.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary,
a.btn-primary,
button.btn-primary,
input.btn-primary,
form .btn-primary,
form button.btn-primary,
form input.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
input.btn-primary:hover,
form .btn-primary:hover,
form button.btn-primary:hover,
form input.btn-primary:hover {
    color: #D4AF37 !important;
    text-decoration: none;
}

/* ============================================
   FORM STYLING - APPLIES TO ALL FORMS
   ============================================ */

/* Form container - exclude search section */
form:not(.search-section form) {
    padding: 1rem;
}

form h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(15, 76, 129, 0.08);
}


/* Remove form-control styling from wrapper divs */
form .field.form-control,
form div.form-control {
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: block !important;
    margin-bottom: 1rem !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Modern form inputs - treat all fields equally, exclude search */
form input.form-control:not(.search-input),
form select.form-control,
form select,
form textarea.form-control,
form textarea,
form input[type="text"]:not(.search-input),
form input[type="email"],
form input.text:not(.search-input) {
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 76, 129, 0.15);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

form input.form-control:focus:not(.search-input),
form input:focus:not(.search-input),
form textarea:focus,
form select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
    outline: none;
}

/* Antal (quantity) field - narrower - override inline styles */
form .product-quantity-field,
form input.product-quantity-field {
    max-width: 100px !important;
    width: 100px !important;
    /* background: transparent !important; */
    display: block !important;
    margin-right: 0 !important;
}

/* Fix dropdown and input alignment */
form .form-group {
    margin-bottom: 1rem;
}

form label,
form .field label,
form label.left {
    display: block !important;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem !important;
    width: 100% !important;
    text-align: left !important;
    position: static !important;
    float: none !important;
    clear: both !important;
}

form input.text:not(.search-input),
form input[type="text"]:not(.search-input),
form input[type="email"] {
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

/* Submit buttons - exclude gallery buttons */
form input[type="submit"]:not(.btn-info):not(.btn-add),
form button[type="submit"]:not(.btn-info):not(.btn-add),
form button:not(.btn-info):not(.btn-add):not(.close) {
    cursor: pointer;
}

/* Gallery card buttons - preserve original styling */
.image-card .btn-info,
.image-card .btn-add,
.btn-info,
.btn-add {
    width: auto !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Dropdown styling - rounded */
form select,
form select.form-control,
form select.country {
    border-radius: 0.5rem !important;
    width: 100%;
}

/* Checkbox fields - inline with label, but each field on separate line */
form .field.othercheckfield,
form .field.agreecheckfield {
    display: block !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
}

form input[type="checkbox"] {
    display: inline-block !important;
    width: auto !important;
    margin-right: 0.5rem !important;
    vertical-align: middle !important;
}

form .field.othercheckfield label,
form .field.agreecheckfield label,
form label.right {
    display: inline !important;
    width: auto !important;
    margin-bottom: 0 !important;
    font-weight: normal !important;
    vertical-align: middle !important;
}

/* Gradient button - only for form submit buttons */
form .btn-toolbar {
    margin-top: 0rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 76, 129, 0.08);
}

form .btn-toolbar .btn-primary,
form .btn-toolbar input[type="submit"],
form .btn-toolbar button[type="submit"] {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%) !important;
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.2);
}

form .btn-toolbar .btn-primary:hover,
form .btn-toolbar input[type="submit"]:hover,
form .btn-toolbar button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(15, 76, 129, 0.3);
}

/* Field grouping card */
form .field-group-card {
    background: #F8FAFC;
    border: 1px solid rgba(15, 76, 129, 0.08);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

form .form-fields-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 576px) {
    form .form-fields-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    form .prodmall {
        max-width: 250px;
    }

    /* ── Modal: edge-to-edge on xs ── */
    #shopOptionsModal .modal-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    #shopOptionsModal .modal-content {
        max-height: 100vh !important;
        border-radius: 0 !important;
    }

    .modal-header {
        padding: 0.5rem 0.75rem !important;
    }

    .modal-title {
        font-size: 1rem !important;
    }

    .modal-body {
        padding: 0.5rem !important;
        max-height: calc(100vh - 56px) !important;
    }

    .modal-footer {
        padding: 0.5rem 0.75rem !important;
    }

    /* ── Remove extra container-fluid side-padding ── */
    #shopOptionsModal .container-fluid {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    /* ── Form: compact spacing ── */
    form:not(.search-section form) {
        padding: 0.25rem !important;
    }

    form h5 {
        font-size: 1.05rem !important;
        margin-bottom: 0.4rem !important;
        padding-bottom: 0.35rem !important;
    }

    form .form-group {
        margin-bottom: 0.4rem !important;
    }

    form .field.form-control,
    form div.form-control {
        margin-bottom: 0.4rem !important;
    }

    form label,
    form .field label,
    form label.left {
        margin-bottom: 0.2rem !important;
        font-size: 0.8rem !important;
    }

    form input.form-control:not(.search-input),
    form select.form-control,
    form select,
    form textarea.form-control,
    form textarea,
    form input[type="text"]:not(.search-input),
    form input[type="email"],
    form input.text:not(.search-input) {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.825rem !important;
    }

    form .btn-toolbar {
        margin-top: 0.6rem !important;
        padding-top: 0.6rem !important;
    }

    form .btn-toolbar .btn-primary,
    form .btn-toolbar input[type="submit"],
    form .btn-toolbar button[type="submit"] {
        padding: 0.6rem 1.25rem !important;
        font-size: 0.875rem !important;
    }

    form .field-group-card {
        padding: 0.5rem !important;
        margin: 0.4rem 0 !important;
    }

    /* ── Product toggle buttons: wrap nicely ── */
    .product-buttons {
        gap: 0.25rem !important;
        padding: 0.25rem !important;
    }

    .product-toggle {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}

/* Instructions textarea — breathing room above it */
.shop-options-form .form-group.textarea {
    margin-top: 2rem;
}

/* Antal + Välj variant on same row */
.shop-options-form .qty-variant-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.shop-options-form .qty-variant-qty {
    flex: 0 0 80px;
}

.shop-options-form .qty-variant-sel {
    flex: 1 1 auto;
}

/* Make each field holder a flex row so the input/select centers regardless of global display rules */
.shop-options-form .qty-variant-row .form-group {
    display: flex !important;
    align-items: center;
    height: 44px;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    width: 100%;
}

.shop-options-form .qty-variant-row input,
.shop-options-form .qty-variant-row select {
    width: 100% !important;
    height: 38px !important;
    margin: 0;
}

/* No labels in the compact row */
.shop-options-form .qty-variant-row label {
    display: none;
}

/* ============================================
   MODAL STYLING - IMAGE SELECTION MODAL
   ============================================ */

/* Modal dialog - reasonable size */
#imageSelectionModal .modal-dialog {
    max-width: 1200px !important;
    width: 95% !important;
    height: 90vh !important;
    margin: 5vh auto !important;
}

/* Modal content */
#imageSelectionModal .modal-content {
    border-radius: 1rem !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Modal header - clean and simple */
#imageSelectionModal .modal-header {
    background: white !important;
    color: #1F2937 !important;
    border-bottom: 1px solid #E5E7EB !important;
    border-radius: 1rem 1rem 0 0 !important;
    padding: 1rem 1.5rem !important;
    flex-shrink: 0 !important;
}

#imageSelectionModal .modal-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #1F2937 !important;
}

#imageSelectionModal .modal-header .close {
    color: #6B7280 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

#imageSelectionModal .modal-header .close:hover {
    color: #1F2937 !important;
}

/* Modal body */
#imageSelectionModal .modal-body {
    padding: 1.5rem !important;
    background: #F8FAFC !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

/* Search form - minimal and clean */
#imageSelectionModal #imageSearchForm {
    max-width: 500px;
    margin: 0 auto 1.5rem auto;
}

#imageSelectionModal .search-wrapper {
    display: flex;
    gap: 0.5rem;
}

#imageSelectionModal #imageSearchQuery {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
}

#imageSelectionModal #imageSearchQuery:focus {
    outline: none;
    border-color: var(--brand-primary);
}


/* Image grid */
#imageSelectionModal #imageResults {
    width: 100% !important;
}

#imageSelectionModal #imageGrid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
}

/* Grid items */
#imageSelectionModal #imageGrid>.grid-item {
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    display: block !important;
}

/* Gallery card items in selection modal — same .gallery-card base as homepage */
#imageSelectionModal .gallery-card {
    background: white !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
}

#imageSelectionModal .gallery-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(15, 76, 129, 0.15) !important;
}

/* Fixed image height in the modal grid */
#imageSelectionModal .gallery-card-img-wrapper {
    height: 160px !important;
    flex-shrink: 0 !important;
}

#imageSelectionModal .gallery-card-img-wrapper .gallery-bg-blur,
#imageSelectionModal .gallery-card-img-wrapper .gallery-main-img {
    height: 160px !important;
    max-width: none !important;
    max-height: none !important;
}

/* Card body in selection modal — title only, no Beställ button */
#imageSelectionModal .card-body-custom {
    padding: 0.6rem 0.75rem !important;
}

#imageSelectionModal .card-title-custom {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #1F2937 !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Select overlay with checkmark */
.select-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 4 !important;
    background: rgba(15, 76, 129, 0.7) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
}

.gallery-card:hover .select-overlay {
    opacity: 1 !important;
}

.select-overlay .fa-check-circle,
.select-overlay .fa-plus-circle {
    font-size: 3rem !important;
    color: white !important;
}

/* Loading spinner */
#imageSelectionModal .fa-spinner {
    color: var(--brand-primary) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #imageSelectionModal .modal-dialog {
        width: 98% !important;
        margin: 1vh auto !important;
        height: 98vh !important;
    }

    #imageSelectionModal #imageGrid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.75rem !important;
    }


    #imageSelectionModal #imageSearchForm {
        max-width: 90%;
    }

    #imageSelectionModal .modal-header,
    #imageSelectionModal .modal-body {
        padding: 1rem !important;
    }
}

@media (max-width: 680px) {
    #imageSelectionModal #imageGrid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 600px) {
    #imageSelectionModal #imageGrid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
}

@media (max-width: 550px) {
    #imageSelectionModal #imageGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
}

@media (max-width: 450px) {
    #imageSelectionModal #imageGrid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   CUSTOM RESPONSIVE GRID CLASSES
   ============================================ */

/* Custom 5-column grid (20% width per column) */
@media (min-width: 992px) {
    .col-lg-2_5 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (min-width: 1200px) {
    .col-xl-2_5 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* 1 column on very small phones (< 350px) */
@media (max-width: 349px) {
    .gallery-grid-row>.col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   IMAGE INFO BUTTON (IN CAPTION)
   ============================================ */

.image-info-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    color: var(--brand-primary) !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

.image-info-btn:hover {
    background: rgba(15, 76, 129, 0.1) !important;
    transform: scale(1.1) !important;
}

.image-info-btn .fa {
    font-size: 18px !important;
}

/* Ensure thumbnail has relative positioning for absolute overlays */
.thumbnail.image-select-item {
    position: relative !important;
}

/* ============================================
   IMAGE INFO MODAL - CUSTOM STYLING
   ============================================ */

/* #imageInfoModal .modal-dialog � see image-info-modal.css */

/* #imageInfoModal .modal-content � see image-info-modal.css */

/* Darker backdrop */
#imageInfoModal.show {
    background-color: rgba(0, 0, 0, 0.85) !important;
}

/* Compact padding and remove extra heights */
#imageInfoModal .modal-header,
#imageInfoModal .modal-body {
    padding: 0.75rem !important;
    height: auto !important;
    min-height: 0 !important;
}

#imageInfoModal .modal-body {
    overflow: visible !important;
}

#imageInfoModal .modal-title {
    font-size: 0.9rem !important;
}

/* Smaller close button */
#imageInfoModal .close {
    padding: 0.5rem !important;
    font-size: 1.2rem !important;
}

/* Image info modal layout */
#imageInfoModal .modal-dialog {
    max-width: 1100px !important;
    width: 95% !important;
    margin: 1.75rem auto !important;
}

/* Image fills its column but respects height constraint */
#imageInfoModal .img-thumbnail {
    width: 100%;
    max-width: 100%;
    max-height: 560px;
    object-fit: contain;
}

/* ============================================
   STYLES MIGRATED FROM fotoprod.css
   ============================================ */

/* ---- Global Button Styles ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #0f4c81 0%, #1a5a96 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.25) !important;
    border: none !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d3f6b 0%, #15507f 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.35) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #d9534f 0%, #c9302c 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(217, 83, 79, 0.25) !important;
    border: none !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c9302c 0%, #b52b27 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(217, 83, 79, 0.35) !important;
}

.btn-outline-danger {
    background-color: transparent !important;
    color: #c9302c !important;
    border: 1px solid #d9534f !important;
    box-shadow: none !important;
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #d9534f 0%, #c9302c 100%) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(217, 83, 79, 0.25) !important;
}

/* ---- MyCart Sidebar Styles ---- */
#mycart {
    font-size: 12px;
}

.mycart-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 8px;
    padding: 8px 0;
    border-top: 1px solid #e0e0e0;
}

.mycart-checkout-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    gap: 5px !important;
}

.mycart-checkout-btn i {
    font-size: 12px;
}

.mycart-clear-btn {
    padding: 6px 12px !important;
    font-size: 11px !important;
    gap: 5px !important;
    font-weight: 400 !important;
    opacity: 0.9;
}

.mycart-clear-btn:hover {
    opacity: 1;
}

.mycart-clear-btn i {
    font-size: 11px;
}

/* ---- HR Styles ---- */
hr.slimHR {
    margin: 5px 0;
}

hr {
    border: 0;
    color: #9E9E9E;
    background-color: #9E9E9E;
    height: 1px;
    width: 100%;
}

/* ---- Product Form / Template Styles ---- */
.prodmall {
    clear: left;
    margin: 18px 0;
    position: relative;
    /* Default dimensions + border for any prodmall without a matching #id CSS rule.
       Per-product selectors (e.g. #vinnartavlamall) override these via specificity. */
    width: 208px;
    height: 210px;
    border: 1px dashed #CCC;
}

form .prodmall {
    position: relative;
    max-width: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: visible !important;
    transform: scale(1.12);
    transform-origin: top left;
    margin-bottom: 40px;
    /* 210px × 0.12 overflow = 25px + breathing room */
}

.prodmall-preview .prodmall {
    position: relative;
    max-width: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: visible !important;
    transform: scale(1.12);
    transform-origin: top left;
    margin-bottom: 40px;
}

form .prodmall:hover,
.prodmall-preview .prodmall:hover {
    box-shadow: 0 8px 24px rgba(15, 76, 129, 0.15);
}

/* Neutralize any inherited min-width on images inside the static preview card.
   The order summary is inside .content.typography which may inherit a min-width
   that causes images to overflow their fixed-px AddImage slots. */
.prodmall-preview .AddImage img,
.prodmall-preview .AddImage .img-slot-hover-wrap img {
    min-width: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
    display: block;
}


.AddImage {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    /* border: 2px dashed transparent; */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Inside product templates, images fill the drop zone without cropping */
.prodmall .AddImage {
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Default bild1 zone — full-width, tall — for products without a specific CSS mall.
   Per-product rules (e.g. #vinnartavlamall #bild1) override this via specificity. */
.prodmall #bild1 {
    margin-top: 10px;
    height: 178px;
    position: relative;
    width: 100%;
    z-index: 10;
}

/* Redundant — covered by form .AddImage img.selectedimg1/2 and .prodmall-preview .AddImage img
.prodmall .AddImage img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
    display: block;
} */

/* Portrait image in product zone � fill width, center vertically */
.prodmall .AddImage img.orientation-portrait {
    object-fit: contain !important;
    object-position: center center;
}

/* Landscape image in product zone � fill width, center horizontally */
.prodmall .AddImage img.orientation-landscape {
    object-fit: contain !important;
    object-position: center center;
}

form .AddImage:hover {
    border-color: var(--brand-primary);
    background-color: rgba(15, 76, 129, 0.05);
}

form .AddImage img.selectedimg1,
form .AddImage img.selectedimg2,
.prodmall-preview .AddImage img.selectedimg1,
.prodmall-preview .AddImage img.selectedimg2 {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
    display: block;
    transition: transform 0.3s ease;
}

.selectedimg1,
.selectedimg2 {
    cursor: pointer;
}

/* ---- Product Template Layouts (per-product positioning) ---- */

#vinnartavlamall {
    width: 208px;
    height: 244px;
    background: url("../images/vinnartavlamallsmall.png") no-repeat #EEE;
}

#vinnartavlamall #bild1 {
    width: 174px;
    height: 102px;
    left: 15px;
    top: 38px;
    position: relative;
    z-index: 10;
}

#vinnartavlamall #bild2 {
    height: 66px;
    left: 88px;
    position: relative;
    top: 45px;
    width: 101px;
    z-index: 10;
}

#mall {
    width: 208px;
    height: 210px;
    border: 1px dashed #CCC;
}

#mall #bild1 {
    border: 1px dashed #BBBBBB;
    height: 78px;
    left: 64px;
    position: relative;
    top: 64px;
    width: 78px;
    z-index: 10;
}

#tshirtmall {
    width: 208px;
    height: 210px;
    background: url("../images/tshirt.png") #FFF;
}

#tshirtmall #bild1 {
    border: 1px dashed #BBBBBB;
    height: 98px;
    left: 64px;
    position: relative;
    top: 44px;
    width: 78px;
    z-index: 10;
}

#sweatshirtmall {
    width: 208px;
    height: 210px;
    background: url("../images/sweatshirt.png") #FFF;
}

#sweatshirtmall #bild1 {
    border: 1px dashed #BBBBBB;
    height: 78px;
    left: 64px;
    position: relative;
    top: 64px;
    width: 78px;
    z-index: 10;
}

#Digitalmall {
    width: 208px;
    height: 210px;
    border: 1px dashed #CCC;
}

#Digitalmall #bild1 {
    margin-top: 10px;
    border: 0px dashed #BBBBBB;
    height: 178px;
    position: relative;
    width: 100%;
    z-index: 10;
}

#julkortmall {
    width: 208px;
    height: 210px;
    border: 1px dashed #CCC;
}

#julkortmall #bild1 {
    margin-top: 10px;
    border: 0px dashed #BBBBBB;
    height: 178px;
    position: relative;
    width: 100%;
    z-index: 10;
}

#Fargkopiormall {
    width: 208px;
    height: 210px;
    border: 1px dashed #CCC;
}

#Fargkopiormall #bild1 {
    border: 0px dashed #BBBBBB;
    margin-top: 10px;
    height: 178px;
    position: relative;
    z-index: 10;
}


#Enbildstavla {
    width: 208px;
    height: 177px;
    border: 1px dashed #CCC;
    background: url("../images/tavla.png") #FFF;
}

#Enbildstavla #bild1 {
    border: 0px dashed #BBBBBB;
    left: 14px;
    position: relative;
    top: 4px;
    width: 178px;
    height: 130px;
    z-index: 10;
}

#tavlamall {
    width: 208px;
    height: 177px;
    border: 1px dashed #CCC;
    background: url("../images/tavla.png") #FFF;
}

#tavlamall #bild1 {
    border: 0px dashed #BBBBBB;
    left: 14px;
    position: relative;
    top: 4px;
    width: 178px;
    height: 130px;
    z-index: 10;
}

#musmattamall {
    width: 208px;
    height: 163px;
    border: 1px dashed #CCC;
    background: url("../images/musmatta.png") #FFF;
}

#musmattamall #bild1 {
    border: 0px dashed #BBBBBB;
    left: 18px;
    position: relative;
    top: 8px;
    width: 167px;
    height: 125px;
    z-index: 10;
    overflow: hidden;
}

#BOK1mall {
    width: 128px;
    height: 166px;
    border: 0px dashed #CCC;
    background: url("../images/BOK1mall.jpg") #FFF;
}

#BOK2mall {
    width: 128px;
    height: 166px;
    border: 0px dashed #CCC;
    background: url("../images/BOK2mall.jpg") #FFF;
}

#Travlegendermall {
    width: 128px;
    height: 166px;
    border: 0px dashed #CCC;
    background: url("/webb/assets/Uploads/travlegender-web.jpg") #FFF;
    background-size: cover;
}

#JULKORT1mall {
    border: 1px solid #BBBBBB;
    width: 226px;
    height: 115px;
    background: url("../images/julkort1mall.jpg") #FFF;
}

#JULKORT1mall #bild1 {
    border: 1px dashed #BBBBBB;
    height: 114px;
    left: 0;
    overflow: hidden;
    position: relative;
    top: 0;
    width: 167px;
    z-index: 10;
}

/* ============================================
   GALLERY BLUR BACKGROUND EFFECT
   ============================================ */

/* Blurred background layer - fills container, always covers */
.gallery-bg-blur {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    filter: blur(14px);
    transform: scale(1.1);
    opacity: 0.75;
    z-index: 0;
    transition: none !important;
    pointer-events: none;
}

/* Main foreground image - contained & centered, no crop */
.gallery-main-img {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .gallery-main-img {
    transform: scale(1.03);
}

/* Selection modal thumbnail - same blur technique */
#imageSelectionModal .thumbnail {
    position: relative !important;
}

#imageSelectionModal .thumbnail .gallery-bg-blur {
    height: 180px !important;
}

#imageSelectionModal .thumbnail .gallery-main-img {
    height: 180px !important;
    max-width: none !important;
    max-height: none !important;
    flex-shrink: 0 !important;
}

/* ── SilverStripe Security / Login page ──────────────────────────────── */

/* "Jag har glömt mitt lösenord" link */
#ForgotPassword {
    margin-top: .5rem;
    text-align: right;
}

#ForgotPassword a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: var(--brand-primary, #0F4C81);
    font-weight: 500;
    text-decoration: none;
    padding: .3rem .6rem;
    border-radius: .375rem;
    transition: background .2s ease, color .2s ease;
}

#ForgotPassword a::before {
    content: "🔑";
    font-size: .85rem;
}

#ForgotPassword a:hover {
    background: rgba(15, 76, 129, 0.08);
    color: #0a3560;
    text-decoration: none;
}

/* Login form field labels */
#LoginForm_LoginForm .field label,
#MemberLoginForm_LoginForm .field label {
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .3rem;
    display: block;
}

/* Login form actions row — keep button and forgot-link on same baseline */
#LoginForm_LoginForm .Actions,
#MemberLoginForm_LoginForm .Actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

/* ── MyPage – Mina nedladdningar ─────────────────────────────────────── */

/* Top bar: welcome text + logout button */
.mypages-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: .6rem .9rem;
    background: #f7f9fc;
    border: 1px solid #e3e8ef;
    border-radius: .5rem;
}

.mypages-welcome {
    font-size: .9rem;
    font-weight: 600;
    color: #374151;
}

.mypages-logout-btn {
    font-size: .8rem !important;
    padding: .35rem .85rem !important;
}

.mypages-month {
    margin-bottom: 2.5rem;
}

.mypages-month-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--brand-primary, #0F4C81);
    border-bottom: 2px solid #e8e8e8;
    padding-bottom: .5rem;
    margin-bottom: 1.25rem;
}

.mypages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

@media (max-width: 576px) {
    .mypages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Download-count badge (reuses brand colours) */
.badge-download {
    display: inline-block;
    margin-top: .35rem;
    background: var(--brand-primary, #0F4C81);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 20px;
    letter-spacing: .03em;
}

/* Empty state */
.mypages-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #868e96;
}

.mypages-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Ensure the image info modal stacks above the selection modal (Bootstrap default is 1050) */
#imageInfoModal {
    z-index: 1060 !important;
}

/* ── SilverStripe form messages ──────────────────────────────────────── */
/* SilverStripe renders these as <p class="message bad|good|warning"> */

.message {
    padding: .75rem 1rem;
    margin: .75rem 0 1rem;
    border-radius: .375rem;
    font-size: .9rem;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.message.bad,
.message.error {
    background: #fff2f2;
    border-left-color: #c0392b;
    color: #922b21;
}

.message.good,
.message.success {
    background: #f0faf4;
    border-left-color: #27ae60;
    color: #1e8449;
}

.message.warning {
    background: #fffbee;
    border-left-color: #f39c12;
    color: #9a7d0a;
}

/* ── Image slot in product config form (AddImage) ── */

/* Wrapper that holds the selected image + hover overlay */
.img-slot-hover-wrap {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.img-slot-hover-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* Inside a prodmall AddImage zone the img is position:absolute + height:100%.
   That percentage resolves against the nearest positioned ancestor — which is
   .img-slot-hover-wrap. Without an explicit height it collapses to 0.
   Fix: stretch the wrapper to fill the entire #bild1 / #bild2 zone. */
.prodmall .AddImage .img-slot-hover-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Magnifier overlay — fades in on hover */
.img-slot-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 76, 129, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.img-slot-hover-wrap:hover .img-slot-hover-overlay {
    opacity: 1;
}

.img-slot-hover-overlay .fa-search {
    font-size: 2.5rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Add-placeholder shown when no image is selected yet */
.img-slot-add-placeholder {
    width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px dashed rgba(15, 76, 129, 0.25);
    border-radius: 0.5rem;
    background: rgba(15, 76, 129, 0.03);
    transition: all 0.25s ease;
}

.img-slot-add-placeholder:hover {
    border-color: var(--brand-primary);
    background: rgba(15, 76, 129, 0.07);
}

.img-slot-add-placeholder .fa-plus-circle {
    font-size: 2.5rem;
    color: rgba(15, 76, 129, 0.35);
    transition: color 0.25s ease;
}

.img-slot-add-placeholder:hover .fa-plus-circle {
    color: var(--brand-primary);
}

/* ===== MOBILE: Homepage image results grid height cap ===== */
@media (max-width: 991.98px) {

    #homepageImageResults,
    #homepageImageResultsGrid {
        max-height: 400px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== Product toggle dropdown — blue gradient like buttons ===== */
select.product-toggle-dropdown {
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23ffffff'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #0F4C81 0%, #1E6BA8 100%) !important;
    background-repeat: no-repeat, no-repeat;
    background-position: right 0.75rem center, 0 0;
    background-size: 10px 6px, 100% 100%;
    box-shadow: 0 2px 6px rgba(15, 76, 129, 0.3);
    transition: box-shadow 0.2s ease, opacity 0.2s ease;
}

select.product-toggle-dropdown:hover,
select.product-toggle-dropdown:focus {
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.45);
    outline: none;
    opacity: 0.92;
}

select.product-toggle-dropdown option {
    background-color: #ffffff;

}

/* ===== Shop Options Modal — header & close button ===== */
#shopOptionsModal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
    position: relative;
}

#shopOptionsModal .modal-header::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 76, 129, 0.15), transparent);
    margin-top: 0.75rem;
}

#shopOptionsModal .modal-header .close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.25rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(100, 116, 139, 0.6);
    font-size: 2rem;
    margin-top: 5px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    opacity: 1;
}

#shopOptionsModal .modal-header .close:hover {
    color: #475569;
    background: rgba(100, 116, 139, 0.1);
}

#shopOptionsModal .modal-header .close span {
    line-height: 1;
    font-weight: 300;
}