/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */

/* ==========================================================================
   Base styles: opinionated defaults
========================================================================== */

/*
* Remove text-shadow in selection highlight:
* https://twitter.com/miketaylr/status/12228805301
*
* Vendor-prefixed and regular ::selection selectors cannot be combined:
* https://stackoverflow.com/a/16982510/7133471
*
* Customize the background color to match your design.
*/

::-moz-selection {
    text-shadow: none;
}

::selection {
    text-shadow: none;
}

/* A better looking default horizontal rule */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
* Remove the gap between audio, canvas, iframes,
* images, videos and the bottom of their containers:
* https://github.com/h5bp/html5-boilerplate/issues/440
*/

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/* Remove default fieldset styles. */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}

/* ==========================================================================
   YOUR STYLES GO HERE ...
========================================================================== */

/* global settings */
:root {
    --mainWhite: rgb(230, 230, 230);
    --mainBlue: rgb(94, 175, 202);
    --secondaryBlue: rgb(13, 93, 119);
    --mainGrey: rgb(41, 39, 39);
    --secondaryGrey: rgb(156, 156, 156);
    --mainTransition: 0.3s all ease;
    --secondaryTransition: 0.7s all ease;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch;
    font-family: 'Source Sans Pro', sans-serif; 
    outline: none;
}

html {
    width: 100%;
    height: 100%;
    font-size: 1em;
    line-height: 1.4;
}

body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

.btn-styles {
    border: 2px solid;
    border-radius: 12px;
    padding: 0.5rem 0.9rem;
    margin: 0 0.5rem;
    letter-spacing: 0.15rem;
    font-weight: bolder;
    transition: var(--mainTransition);
    text-transform: uppercase;
}
/* end of global settings */

/* navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    background: var(--mainBlue);
    z-index: 2;
    color: white;
}

.navbar-center {
    position: relative;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    width: 100%;
    max-width: 1220px;
    justify-content: space-between;
    padding: 0 3rem;
}

.fa-bars {
    cursor: pointer;
    transition: var(--mainTransition);
}

.dropdown-menu {
    position: absolute;
    background: var(--mainBlue);
    transform: translateY(70px) rotateX(90deg);
    transform-origin: top;
    text-transform: uppercase;
    transition: var(--mainTransition);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.dropdown-menu ul {
    list-style-type: none;
    padding: 1rem 1.2rem;
}

.dropdown-menu ul li,
.navbar-center h3 {
    cursor: pointer;
}

.nav-icon {
    font-size: 1.2rem;
}

.cart-btn {
    position: relative;
    cursor: pointer;
}

.cart-items-number {
    position: absolute;
    top: -0.25rem;
    left: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mainGrey);
    color: white;
    padding: 0 0.2rem;
    height: 1.2rem;
    border-radius: 5px;
    font-size: 0.8em;
}
/* end of navbar */

/* shopping cart */
.cart {
    position: fixed;
    top: 20px;
    right: 0;
    z-index: 1;
    width: 100%;
    height: 350px;
    max-height: 50%;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--mainBlue);
    color: white;
    transform-origin: top;
    text-transform: uppercase;
    transition: var(--mainTransition);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 2rem;
    transform: rotateX(90deg);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cart::-webkit-scrollbar {
    display: none;
  }

.cart h2 {
    text-align: center;
    text-transform: uppercase;
    padding: 1.5rem 0;
}

.cart-content {
    display: grid;
    row-gap: 1rem;
}

/* a single cart item */
.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
}

.cart-item img {
    width: 120px;
    height: auto;
    border-radius: 6px;
}

.remove-item-btn {
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    width: fit-content;
}

@keyframes alert {
    0%, 100% {
        color: white; 
    }
    50% {
        color:red; 
    }
}

.fa-chevron-up,
.fa-chevron-down {
    cursor: pointer;
}

.cart-item div {
    display: flex;
    flex-flow: nowrap column;
    justify-content: center;
}

.cart-item div h4 {
    text-transform: capitalize;
}

