@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

/* Root styling & Utilities */
:root {
    font-size: 16px;
    --primary-red: #B82222;
    --hover-red: #9E1819;
    --primary-grey: #434343;
    --secondary-grey: #f5f5f5;
    --text-black: #333333;
    --default-border-radius: 0;
    --bs-body-color: var(--text-black);
    --bs-border-radius: var(--default-border-radius);
    --bs-modal-border-radius: var(--default-border-radius);
    --bs-border-radius-lg: var(--default-border-radius);
}

/* Prevent automatic zooming on input focus */
@media (max-width: 991px) {
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        max-height: 999999px; /* Prevents zoom on Android */
    }
}

/* Breadcrumb Styles */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
    margin: 0;
    font-size: 0.9rem !important;
}

.breadcrumb-item a {
    color: var(--text-black);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--bs-gray-600);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--text-black);
}

main {
    flex: 1;
    /* Pushes the footer down */
}

*:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

body {
    font-family: 'Ubuntu', Arial, sans-serif !important;
    color: var(--text-black);
    font-weight: 400;
}

@media (max-width: 991px) {
    body {
        padding-top: 85.5px;
    }
}

h1,
.h1 {
    font-size: 2.3rem !important;
}

h2,
.h2 {
    font-size: 2rem !important;
}

h3,
.h3 {
    font-size: 1.7rem !important;
}

h4,
.h4 {
    font-size: 1.5rem !important;
}

h5,
.h5 {
    font-size: 1.3rem !important;
}

h6,
.h6 {
    font-size: 1.1rem !important;
}

a {
    text-decoration: none;
    color: inherit;
}

p,
.p {
    font-size: 1rem !important;
    font-weight: 400;
    line-height: 1.5 !important;
}

.text-small {
    font-size: 0.925rem !important;
}

.text-extra-small {
    font-size: 0.825rem !important;
}

.text-2xs {
    font-size: 0.75rem !important;
}

.text-100 {
    font-weight: 100;
}

.text-200 {
    font-weight: 200;
}

.text-300 {
    font-weight: 300;
}

.text-400 {
    font-weight: 400;
}

.text-500 {
    font-weight: 500;
}

.text-600 {
    font-weight: 600;
}

.text-700 {
    font-weight: 700;
}

.text-800 {
    font-weight: 800;
}

.text-900 {
    font-weight: 900;
}

.w-5 {
    width: 5% !important;
}

.w-10 {
    width: 10% !important;
}

.w-15 {
    width: 15% !important;
}

.w-20 {
    width: 20% !important;
}

.w-30 {
    width: 30% !important;
}

.w-35 {
    width: 35% !important;
}

.w-40 {
    width: 40% !important;
}

.w-45 {
    width: 45% !important;
}

.w-55 {
    width: 55% !important;
}

.w-60 {
    width: 60% !important;
}

.w-65 {
    width: 65% !important;
}

.w-70 {
    width: 70% !important;
}

.w-80 {
    width: 80% !important;
}

.w-85 {
    width: 85% !important;
}

.w-90 {
    width: 90% !important;
}

.w-95 {
    width: 95% !important;
}

.mt-45 {
    margin-top: 2.2rem !important;
}

.me-45 {
    margin-right: 2.2rem !important;
}

.mb-45 {
    margin-bottom: 2.2rem !important;
}

.ms-45 {
    margin-left: 2.2rem !important;
}

.my-45 {
    margin-top: 2.2rem !important;
    margin-bottom: 2.2rem !important;
}

.mx-45 {
    margin-left: 2.2rem !important;
    margin-right: 2.2rem !important;
}

.icon-2xs {
    height: 10px;
    width: auto;
}

.icon-xs {
    height: 12px;
    width: auto;
}

.icon-sm {
    height: 14.5px;
    width: auto;
}

.icon-md {
    height: 17px;
    width: auto;
}

.icon-lg {
    height: 21px;
    width: auto;
}

.icon-xl {
    height: 25px;
    width: auto;
}

.icon-2xl {
    height: 33px;
    width: auto;
}

.icon-2xs,
.icon-xs,
.icon-sm,
.icon-md,
.icon-lg,
.icon-xl,
.icon-2xl {
    display: inline-block;
    vertical-align: middle;
}


