html {
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    background: #FDFDFD;
}

*, *:before, *:after {
    box-sizing: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* width: 105vw; */
}

header {
    box-shadow: 0 1px 1px -1px rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 12%), 0 1px 3px 0 rgb(0 0 0 / 20%);
    margin-bottom: 2rem;
    background: white;
    position: relative;
    z-index: 2;
}

main, footer {
    background: white;
    margin: 0 auto;
    width: clamp(400px, 80vw, 1200px);
}

main {
    /* min-height: 100%; */
    margin-top: -2rem;
    padding-top: 2rem;
}

header .logo {
    text-align: center;
    padding-top: 2rem;
}

header .logo .site-name {
    font-size: 2rem;
    font-weight: bold;
    padding-bottom: 2rem;
}

header .logo img {
    max-height: 13rem;
    margin-top: -1rem;
}

nav ul {
    list-style: none;
    margin: 0 0.5rem;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav a {
    line-height: 2rem;
    padding: 0.5rem 1rem;
    display: block;
}

nav input[type="checkbox"].menu-icon {
    display: none;
}

section {
    margin: 1rem;
}

section:last-child {
    margin-bottom: 3rem;
}

.homepage section {
    margin: 2rem 1rem;
}

.homepage section:first-child {
    margin-top: 1rem;
}

footer {
    border-top: 1px solid black;
    /*min-height: 5rem;*/
    padding: 1rem 2rem;
    margin-top: auto;
}

main a, footer a {
    color: #039be5;
}

.notfound {
    text-align: center;
}

section.gallery .top-filters {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

section.gallery .top-filters h1 {
    margin: 0;
    flex: 1;
}

section.gallery .top-filters .sort {
    text-align: right;
    flex: 1;
}

section.gallery .top-filters .sort select {
    padding: 0.3rem;
}

section.gallery .dress-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

section.gallery .product {
    width: 240px;
    height: 350px;
    box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 12%), 0 1px 5px 0 rgb(0 0 0 / 20%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

section.gallery .product img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
    position: absolute;
    top: 0;
    left: 0;
}

section.gallery .product .empty-image, section.product .photos .empty-image {
    width: 100%;
    height: 300px;
    background: lightgray;
    display: flex;
    align-items: center;
    justify-content: center;
}

section.product .photos .empty-image {
    width: 70%;
    height: 40vh;
    margin: 0 auto;
}

section.gallery .product .details {
    padding: 1rem;
    position: relative;
    background: white;
}

section.gallery .product .details > div:not(:last-child) {
    margin-bottom: 0.4rem;
}

section.gallery a .product {
    color: black;
}

.empty-image .material-icons {
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.5);
}

section.product {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

section.product > div:nth-child(odd) {
    /*width: calc(50% - 1rem);*/
    width: calc(60% - 1rem);
}

section.product > div:nth-child(even) {
    width: calc(40% - 1rem);
}

section.product .photos {
    text-align: center;
}

section.product .photos img.primary-img-display {
    max-height: 55vh;
    max-width: 100%;
}

section.product .photos .image-set {
    width: 100%;
    margin: 1rem 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

section.product .photos .image-set img.img-preview {
    height: 98px;
    cursor: pointer;
    margin-bottom: 10px;
}

section.product .description {
    text-align: left;
}

section.product .details {
    font-size: 1.2rem;
}

section.product .details > div {
    margin: 1.5rem 0;
}

section.product .details .name {
    font-weight: bold;
    font-size: 2rem;
    margin-top: 0;
}

section.product .details .select select {
    display: block;
    width: 100%;
    padding: 0.4rem;
    margin-top: 0.5rem;
    font-size: 1rem;
}

section.product .details .booking-details {
    margin-top: 3rem;
}

section.product .details .booking-details .calendar-wrapper {
    position: relative;
}

section.product .details .booking-details .calendar-wrapper .spinner {
    position: absolute;
    top: calc(50% - 32px);
    left: calc(50% - 32px);
    -webkit-animation: rotation 1.5s linear infinite;
    animation: rotation 1.5s linear infinite;
    stroke: var(--colour-brand-primary);
}

section.product .details .booking-details #calendar {
    box-sizing: unset;
}

section.product .details .booking-details .try-on-prompt {
    font-size: 14px;
}

section.product .details .booking-details .book-button a {
    font-size: 1rem;
    letter-spacing: 0.2px;
    height: 2.5rem;
    line-height: 2.5rem;
}

@media only screen and (max-width: 1200px) {
    section.product > div:nth-child(odd), section.product > div:nth-child(even) {
        width: calc(50% - 1rem);
    }
}

@media only screen and (max-width: 785px) {
    section.gallery .dress-grid {
        gap: 1rem;
    }
    
    section.gallery a .product {
        width: 200px;
        height: 320px;
    }
    
    section.product > div:nth-child(odd), section.product > div:nth-child(even) {
        width: calc(100% - 1rem);
    }
    
    .menu-toggle {
      display: flex;
      flex-direction: column;
      /* position: relative; */
      /* top: 0px; */
      /* left: 25px; */
      padding-left: 25px;
      padding-bottom: 15px;
      /* margin-right: -25px; */
      z-index: 1;
      -webkit-user-select: none;
      user-select: none;
    }

    nav input[type="checkbox"].menu-icon
    {
      display: flex;
      width: 40px;
      height: 32px;
      position: absolute;
      cursor: pointer;
      opacity: 0;
      z-index: 2;
    }

    .menu-toggle span.menu-icon-component
    {
      display: flex;
      width: 29px;
      height: 2px;
      margin-bottom: 5px;
      position: relative;
      background: #000000;
      border-radius: 3px;
      z-index: 1;
      transform-origin: 5px 0px;
      transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                  background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                  opacity 0.55s ease;
    }

    .menu-toggle span.menu-icon-component:first-child
    {
      transform-origin: 0% 0%;
    }

    .menu-toggle span.menu-icon-component:nth-last-child(2)
    {
      transform-origin: 0% 100%;
    }

    .menu-toggle input:checked ~ span.menu-icon-component
    {
      opacity: 1;
      transform: rotate(45deg) translate(-3px, -1px);
      background: #36383F;
    }
    .menu-toggle input:checked ~ span.menu-icon-component:nth-last-child(3)
    {
      opacity: 0;
      transform: rotate(0deg) scale(0.2, 0.2);
    }

    .menu-toggle input:checked ~ span.menu-icon-component:nth-last-child(2)
    {
      transform: rotate(-45deg) translate(0, -1px);
    }

    .nav-menu
    {
      position: absolute;
      min-width: 320px;
      width: 30vw;
      min-height: 400px;
      box-shadow: 5px 6px 5px -1px rgb(0 0 0 / 50%);
      margin: -10px 0 0 -50px;
      padding: 50px;
      /* padding-top: 125px; */
      background-color: white;
      -webkit-font-smoothing: antialiased;
      transform-origin: 0% 0%;
      transform: translate(-100%, 0);
      transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
      flex-direction: column;
      justify-content: flex-start;
    }

    .nav-menu li
    {
      padding: 10px 0;
      transition-delay: 2s;
    }

    .menu-toggle input:checked ~ ul
    {
      transform: none;
    }
}

@media only screen and (max-width : 600px) {
    .container {
        /* width: 125vw; */
    }
    
    main, footer {
        width: 100vw;
    }
    
    .empty-image .material-icons {
        font-size: 3rem;
    }
}

@media only screen and (max-width : 460px) {
    section.gallery a .product {
        width: calc(50vw - 1.5rem);
    }
}

@media only screen and (max-width : 400px) {
    .container {
         width: 125vw; 
    }
    
    section.gallery a .product {
        width: 85vw;
        height: 400px;
    }
}

@-webkit-keyframes rotation
{
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(270deg);
        transform: rotate(270deg);
    }
}

@keyframes rotation
{
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(270deg);
        transform: rotate(270deg);
    }
}

.circle
{
    stroke-dasharray: 180;
    stroke-dashoffset: 0;
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
    -webkit-animation: turn 1.5s ease-in-out infinite;
    animation: turn 1.5s ease-in-out infinite;
}

@-webkit-keyframes turn
{
    0% {
        stroke-dashoffset: 180;
    }

    50% {
        stroke-dashoffset: 45;
        -webkit-transform: rotate(135deg);
        transform: rotate(135deg);
    }

    100% {
        stroke-dashoffset: 180;
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}

@keyframes turn
{
    0% {
        stroke-dashoffset: 180;
    }

    50% {
        stroke-dashoffset: 45;
        -webkit-transform: rotate(135deg);
        transform: rotate(135deg);
    }

    100% {
        stroke-dashoffset: 180;
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}