.cart-item div i {
    cursor: pointer;
}

.item-amount {
    text-align: center;
}
/* end of a single cart item */

/* cart footer */
.cart-footer {
    padding: 1.5rem 0;
    text-align: center;
}

.cart-footer h3 {
    text-transform: capitalize;
    padding-bottom: 1.5rem;
}

.checkout-btn {
    cursor: not-allowed;
    background: rgb(196, 196, 196);
    color: rgb(155, 155, 155);
    border-color: rgb(196, 196, 196);
}

.clear-cart-btn {
    cursor: pointer;
    background: none;
    color: white;
    border-color: white;
}

.clear-cart-btn:hover {
    background: white;
    color: var(--mainBlue);
}
/* end of cart footer */
/* end of shopping cart */

/* hero */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--mainWhite);
}

.banner > h1 {
    font-size: 8vw;
    letter-spacing: 3vw;
    margin-left: 3vw;
    transition: var(--mainTransition);
    text-transform: uppercase;
}

.banner-btn {
    position: absolute;
    top: 75%;
    cursor: pointer;
    background: none;
    color: var(--secondaryGrey);
    border-color: var(--secondaryGrey);
}

.banner-btn:hover {
    background: var(--secondaryGrey);
    color: var(--mainWhite);
}
/* end of hero */

/* products */
.products {
    width: 100%;
    padding: 3rem 0;
}

.products-title {
    text-transform: capitalize;
    font-size: 2rem;
    text-align: center;
    padding-bottom: 3rem;
}

.products-center {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 30px;
    width: 85vw;
    max-width: 1200px;
    margin: 0 auto;
    transition: var(--mainTransition);
}

.products-center p {
    text-align: center;
    text-transform: capitalize;
}

/* a single product */
.img-container {
    position: relative;
    overflow: hidden;
    transition: var(--mainTransition);
    border-radius: 12px;
}

.img-container img {
    width: 100%;
    transition: var(--mainTransition);
}

.bag-btn {
    position: absolute;
    right: -131px;
    bottom: 15%;
    border: none;
    background: white;
    color: var(--mainBlue);
    padding: 0.5rem 1rem;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    transition: var(--mainTransition);
    cursor: pointer;
}

.product:hover .bag-btn {
    right: 0;
}

.bag-btn:hover {
    background: var(--mainBlue) !important;
    color: white !important;
}

.product-name {
    text-align: center;
    text-transform: capitalize;
    margin: 0.8rem 0 0 0;
}

.product-price {
    text-align: center;
    color: var(--mainBlue);
}

.product:hover .img-container img {
    opacity: 0.5;
}

.product:hover .img-container  {
    scale: 1.03;
    background: var(--mainGrey);
}

.fa-shopping-cart {
    margin-right: 0.5rem;
}
/* end of a single product */
/* end of products */

/* Small devices (landscape phones, 576px and up) */
@media only screen and (min-width: 576px) {
    .banner > h1 {
        font-size: 2.8rem;
        letter-spacing: 1.5rem;
        margin-left: 1.5rem;
    }

    .products-center {
        width: 75vw;
    }

    .cart {
        width: 380px;
        right: 3rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    .products-center {
        width: 85vw;
    }
}

/* Large devices (desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .products-center {
        width: 90vw;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {}

/* ==========================================================================
   Helper classes
========================================================================== */

/* Hide visually and from screen readers */

.hidden,
[hidden] {
    display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
    /* 1 */
}

/*
* Extends the .sr-only class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.sr-only.focusable:active,
.sr-only.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    white-space: inherit;
    width: auto;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
    visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix::before,
.clearfix::after {
    content: " ";
    display: table;
}

.clearfix::after {
    clear: both;
}


/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
========================================================================== */

@media print {
    *,
    *::before,
    *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    /*
    * Don't show links that are fragment identifiers,
    * or use the `javascript:` pseudo protocol
    */

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
    * Printing Tables:
    * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
    */
   
    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}