.text-red {
    color: var(--primary-red) !important;
}

.text-grey {
    color: var(--primary-grey) !important;
}

.text-black {
    color: var(--text-black) !important;
}

.hover-link,
.white-hover-link {
    transition: color 0.2s ease-in-out !important;
}

.hover-link:hover,
a:hover .hover-link {
    color: var(--primary-red) !important;
    /* Change text color on hover */
}

.underline-hover-link {
    font-weight: 600 !important;
}

.underline-hover-link:hover {
    text-decoration: underline !important;
}

hr {
    border: 1px solid var(--primary-red);
    opacity: 1;
}

.hr-thick {
    border: 2px solid var(--primary-red);
}

.hr-white {
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.hr-grey {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.bg-secondary {
    background-color: var(--secondary-grey) !important;
}

/* Bootstrap Overrides */

.form-control::placeholder {
    color: #696969 !important;
}

.form-control,
.form-select,
.form-check-input {
    border: 1.5px solid #c5c8cb !important;
    color: var(--text-black) !important;
    border-radius: var(--default-border-radius) !important;
}

.form-control:focus,
.form-select:focus,
.form-control:hover,
.form-select:hover {
    border: 1.5px solid #4f4f4f !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.form-check-input:focus {
    outline: 0 !important;
    box-shadow: none !important;
}

.form-check-input:checked {
    border-color: var(--primary-red) !important;
    background-color: var(--primary-red) !important;
}

.form-control:disabled,
.form-control:disabled:hover,
.form-control:disabled:focus {
    background-color: #e9ecef !important;
    opacity: 0.8 !important;
    border: 1.5px solid #c5c8cb !important;
}

.btn-close:focus {
    box-shadow: none !important;
}

.btn-close:hover {
    background-color: rgb(219, 219, 219);
    border-radius: 50%;
    padding: 0.5rem;
}

.alert {
    border-radius: var(--default-border-radius);
    border: none;
    padding: 0.5rem 1rem;
}

.bg-primary {
    background-color: var(--primary-red) !important;
}

.text-primary {
    color: var(--primary-red) !important;
}

select {
    cursor: pointer;
}

/* Buttons */

.btn-primary,
.btn-outline-primary,
.btn-secondary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--primary-red);
    --bs-btn-border-color: none;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary-red);
    --bs-btn-hover-border-color: none;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--primary-red);
    --bs-btn-active-border-color: none;
    border-radius: var(--default-border-radius);
    text-transform: uppercase;
}

.btn-outline-primary {
    --bs-btn-color: #fff;
    --bs-btn-border-color: #fff;
    --bs-btn-hover-color: #fff;
    border-radius: var(--default-border-radius);
    text-transform: uppercase;
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--primary-grey);
    --bs-btn-border-color: none;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary-grey);
    --bs-btn-hover-border-color: none;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--primary-grey);
    --bs-btn-active-border-color: none;
    border-radius: var(--default-border-radius);
    text-transform: uppercase;
}

