@font-face {
    font-family: 'Blonde';
    src: url('fonts/Blonde_Font.otf') format('opentype');
}

* {
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', sans serif;
}

body {
    background-color: #ece6df;
}

nav {
    animation: fadeup 0.6s ease backwards;
}

.borderbottom {
    animation: fadeup 0.6s ease 0.15s backwards;
}

.filterbar {
    animation: fadeup 0.6s ease 0.25s backwards;
}

.col:nth-child(1) {
    animation: fadeup 0.6s ease 0.35s backwards;
}

.col:nth-child(2) {
    animation: fadeup 0.6s ease 0.45s backwards;
}

.col:nth-child(3) {
    animation: fadeup 0.6s ease 0.55s backwards;
}

.col:nth-child(4) {
    animation: fadeup 0.6s ease 0.65s backwards;
}

.buttoncontainer,
.footer {
    animation: fadeup 0.6s ease 0.75s backwards;
}

@keyframes fadeup {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.logo {
    flex: 1;
    display: flex;
    color: #4a3b32;
    text-decoration: none;
}

.logo-mark {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.logo-main {
    font-family: 'Blonde', 'Libre Baskerville', serif;
    font-size: 1.6rem;
    font-weight: normal;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.logo-i {
    height: 1.07em;
    width: auto;
    margin: 0 0.08em;
    transform: rotate(9.5deg);
    transform-origin: center;
    transition: transform 0.6s ease;
    animation: boardflip 0.8s ease 0.5s backwards;
}

/* starts one full turn back (visually identical), so the board rolls once and lands on its tilt */
@keyframes boardflip {
    from {
        transform: rotate(-350.5deg);
    }

    to {
        transform: rotate(9.5deg);
    }
}

.logo:hover .logo-i {
    transform: rotate(369.5deg);
}

.logo-sub {
    font-size: 0.71rem;
    font-weight: bold;
    letter-spacing: 0.6em;
    margin-right: -0.6em;
    margin-top: 0.2rem;
}

.nav-icons {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
}

.nav-icons a {
    color: #000000;
    display: flex;
    transition: 0.3s;
}

.nav-icons a:hover {
    transform: translateY(-2px);
}

.lang {
    position: relative;
    display: flex;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.lang-current {
    display: flex;
}

.flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    display: block;
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: #ece6df;
    border: 0.5px solid black;
    z-index: 10;
}

/* keeps the -50% centering while fading/sliding in */
@keyframes menudrop {
    from {
        opacity: 0;
        transform: translate(-50%, 8px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* invisible bridge so the menu stays open while crossing the gap */
.lang-menu::before {
    content: "";
    position: absolute;
    top: -0.6rem;
    left: 0;
    right: 0;
    height: 0.6rem;
}

.lang:hover .lang-menu {
    display: block;
    animation: menudrop 0.3s ease;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
}

.lang-option:hover {
    background: #ddd4c9;
}

nav {
    display: flex;
    padding: 2.5rem 6%;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid black;

}

nav img {
    margin-left: -2.5rem;
    width: 10.938rem;
}

.nav-links {
    flex: 1;
    text-align: center;

}

.nav-links ul li {
    list-style: none;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    position: relative;

}

.nav-links ul li a {
    color: #000000;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;

}

.nav-links ul li::after {
    content: "";
    width: 0%;
    height: 1px;
    background: #000000;
    display: block;
    margin: 1px auto 0;
    transition: 0.5s;
}

.nav-links ul li:hover::after,
.nav-links ul li.current::after {
    width: 100%
}

.cart {
    width: 1.875rem !important;
    height: 1.875rem !important;
    margin-left: 1.25rem;
    cursor: pointer;
}

.filterbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* .borderbottom has -0.938rem bottom margin, so effective gap is ~0.94rem less */
    margin: 1.875rem 3% 0;
}

.filters,
.sort {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.filterlabel {
    font-size: 0.95rem;
}

.filterbtn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    color: #000000;
}

.filterbtn:hover {
    text-decoration: underline;
}

.col {
    padding-top: 2.5rem;
    flex-basis: auto;
    margin-bottom: -0.438rem;
    position: relative;
    overflow: hidden;
    display: block;
    color: inherit;
    text-decoration: none;
}

.col img {
    width: 92.5%;
    margin-left: 10px;
    cursor: pointer;
}

.row {
    display: flex;
    justify-content: space-between;
    padding-inline: 2.5%;
}

.layer {
    opacity: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: 0.45s;
    padding-top: 2.5rem;
}

.layer:hover {
    opacity: 1;
}

.layer:hover.col {
    opacity: 0;
}

.teetext {
    margin-top: 0.313rem;
    margin-left: 0.625rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: auto;
}

.size {
    font-size: 0.8rem;
    font-weight: bolder;
}

.price {
    font-size: 0.7rem;
}

.allitems {
    margin-top: 1.25rem;
    /* matches the effective gap between the border and the filter bar */
    margin-bottom: 0.94rem;
    font-size: 1.5rem;
    margin-right: 1.25rem;
    display: inline-block;
}

.borderbottom {
    border-bottom: 0.5px solid black;
    margin: 0 3% -0.938rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.searchwrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.searchbtn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    color: #000000;
}

.searchinput {
    width: 0;
    opacity: 0;
    background: transparent;
    border: none;
    border-bottom: 0.5px solid black;
    outline: none;
    font-size: 0.9rem;
    padding: 0.2rem 0;
    transition: 0.4s;
}

.searchwrap.open .searchinput {
    width: 12rem;
    opacity: 1;
}

.container {
    max-width: auto;
    margin: auto;
    padding-left: 1.563rem;
    padding-right: 1.563rem;
}

.newrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-around;
}

.footer {
    border-top: 0.5px solid black;
    padding: 2rem 6%;
    text-align: center;
    color: #000;
    background: transparent;
    margin-top: 3rem;
}

.footer p {
    font-size: 0.7rem;
    color: #000;
}

.footer h3 {
    color: #ece6df;
    margin-bottom: 0.625rem;
    font-weight: bold;
}

.footer-col-1,
.footer-col-2 {
    min-width: 15.625rem;
    margin-bottom: 1.25rem;
}

.footer-col-2 {
    margin-right: 12.5rem;
}

.footer-col-1 img {
    width: 17.188rem;
    margin-left: 12.5rem;
    margin-right: -6.25rem;
    cursor: pointer;
}

i {
    font-size: 2.5rem;
    margin: 0.25rem;
    cursor: pointer;
    transition: 0.45s;
}


i:hover {
    transform: translateY(-3px);
}

.buttoncontainer {
    margin-top: 1rem;
    padding-top: 10px;
    text-align: center;
}

.page,
.pageactive {
    border: 1px solid #55443a;
    color: #55443a;
    background-color: #ece6df;
    padding: 10px;
    cursor: pointer;
    transition: 0.45s;
    font-size: 14px;
    margin-top: 10px;
}

.page:hover {
    color: #ece6df;
    background-color: #55443a;
    transition: 0.45s;
}

.pageactive {
    color: #ece6df;
    background-color: #55443a;
}

.search {
    display: none;
}

@media (max-width: 900px) {
    nav {
        padding: 1.5rem 5%;
    }

    .nav-links {
        display: none;
    }

    .logo-mark {
        margin-top: 0.35rem;
    }

    .logo-main {
        font-size: 1.3rem;
    }

    .logo-sub {
        font-size: 0.6rem;
    }

    .allitems {
        font-size: 1.3rem;
    }

    .filterbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .filters,
    .sort {
        gap: 1.25rem;
    }

    .row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .searchwrap.open .searchinput {
        width: 8rem;
    }
}
