/*-------------------------------------------*/
/*--- B R E A K P O I N T   H E L P E R S ---*/
/*-------------------------------------------*/


/*--- phone (+touch) ---*/
/*--- tablet (+touch) ---*/
@media (max-width: 1023px) {
    html { font-size: calc((1rem / 16) * 0.8); }

    .is-mobile-only { display: inherit; }

    .is-desktop-only { display: none !important; }
}

/*--- NOT phone/tablet ---*/
@media (min-width: 1023px) {
    .is-mobile-only { display: none !important; }

    html { font-size: calc((1rem / 16) * 0.9); }
}


/*--- sd ---*/
@media (min-width: 1280px) and (max-width: 1439px) {
    html { font-size: calc((1rem / 16) * 0.9); }
}

/*--- hd ---*/
@media (min-width: 1440px) and (max-width: 1919px) {
    html { font-size: calc((1rem / 16) * 1); }

}

/*--- uhd ---*/
@media (min-width: 1920px) {
    html { font-size: calc((1rem / 16) * 1.2); }
}


/*-------------------*/
/*--- M O B I L E ---*/
/*-------------------*/

@media (max-width: 1023px) {
    :root {
        /*--- font sizes ---*/
        --xl: 50rem;
    }

    section { margin: 60rem 0; }

    .container { padding: 0 30rem; }

    aside {
        padding: 30rem;
    }

    .form-wrapper {
        left: 15rem;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .allow-scroll {
        overflow: scroll;
        width: calc(100% + 30rem);
    }

    /*--- dialogs ---*/
    dialog {
        top: 10vh;
        width: 100%;
        max-width: 90vw;
        max-height: 90vh;
    }

    dialog > * { padding: 15rem; }

    dialog .buttons { flex-wrap: wrap; }

    /*--- page alerts ---*/
    .page-alerts {
        padding: 15rem;
        line-height: 1.2;
    }

    .page-alerts span {
        position: absolute;
        top: -30rem;
        left: unset;
        right: -30rem;
        font-size: 100rem;
        opacity: 0.25;
    }

    /*--- cols ---*/
    .cols.-is-desktop-only {
        display: block;
    }

    /*--- nav ---*/
    body > nav {
        display: none;
        width: 100%;
        padding: 0;
        z-index: 100;
    }

    body > nav .nav {
        display: block;
        border-bottom: 1px solid rgb(var(--grey-125));
    }

    body > nav .nav li {
        text-align: center;
    }

    body > nav .nav > li:first-child {
        width: 100%;
        padding: 30rem 15rem;
        gap: 15rem;
        display: flex;
        justify-content: space-between;
        border-top: 1px solid rgb(var(--grey-125));
    }

    body > nav .nav li:first-child .button {
        width: 100%;
    }

    body > nav .nav li:first-child .button span {
        font-size: 32rem;
        margin-right: 10rem;
    }

    body > nav li a {
        padding: 30rem;
        font-size: var(--m);
        line-height: 1;
        border: 1px solid rgb(var(--grey-125));
        outline: none;
    }

    body > nav ul li a:hover,
    body > nav ul li a.selected,
    body > nav ul li a:focus {
        border: 1px solid rgb(var(--grey-125));
        color: rgb(var(--grey));
    }

    body > nav li a:not(.button):focus {
        outline: none;
    }

    body > nav .sub-nav {
        position: relative;
        top: unset;
        left: unset;
    }

    body > nav .sub-nav li { border: unset; }

    body > nav .sub-nav li a {
        line-height: unset;
    }

    body > nav .logout-row {
        padding: 30rem 15rem;
    }

    /*--- main ---*/
    main { overflow: hidden; }

    .rows.-gap-120 {--row-gap: 90rem; }

    .leaf.-offset-20 { --leaf-offset: 10rem; }

    /* header */
    body > header { padding: 30rem 0; }

    body > header a { width: 75%; }

    body > header a img { width: unset; }

    button.mobile-menu-btn {
        position: relative;
        margin-top: 9rem;
        width: 45rem;
        height: 35rem;
    }

    button.mobile-menu-btn span {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: rgb(var(--grey-875));
        transition: 0.25s ease-in-out;
    }

    button.mobile-menu-btn span:nth-child(2),
    button.mobile-menu-btn span:nth-child(3) {
        top: 50%;
        transform: translateY(-50%);
    }

    button.mobile-menu-btn span:last-child {
        top: unset;
        bottom: 0;
    }

    button.mobile-menu-btn.open span:first-child {
        top: 50%;
        transform: translateY(-50%);
        opacity: 0;
    }

    button.mobile-menu-btn.open span:nth-child(2) {
        transform: rotate(45deg);
    }

    button.mobile-menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg);
    }

    button.mobile-menu-btn.open span:last-child {
        bottom: 50%;
        transform: translateY(-50%);
        opacity: 0;
    }

    /*--- contact ---*/
    #contact-us .intro .cols { display: block; }

    #contact {
        margin-top: 90rem;
    }

    #contact .cols { display: block; }

    /*--- footer */
    footer { margin-top: 90rem; }

    footer .container { padding: 0 15rem; }

    footer .top, footer .bottom { display: block; }

    footer .top { text-align: center; }

    footer .top > a {
        display: inline-block;
        width: 80%;
    }

    footer .top > a img { width: 100%; }

    footer .top ul {
        margin: 30rem 0 15rem;
        justify-content: center;
    }

    footer .bottom ul {
        justify-content: space-between;
        margin: 15rem 5rem;
    }


    footer .bottom ul li::before { content: unset; }

    /*--- home ---*/
    #home h1 { font-size: 9vw; }

    #home .banner { margin: -30rem 0 45rem; }

    .carousel img,
    #home .banner img {
        width: 100%;
        aspect-ratio: 1.5;
        object-fit: cover;
    }

    .carousel .flickity-prev-next-button{
        width: 50rem;
        height: 50rem;
    }

    #home #cards {
        margin-top: 90rem;
        padding: 0;
    }

    #home #cards .cols { display: block; }

    #home #cards .cols.-gap-30 { --col-h-gap: 0rem; }

    #home #cards .slide {
        width: 80%;
        margin: 0 10%;
    }

    #cards .card > div {
        aspect-ratio: 1;
    }

    #cards h3 {
        font-size: var(--l);
    }

    #cards .card .inner {
        font-size: 160rem;
    }

    #home #bio .cols { display: block; }

    /*--- shop ---*/
    #shop-list main section:first-of-type > .cols {
        display: block;
    }

    #shop-list main section:first-of-type > .cols div:last-of-type {
        display: none;
    }

    #shop-list #filters .cols { display: block; }

    #shop-list #filters .form { padding: 15rem; }

    #shop-list #list { margin: 45rem 0; }

    #shop-list #list .cols { display: block; }

    #shop-list .col-1-3 { margin: 15rem 0; }

    #shop-list .item {
        padding: 15rem 30rem;
        border: none;
    }

    #shop-list .item:hover {
        transform: unset;
        opacity: 0.85;
    }

    #shop-list.species .item h3 {
        margin-top: 7.5rem;
        width: 100%;
        text-align: center;
    }

    #shop-list .item .status {
        top: calc(((100vw - 75rem) / 1.2) + 17.5rem);
        left: 50%;
        transform: translateX(-50%);
        right: unset;
        font-size: 15rem;
        white-space: nowrap;
        z-index: 2;
    }

    /*--- shop details ---*/
    #shop-details .product-list { padding: 0 30rem 90rem; }

    #shop-details .product-list .cols { display: block; }

    #shop-details .product-list .left .cols {
        display: flex;
        margin: 0 -5rem;
    }

    #shop-details .product-list .left ul li { padding: 0; }

    #shop-details .product-list ul { margin: 15rem -30rem 0 -30rem; }

    #shop-details .product-list ul li {
        flex-direction: column;
        padding: 22.5rem 30rem;
        gap: 37.5rem;
        align-items: flex-start;
    }

    #shop-details .product-list ul li div:first-of-type {
        width: 100%;
    }

    #shop-details .product-list .quantity-row {
        position: absolute;
        left: 30rem;
        bottom: 22.5rem;
    }

    #shop-details .product-list ul li div:last-child {
        align-self: flex-end;
    }

    #shop-details .product-list .status {
        top: 22.5rem;
        right: 30rem;
        font-size: 15rem;
    }


    /*--- about the garden ---*/
    #about-the-garden section:first-of-type > .cols {
        display: block;
    }

    /*--- about the nursery ---*/
    #about-the-nursery .plants-available ul { column-count: 1; }

    #about-the-nursery section:first-of-type > .cols {
        display: block;
    }

    #about-the-garden .national-garden-scheme ul, #about-the-garden .special-tuesdays ul {
        column-count: 1;
    }

    #about-the-nursery .intro .cols{ display: block; }

    #about-the-nursery .rows.-gap-90 {
        --row-gap: 60rem;
    }

    /*--- shopping basket ---*/
    .form input.quantity { padding: 0.5em 1.0em; }

    #basket table { margin-top: 45rem; }

    #basket #contents .bottom { flex-wrap: wrap; }

    #basket #contents .bottom .left { gap: 5rem; }

    #basket #contents .bottom .right { width: 100%; }

    #basket #contents ul li { padding: 15rem; }

    #basket #contents ul li form { width: 100%; }

    #basket table tr { position: relative; }

    #basket table td {
        padding: 5rem 15rem;
        border-bottom: none;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        background-color: rgb(var(--teal), 0.025);
    }

    #basket table td:not(:last-child) {
        gap: 15rem;
    }

    #basket table td:nth-child(3)::after,
    #basket table td:nth-child(5)::after {
        content: unset;
    }

    #basket #contents .quantity-row {
        display: flex;
        align-items: center;
        gap: 15rem;
    }

    #basket table td:first-child {
        border-top: 1px solid rgba(var(--teal), 0.125);
    }

    #basket table td:last-child {
        margin-bottom: 30rem;
        border-bottom: 1px solid rgba(var(--teal), 0.125);
    }

    #basket table td .button {
        position: absolute;
        top: -15rem;
        right: -15rem;
        font-size: 45rem;
        background-color: rgb(var(--white));
    }

    #basket table label { margin: unset; }

    #basket .leaf {
        width: 50vw;
    }

    #basket table td a {
        margin-top: 15rem;
        font-size: var(--m);
    }

    #basket .free-seeds-offer {
        margin-top: 30rem;
    }

    /*--- checkout ---*/
    #checkout #payment-details-frm .button {
        width: 100%;
    }

    /*--- customer nav ---*/
    #customer main nav {
        margin-bottom: 60rem;
    }

    /*--- customer login ---*/
    #customer.login .form-block .options {
        flex-direction: column;
        gap: 15rem;
    }

    #customer.login .new-customer .button,
    #customer.login .form-block .options .button {
        width: 100%;
    }
}