.btn.disabled, .btn:disabled, fieldset:disabled .btn {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

@media (hover: hover) and (pointer: fine) {
    /* Enabled on laptops & desktops only */
    .btn-outline-primary {
        --bs-btn-hover-bg: var(--primary-red);
        --bs-btn-hover-border-color: var(--primary-red);
        --bs-btn-active-bg: var(--primary-red);
        --bs-btn-active-border-color: var(--primary-red);
    }
    
    .btn-primary .btn-text,
    .btn-outline-primary .btn-text,
    .btn-secondary .btn-text {
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        display: inline-block;
    }

    .btn-primary .btn-arrow,
    .btn-outline-primary .btn-arrow,
    .btn-secondary .btn-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%) translateX(10px);
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
        background-image: url('https://wales-tartan-centres.lon1.cdn.digitaloceanspaces.com/wales-tartan-centres/static/icons/right-arrow.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        filter: brightness(0) invert(1);
        pointer-events: none;
        right: 1.2rem;
        width: 22px;
        height: 22px;
    }
    
    .btn-primary:hover .btn-text,
    .btn-outline-primary:hover .btn-text,
    .btn-secondary:hover .btn-text {
        transform: scale(0.85) translateX(-22px);
    }

    .btn-primary:hover .btn-arrow,
    .btn-outline-primary:hover .btn-arrow,
    .btn-secondary:hover .btn-arrow {
        opacity: 1;
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Enabled on mobile and touch devices only */
    .btn-outline-primary {
        --bs-btn-hover-bg: none;
        --bs-btn-hover-border-color: none;
        --bs-btn-active-bg: none;
        --bs-btn-active-border-color: none;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: calc(100% - 40px); /* Account for container padding */
}
.toast-container>:not(:last-child) {
    margin-bottom: 0.9rem;
}
.toast {
    background-color: white;
    border-radius: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    border: 0;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    gap: 0.5rem;
    color: inherit !important;
}
.toast-header .message-container {
    flex: 0 1 auto;
    min-width: 0; /* Allows text to wrap */
    word-wrap: break-word;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
}
.toast-header .message-container i {
    font-size: 1.1em;
    line-height: 1;
    margin-top: 0.1em; /* Fine-tune icon alignment */
    flex-shrink: 0;
}
.toast-header .message-container span {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}
.toast-success {
    background-color:rgb(143, 175, 140) !important;
    color:rgb(53, 86, 61) !important;
}
.toast-error {
    background-color:rgb(255, 192, 192) !important;
    color:rgb(116, 25, 25) !important;
}
.toast-warning {
    background-color:rgb(255, 243, 205) !important;
    color:rgb(133, 100, 4) !important;
}
.toast-info {
    background-color:rgb(193, 236, 241) !important;
    color:rgb(12, 84, 96) !important;
}
@media (max-width: 991px) {
    .toast-container {
        position: fixed;
        top: 86.84px;
        right: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        padding: 0;
        margin: 0;
    }
    .toast-container>:not(:last-child) {
        margin-bottom: 0 !important;
    }
    .toast {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        margin: 0;
        transform: translateY(-100%);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .toast.show {
        transform: translateY(0);
    }
    .toast-header {
        justify-content: center;
        text-align: center;
        padding: 0.75rem 1rem;
    }
    .toast-header .message-container {
        justify-content: center;
        max-width: 100%;
        flex: 0 1 auto;
    }
    .toast-header .message-container i {
        margin-top: 0;
    }
}

/* Promo Bar Styling */
.promo-bar {
    background-color: var(--secondary-grey);
}

.promo-bar a {
    color: var(--text-black);
}

@media (max-width: 991.98px) {
    .promo-bar {
        background-color: var(--primary-red);
    }

    .promo-bar a {
        color: white !important;
        /* Important to override inline styles or more specific selectors */
        font-weight: 300;
        font-size: 13px !important;
    }
}

/* Promo Bar Transitions */
.promo-bar {
    overflow: hidden;
    position: relative;
}

.promo-bar a {
    display: block;
    will-change: transform, opacity;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Ensure transitions work on both desktop and mobile */
.promo-bar.d-none.d-lg-block,
.promo-bar.d-flex.justify-content-center.d-lg-none {
    overflow: hidden;
    position: relative;
}

.promo-bar.d-none.d-lg-block a,
.promo-bar.d-flex.justify-content-center.d-lg-none a {
    display: block;
    will-change: transform, opacity;
    transform: translateX(0);
    opacity: 1;
}

/* Base Page Header */

.base-page-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .base-page-header {
        height: 400px;
    }
}

.base-page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.base-page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.base-page-header .container {
    position: relative;
    z-index: 1;
}

/* Navigation */

.cart-badge {
    font-size: 0.7rem;
    font-weight: 400;
    background-color: var(--primary-red);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 2px;
    line-height: 1;
}

@media (max-width: 991px) {
    .cart-badge {
        top: -1px;
        right: -4px;
        font-size: 0.6rem;
        min-width: 15px;
        height: 15px;
    }
}

.desktop-logo {
    height: 75px;
}

.logo-link {
    transition: all 200ms ease-out;
}

.logo-link:hover {
    filter: saturate(1.5);
}

.mobile-logo {
    height: 40px;
}

.red-desktop-menu-bar {
    background-color: var(--primary-red);
    transition: transform 0.3s ease-in-out;
    position: relative;
    z-index: 1001;
}

.red-desktop-menu-bar.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Add a spacer div that will maintain the correct height when menu is fixed */
.red-menu-spacer {
    display: none;
    height: 45px; /* Height of the red menu bar */
}

.red-menu-spacer.active {
    display: block;
}

.red-desktop-menu-bar .nav-link {
    font-size: 15.5px !important;
    padding: 0.6rem 0.8rem !important;
    text-transform: uppercase;
    position: relative;
}

.red-desktop-menu-bar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.35rem;
    left: 0.8rem;
    right: 0.8rem;
    height: 1.5px;
    background-color: white;
    transform: scaleX(0);
}

.red-desktop-menu-bar .nav-link:hover::after,
.red-desktop-menu-bar .mega-menu-parent:hover .nav-link::after {
    transform: scaleX(1);
}

/* Mega Menu Styles */
.mega-menu-parent {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    padding: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.mega-menu-parent:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

/* Container for mega menu content */
.mega-menu .container {
    position: relative;
    z-index: 1;
}

.mega-menu-links {
    list-style: none;
    padding: 0;
}

.mega-menu-links li {
    margin-bottom: 0.3rem;
}

.mega-menu-links a {
    color: var(--primary-grey);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.mega-menu-links a:hover {
    color: var(--primary-red);
}

.mega-menu-image {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--default-border-radius);
    margin-bottom: 1rem;
}

.mega-menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


@media (min-width: 992px) {
    .navbar>.container-xl {
        justify-content: center !important;
    }
}

@media (max-width: 991px) {
    .navbar {
        padding: 0.25rem 0 !important;
        border-bottom: 1px solid #d4d2cf;
        transition: box-shadow 0.3s ease-in-out, border-bottom 0.3s ease-in-out;
        z-index: 1030;
    }

    .navbar.scrolled {
        border-bottom: none;
        box-shadow: 0px 1px 15px 0px rgba(0,0,0,0.2);
    }

    .navbar-toggler:focus {
        box-shadow: none !important;
    }
}

@media (max-width: 365px) {
    .mobile-nav-heading {
        display: none !important;
    }
    .mobile-nav-icons {
        align-self: center !important;
        gap: 0.85rem !important;
    }
    .mobile-nav-icons .flex-column {
        margin-right: 0 !important;
    }
}

/* Add padding to body when menu is fixed */
body.menu-fixed {
    padding-top: 0 !important; /* Remove the previous padding-top */
}

@media (max-width: 991px) {
    body.menu-fixed {
        padding-top: 59px !important; /* Keep mobile padding when menu is fixed */
    }
}

.desktop-top-nav.no-bottom-padding {
    padding-bottom: 0 !important;
}

.modern-offcanvas {
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-offcanvas.showing {
    transform: translateX(0);
}

.modern-offcanvas:not(.showing) {
    transform: translateX(-100%);
}

.nav-offcanvas-header {
    padding: 0.7rem 1rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

.nav-levels-container {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.nav-level {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-level.active {
    transform: translateX(0);
}

.nav-level.previous {
    transform: translateX(-100%);
}

.nav-level-header {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #dee2e6;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.nav-level-header .back-button {
    background: none;
    border: none;
    padding: 0.25rem;
    margin-right: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #000;
}

.nav-level-header .back-button svg {
    width: 24px;
    height: 24px;
}

.nav-level-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.offcanvas .nav-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    opacity: 0;
    transform: translateX(-20px);
    will-change: transform, opacity;
}

.offcanvas .nav-item.has-submenu::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-top: 2px solid #666;
    transform: rotate(45deg);
    margin-left: auto;
}

.nav-level.active .nav-item {
    opacity: 1;
    transform: translateX(0);
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.2s ease;
}

.nav-level.active .nav-item:nth-child(2) { transition-delay: 0.05s; }  /* First item after header */
.nav-level.active .nav-item:nth-child(3) { transition-delay: 0.1s; }
.nav-level.active .nav-item:nth-child(4) { transition-delay: 0.15s; }
.nav-level.active .nav-item:nth-child(5) { transition-delay: 0.2s; }
.nav-level.active .nav-item:nth-child(6) { transition-delay: 0.25s; }
.nav-level.active .nav-item:nth-child(7) { transition-delay: 0.3s; }
.nav-level.active .nav-item:nth-child(8) { transition-delay: 0.35s; }
.nav-level.active .nav-item:nth-child(9) { transition-delay: 0.4s; }
.nav-level.active .nav-item:nth-child(10) { transition-delay: 0.45s; }
.nav-level.active .nav-item:nth-child(11) { transition-delay: 0.5s; }
.nav-level.active .nav-item:nth-child(12) { transition-delay: 0.55s; }
.nav-level.active .nav-item:nth-child(13) { transition-delay: 0.6s; }
.nav-level.active .nav-item:nth-child(14) { transition-delay: 0.65s; }
.nav-level.active .nav-item:nth-child(15) { transition-delay: 0.7s; }
.nav-level.active .nav-item:nth-child(16) { transition-delay: 0.75s; }
.nav-level.active .nav-item:nth-child(17) { transition-delay: 0.8s; }

.nav-level:not(.active) .nav-item {
    opacity: 0;
    transform: translateX(-20px);
    transition-delay: 0s !important;
}

.offcanvas-footer {
    background-color: var(--primary-red);
    color: white;
    padding: 1rem;
    margin-top: auto;
}

.offcanvas-footer .bottom-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.offcanvas-footer .social-links {
    display: flex;
    gap: 0.6rem;
}

.offcanvas-footer .social-links a {
    color: white;
    text-decoration: none;
}

.offcanvas-body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.nav-levels-container {
    flex: 1;
}

.offcanvas-header .logo {
    max-height: 40px;
    width: auto;
}

.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Desktop Offcanvas Search */

.search-offcanvas {
    height: 175px !important;
    overflow: visible !important;
    width: 100vw;
    max-width: 100vw;
}

/* Position the suggestions container relative to the input */
.search-input-container {
    position: relative;
    width: 725px;
}

/* Style the suggestions dropdown */
.search-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: var(--default-border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    z-index: 1070;
    margin-top: 0.5rem;
    padding: 1rem;
    display: none; /* Start hidden */
}

/* Style the suggestion items */
.suggestion-item {
    padding: 0.25rem 0.5rem;
    transition: text-decoration 0.1s;
    margin-bottom: 0.2rem;
    display: block;
}

.suggestion-item:hover {
    text-decoration: underline;
    background-color: transparent;
}

.suggestion-item .suggestion-title {
    transition: text-decoration 0.1s;
}

.suggestion-item:hover .suggestion-title {
    text-decoration: underline;
}

/* Style the suggestions sections */
.suggestions-section {
    margin-bottom: 1.5rem;
    display: block; /* Ensure sections are visible */
}

.suggestions-section:last-child {
    margin-bottom: 0;
}

.suggestions-section .p {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Price Styles in base css due to global need */

.original-price {
    text-decoration: line-through;
}

.sale-price {
    background-color: var(--primary-red);
    color: white;
}

/* Product grid specific styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

/* Responsive product grid for extra small screens */
@media (max-width: 575px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.product-item {
    height: 100%;
    display: block;
    transition: text-decoration 0.1s;
}

.product-item:hover {
    text-decoration: none;
}

.product-item:hover .suggestion-title {
    text-decoration: underline;
}

/* Max height containers for scrollable sections */
.tartans-container,
.pages-container {
    max-height: 300px;
    overflow-y: auto;
}

.products-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Remove absolute positioning for the close button in the input group */
.input-group .btn-close {
    position: static;
    z-index: auto;
}

/* Hide the default clear (x) button in search inputs for WebKit browsers */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.search-offcanvas .offcanvas-body {
    position: relative;
    overflow: visible !important; /* Force overflow visible */
    padding: 1rem;
}

/* Currency Selector Button */
.currency-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--primary-grey);
    border-radius: var(--default-border-radius);
    color: var(--text-black);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .currency-selector {
        padding: 0.375rem 0.75rem;
    }
}

.currency-selector:hover {
    border-color: var(--primary-red);
}

.currency-selector .currency-code {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}


/* White variant for red background */
.currency-selector-white {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.currency-selector-white:hover {
    border-color: white;
}

.currency-selector-white .currency-code {
    color: white;
}

.currency-selector-white .chevron {
    color: rgba(255, 255, 255, 0.7);
}

/* Currency Modal Radio Buttons */
.currency-options .form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
    cursor: pointer;
}

.currency-options .form-check-input:checked {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.currency-options .form-check-input:focus {
    border-color: var(--primary-red);
    box-shadow: none;
}

.currency-options .form-check-label {
    cursor: pointer;
    padding-left: 0.5rem;
    font-size: 0.95rem;
}

/* Mobile Offcanvas Search */

/* Ensure the offcanvas takes full height and width on mobile */
.mobile-search-offcanvas {
    height: 100vh !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border: none;
    border-radius: 0;
}

/* Style the suggestions container for mobile */
.mobile-search-suggestions {
    margin-top: 1.5rem;
    width: 100%;
}

/* Style the suggestion items */
.mobile-suggestion-item {
    padding: 0.75rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(0,0,0,.1);
}

.mobile-suggestion-item:last-child {
    border-bottom: none;
}

.mobile-suggestion-item:hover {
    background-color: rgba(0,0,0,.05);
}

/* Ensure images in suggestions are properly sized */
.mobile-suggestion-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* Style the search input container */
.mobile-search-input-container {
    padding: 0 1rem;
}

/* Style the suggestions sections */
.mobile-suggestions-section {
    margin-bottom: 1.5rem;
}

.mobile-suggestions-section:last-child {
    margin-bottom: 0;
}

.mobile-suggestions-section h6 {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

/* Add styles for the image container */
.mobile-suggestion-image-container {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.mobile-suggestion-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* Unified suggestion section styles */
.suggestions-section {
    margin-bottom: 1.5rem;
    display: none;
}
.suggestions-section:last-child {
    margin-bottom: 0;
}
.suggestions-section .p {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.suggestion-item {
    padding: 0.25rem 0.5rem;
    transition: text-decoration 0.1s;
    margin-bottom: 0.2rem;
    display: block;
}
.suggestion-item:hover {
    text-decoration: underline;
    background-color: transparent;
}
.suggestion-item .suggestion-title {
    transition: text-decoration 0.1s;
}
.suggestion-item:hover .suggestion-title {
    text-decoration: underline;
}
.mobile-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

/* Responsive mobile product grid for extra small screens */
@media (max-width: 575px) {
    .mobile-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}
.product-item {
    height: 100%;
    display: block;
}
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 0.5rem;
}
.suggestion-price {
    color: var(--text-black);
}

/* Mobile search now uses Bootstrap classes, so we don't need custom flexbox styles */
@media (max-width: 575px) {
    /* Ensure each section takes full width on extra small screens */
    .mobile-search-suggestions .suggestions-section {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .mobile-search-suggestions .suggestions-section:last-child {
        margin-bottom: 0;
    }
    
    /* Reorder sections for extra small screens: Products, Tartans, Pages */
    .mobile-search-suggestions .row {
        display: flex;
        flex-direction: column;
    }
    
    .mobile-search-suggestions .col-12.col-sm-8 {
        order: 1; /* Products first */
    }
    
    .mobile-search-suggestions .col-12.col-sm-4 {
        order: 2; /* Tartans/Pages second */
    }
}

/* Footer */

.newsletter-signup {
    position: relative;
    margin-top: 4rem;
}

.newsletter-wrapper {
    position: relative;
    min-height: 350px;
    /* Added minimum height to ensure visibility */
}

.newsletter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(84, 84, 84, 0.7);
    /* Reduced opacity for image visibility */
}

.newsletter-content {
    position: relative;
    z-index: 1;
}

.newsletter-form .form-control {
    border: 1.5px solid #fff !important;
    color: #fff !important;
    height: 45px !important;
    background-color: rgba(84, 84, 84, 0.8) !important;
}

.newsletter-form .form-control::placeholder {
    color: #dfdfdf !important;
}

.newsletter-form .form-control:focus,
.newsletter-form .form-control:hover {
    border: 1.5px solid #c7c7c7 !important;
}

@media (max-width: 767px) {
    .newsletter-wrapper {
        min-height: 525px;
        /* Increased height for mobile to accommodate stacked form */
    }
}

footer {
    background-color: #fff;
}

.footer-line-height {
    line-height: 1.2;
}

.footer-accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: transform 0.2s ease-in-out;
}

.footer-accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.footer-accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.footer-accordion-button:not(.collapsed) {
    background-color: transparent;
    color: var(--text-black);
}

.footer-accordion-item {
    margin-bottom: 1.5rem;
    border: none;
    position: relative;
}

.footer-accordion-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(82, 82, 82, 0.411);
}

.footer-accordion-button {
    padding: 1.25rem 0;
    font-size: 1.1rem;
}

.footer-accordion-button.collapsed {
    background-color: transparent;
}

.footer-accordion-body {
    padding: 1.25rem 0 0.5rem 0;
}

.footer-accordion-button:not(.collapsed) {
    box-shadow: none !important;
}

@media (max-width: 991.98px) {
    .footer-accordion-body {
        padding-bottom: 0.5rem;
    }
}

.footer-accordion-button:not(.collapsed) .footer-active-link {
    color: var(--primary-red) !important;
}

.footer-accordion-button:not(.collapsed) .icon-wrapper {
    color: var(--primary-red) !important;
}

/* Payment Icons */
/* Start of Selection */
.payment-icon-visa {
    height: auto;
    width: 41.65px;
    vertical-align: middle;
    margin-right: 0.2rem;
}

.payment-icon-mastercard {
    height: auto;
    width: 38.25px;
    vertical-align: middle;
    margin-right: 0.2rem;
}

.payment-icon-amex {
    height: auto;
    width: 27.2px;
    vertical-align: middle;
    margin-right: 0.45rem;
}

.payment-icon-maestro {
    height: auto;
    width: 34px;
    vertical-align: middle;
    margin-right: 0.2rem;
}

.payment-icon-jcb {
    height: auto;
    width: 27.2px;
    vertical-align: middle;
    margin-right: 0.4rem;
}

@media (min-width: 768px) and (max-width: 991px) {
    .payment-icon-jcb {
        margin-right: 0.2rem !important;
    }
}

.payment-icon-discover {
    height: auto;
    width: 27.2px;
    vertical-align: middle;
    margin-right: 0.3rem;
}

.payment-icon-dinersclub {
    height: auto;
    width: 27.2px;
    vertical-align: middle;
}

.payment-icon-applepay {
    height: auto;
    width: 39.95px;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.payment-icon-googlepay {
    height: auto;
    width: 44.2px;
    vertical-align: middle;
    margin-right: 0.15rem;
}
/* End of Selection */

/* Feedback Button Styling */
.feedback-button {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 500;
    background-color: var(--primary-red);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-transform: uppercase;
}

.feedback-button i {
    font-size: 16px;
}

.feedback-text {
    display: inline-block;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .feedback-button {
        right: 15px;
        bottom: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .feedback-button i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .feedback-button {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .feedback-text {
        display: none;
    }
    
    .feedback-button i {
        font-size: 16px;
    }
}

/* Tartan Finder Pagination Styles */
.tartan-finder-pagination .active>.page-link, .tartan-finder-pagination .page-link.active {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

.tartan-finder-pagination .pagination {
    --bs-pagination-color: var(--text-black);
    --bs-pagination-hover-color: var(--text-black);
    --bs-pagination-hover-bg: none;
    --bs-pagination-focus-color: var(--text-black);
    --bs-pagination-focus-bg: none;
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-disabled-bg: #fff;
    --bs-pagination-border-color: #aeaeae;
    --bs-pagination-disabled-border-color: #aeaeae;
}

.tartan-finder-pagination .page-link:hover {
    border-color: #aeaeae;
}

@media (max-width: 575.98px) {
    .tartan-pagination .pagination,
    .tartan-finder-pagination .pagination {
        flex-wrap: wrap;
    }
}

/* Tartan Card and Image Styling (for search results and other pages) */
.tartan-card {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .tartan-card:hover .card-title {
        text-decoration: underline !important;
    }
}

/* Linked to name styling */
.tartan-card .card-text .text-muted,
.search-section .card-text .text-muted {
    color: var(--bs-gray-600) !important;
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Creates a square aspect ratio */
    background-color: #f8f9fa;
    overflow: hidden;
}

.tartan-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Search Results Section Styling */
.search-section {
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 2rem;
}

.search-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Remove border-bottom for search_all_results template */
.search-all-results .search-section {
    border-bottom: none;
    padding-bottom: 0;
}

.search-section h2 {
    color: var(--text-black);
    font-weight: 600;
}

.search-section .btn-outline-primary {
    border-color: var(--primary-red);
    color: var(--primary-red);
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.search-section .btn-outline-primary:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

/* Clickable section titles */
.search-section-title {
    color: var(--text-black);
    text-decoration: none;
}

.search-section-title:hover {
    text-decoration: underline !important;
    color: var(--text-black);
}

/* Search Results Card Styling - No hover effects */
.search-section .card {
    transition: none;
}

.search-section .card:hover {
    transform: none;
    box-shadow: none;
}

.search-section .card-title {
    color: var(--text-black);
    font-weight: 500;
}

.search-section .card-text {
    color: var(--bs-gray-600);
}

.search-section .text-muted {
    color: var(--bs-gray-500) !important;
}

.search-section .text-primary {
    color: var(--primary-red) !important;
}

.search-section .text-decoration-line-through {
    color: var(--bs-gray-500) !important;
}

/* Pages list styling */
.search-section ul.list-unstyled li a {
    color: var(--text-black) !important;
    text-decoration: none !important;
}

.search-section ul.list-unstyled li a:hover {
    text-decoration: underline !important;
    color: var(--text-black) !important;
}

/* Product Card Styles (for search results) */
.product-title {
    transition: text-decoration 0.2s ease-in-out !important;
}

@media (hover: hover) and (pointer: fine) {
    .product-card-link:hover .product-title {
        text-decoration: underline !important;
    }
}

.selling-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--primary-red);
    color: white;
    padding: 4px 8px;
    font-size: 0.85rem;
    font-weight: 300;
    z-index: 10;
    text-transform: uppercase;
    max-width: 35%;
    white-space: normal;
    line-height: 1.2;
    word-wrap: break-word;
    text-align: center;
}

@media (max-width: 575px) {
    .selling-badge {
        display: none !important;
    }
}

/* Product Meta Styles */
.product-meta {
    margin-top: 0.3rem;
    display: flex;
    flex-direction: column;
}

.product-meta__item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--bs-gray-600);
    letter-spacing: 0.01em;
}

.product-meta__icon {
    margin-right: 0.4rem;
    opacity: 0.7;
    color: var(--bs-gray-600);
}

.product-meta__text {
    font-weight: 300;
}

@media (max-width: 575px) {
    .product-meta {
        align-items: center;
        margin-top: 0.5rem;
    }
    
    .product-meta__item {
        justify-content: center;
        text-align: center;
    }
}

/* Product Image Styles */
.product-list-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.product-list-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.has-multiple-images .product-list-image {
    transition: transform 0.3s ease-in-out;
}

.product-list-image--primary {
    z-index: 1;
}

.product-list-image--secondary {
    z-index: 2;
    transform: translateX(100%);
}

@media (hover: hover) and (pointer: fine) {
    .has-multiple-images:hover .product-list-image--secondary {
        transform: translateX(0);
    }

    .has-multiple-images:hover .product-list-image--primary {
        transform: translateX(-100%);
    }
}

@media (max-width: 400px) {
    .product-list-content {
        font-size: 0.9rem !important;
    }
}

/* Hide promo bars while loading */
.promo-loading {
    display: none !important;
}

/* Show promo bars when loaded */
.promo-loaded {
    display: block !important;
}

.promo-loaded.d-flex {
    display: flex !important;
}

/* Product image border */

.product-image-border {
    border: 1px solid rgba(0, 0, 0, 0.175);
    padding: 0.5rem;
}

/* Collection Card Styles for Search Results */
.collection-card {
    transition: none;
}

.collection-card:hover {
    transform: none;
    box-shadow: none;
}

.collection-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.collection-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.collection-image-border {
    border: 1px solid rgba(0, 0, 0, 0.175);
    padding: 0.5rem;
}

.collection-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.collection-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-title {
    color: var(--text-black);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* Collection Card Hover Effect */
@media (hover: hover) and (pointer: fine) {
    .collection-card-link:hover .collection-title {
        text-decoration: underline !important;
    }
}