/*-----------------------------------*\
  #style.css
\*-----------------------------------*/


/**
 * copyright 2022 codewithsadee
 */


/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {
    /**
   * colors
   */
    --red-orange-color-wheel: hsl(17, 96%, 48%);
    --middle-blue-green: hsl(167, 45%, 72%);
    --smokey-black: hsl(0, 0%, 7%);
    --spanish-gray: hsl(0, 0%, 60%);
    --granite-gray: hsl(0, 0%, 40%);
    --tan-crayola: hsl(27, 46%, 58%);
    --light-gray: hsl(0, 0%, 80%);
    --black_10: hsla(0, 0%, 0%, 0.1);
    --black_25: hsla(0, 0%, 0%, 0.25);
    --black_50: hsla(0, 0%, 0%, 0.4);
    --black_70: hsla(0, 0%, 0%, 0.7);
    --cultured: hsl(220, 16%, 96%);
    --manatee: hsl(218, 11%, 65%);
    --black: hsl(0, 0%, 0%);
    --white: hsl(0, 0%, 100%);
    /**
   * typography
   */
    --ff-roboto: 'Roboto', sans-serif;
    --ff-mr_de_haviland: 'Mr De Haviland', cursive;
    --fs-1: 6rem;
    --fs-2: 3rem;
    --fs-3: 2rem;
    --fs-4: 1.8rem;
    --fs-5: 1.4rem;
    --fs-6: 1.2rem;
    --fw-700: 700;
    --fw-500: 500;
    /**
   * spacing
   */
    --section-padding: 50px;
    /**
   * shadow
   */
    --shadow: 0 0 2px hsla(0, 0%, 0%, 0.2);
    /**
   * transition
   */
    --transition-1: 0.25s ease;
    --transition-2: 0.5s ease;
    --cubic-in: cubic-bezier(0.51, 0.03, 0.64, 0.28);
    --cubic-out: cubic-bezier(0.33, 0.85, 0.4, 0.96);
}


/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li {
    list-style: none;
}

a,
img,
span,
input,
button,
ion-icon {
    display: block;
}

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

img {
    height: auto;
}

input,
button {
    background: none;
    border: none;
    font: inherit;
}

input {
    width: 100%;
}

button {
    cursor: pointer;
}

ion-icon {
    pointer-events: none;
}

address {
    font-style: normal;
}

html {
    font-family: var(--ff-roboto);
    font-size: 10px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    color: var(--black);
    font-size: 1.6rem;
    line-height: 1.7;
}

body.active {
    overflow: hidden;
}

:focus-visible {
    outline-offset: 4px;
}

::placeholder {
    color: var(--manatee);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: hsl(0, 0%, 98%);
}

::-webkit-scrollbar-thumb {
    background-color: hsl(0, 0%, 80%);
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsl(0, 0%, 70%);
}


/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container {
    padding-inline: 15px;
}

.social-wrapper {
    display: flex;
    align-items: center;
}

.social-list {
    display: flex;
    gap: 30px;
}

.social-link {
    transition: var(--transition-1);
}

.social-link:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.section {
    padding-block: var(--section-padding);
}

.img-holder {
    aspect-ratio: var(--width) / var(--height);
    background-color: var(--light-gray);
    overflow: hidden;
}

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

.h2,
.h3 {
    color: var(--smokey-black);
    font-weight: var(--fw-500);
    line-height: 1.4;
}

.h2 {
    font-size: var(--fs-2);
}

.h3 {
    font-size: var(--fs-3);
}

.grid-list {
    display: grid;
    gap: 35px;
}

.has-before {
    position: relative;
    z-index: 1;
}

.has-before::before {
    content: "";
    position: absolute;
}


/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header .input-wrapper {
    display: none;
    color: white;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: black;
    padding-block: 5px;
    z-index: 4;
}

.header.active {
    position: fixed;
    transform: translateY(-100%);
    box-shadow: var(--shadow);
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 3.3rem;
    font-weight: var(--fw-700);
    text-align: center;
    color: burlywood;
}

.header-action {
    display: flex;
    gap: 15px;
    color: white;
}

.header-action-btn {
    position: relative;
    font-size: 24px;
    transition: var(--transition-1);
    color: white;
}

.header-action-btn:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.header-action-btn .btn-badge {
    background-color: var(--tan-crayola);
    color: var(--white);
    font-size: var(--fs-6);
    font-weight: var(--fw-500);
    position: absolute;
    bottom: -10px;
    right: -10px;
    padding-inline: 6px;
    border-radius: 50%;
}

#navbar {
    overflow: hidden;
    background-color: #333;
}


/* Navbar links */

#navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px;
    text-decoration: none;
}


/* Page content */

.content {
    padding: 16px;
}


/* The sticky class is added to the navbar with JS when it reaches its scroll position */

.sticky {
    position: fixed;
    top: 0;
    width: 100%;
}


/* Add some top padding to the page content to prevent sudden quick movement (as the navigation bar gets a new position at the top of the page (position:fixed and top:0) */

.sticky+.content {
    padding-top: 60px;
}


/*-----------------------------------*\
  #SIDEBAR
\*-----------------------------------*/

.sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    max-width: 420px;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    padding: 40px;
    padding-block-end: 100px;
    overflow-y: auto;
    z-index: 5;
    visibility: hidden;
    transition: 0.25s var(--cubic-in);
}

.sidebar.active {
    transform: translateX(-420px);
    visibility: visible;
    transition: 0.5s var(--cubic-out);
}

.nav-close-btn {
    font-size: 30px;
}

.sidebar .wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-block: 40px 75px;
}

.sidebar-list-title,
.contact-list-title,
.social-list-title {
    color: var(--smokey-black);
    font-weight: var(--fw-500);
}

.sidebar-list-title {
    margin-block-end: 15px;
}

.sidebar-link {
    color: var(--spanish-gray);
    margin-block-start: 6px;
    transition: var(--transition-1);
}

.sidebar-link:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.navbar {
    margin-block-end: 60px;
}

.navbar-item:not(:last-child) {
    margin-block-end: 15px;
    display: inline;
}

.navbar-list {
    display: inline;
}

.navbar-link {
    font-weight: var(--fw-500);
    transition: var(--transition-1);
    color: white;
}

.navbar-link:is(:hover, :focus),
.sidebar :is(.address, .contact-item) {
    color: var(--granite-gray);
}

.sidebar .address {
    margin-block-start: 20px;
}

.sidebar .social-wrapper {
    justify-content: space-between;
    margin-block-start: 50px;
}

.overlay {
    position: fixed;
    inset: 0;
    background-color: var(--black_70);
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-1);
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}


/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.hero {
    padding-block-start: calc(var(--section-padding) + 60px);
}

.hero-list {
    display: grid;
    gap: 15px;
}

.hero-card {
    position: relative;
}

.hero-card .img-cover {
    transition: var(--transition-2);
}

.hero-card:is(:hover, :focus) .img-cover {
    transform: scale(1.1);
}

.hero-card .card-content {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
}

.hero-card :is(.card-title, .card-text) {
    font-weight: var(--fw-500);
}

.hero-card .card-title {
    font-size: var(--fs-3);
    transition: var(--transition-1);
}

.hero-card .card-title:is(:hover, :focus) {
    color: var(--tan-crayola);
}


/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about {
    text-align: center;
}

.about .section-title {
    font-family: var(--ff-mr_de_haviland);
    font-size: var(--fs-1);
    font-weight: var(--fw-500);
}

.about .section-text {
    margin-block: 12px 45px;
}

.about-card {
    position: relative;
}

.about-card .img-cover {
    transition: var(--transition-2);
}

.about-card:is(:hover, :focus) .img-cover {
    transform: scale(1.1);
}

.about-card .play-btn {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    color: var(--white);
    font-size: 80px;
    transition: var(--transition-2);
}

.about-card:is(:hover, :focus) .play-btn {
    background-color: var(--black_50);
}


/*-----------------------------------*\
  #PRODUCT
\*-----------------------------------*/

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

.filter-btn-list {
    margin-block: 20px 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn-item {
    position: relative;
    display: flex;
}

.filter-btn-item:not(:last-child)::after {
    content: "|";
    margin-inline: 15px;
}

.filter-btn {
    transition: var(--transition-1);
}

.filter-btn.active {
    color: var(--tan-crayola);
}

.product-card {
    text-align: center;
}

.product-card .card-banner::before {
    inset: 0;
    background-color: var(--black_10);
    opacity: 0;
    transition: var(--transition-1);
}

.product-card .card-banner:is(:hover, :focus-within)::before {
    opacity: 1;
}

.product-card .card-action-list {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 100%);
    display: flex;
    gap: 15px;
    opacity: 0;
    transition: var(--transition-2);
}

.product-card .card-banner:is(:hover, :focus-within) .card-action-list {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.product-card .card-action-btn {
    background-color: var(--white);
    font-size: 22px;
    padding: 12px;
    border-radius: 50%;
    transition: var(--transition-1);
}

.product-card .card-action-btn:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.product-card .badge-list {
    position: absolute;
    top: 15px;
    left: 15px;
}

.product-card .badge {
    color: var(--white);
    font-size: var(--fs-5);
    font-weight: var(--fw-500);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    line-height: 45px;
    margin-block-end: 10px;
}

.product-card .badge.orange {
    background-color: var(--red-orange-color-wheel);
}

.product-card .badge.cyan {
    background-color: var(--middle-blue-green);
}

.product-card .card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--black);
    color: var(--white);
    font-weight: var(--fw-500);
    padding-inline: 15px;
}

.product-card .h3 {
    font-size: unset;
}

.product-card .card-title {
    color: var(--smokey-black);
    font-weight: var(--fw-500);
    margin-block: 18px 5px;
    transition: var(--transition-1);
}

.product-card .card-title:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.product-card .card-price {
    display: flex;
    justify-content: center;
    gap: 15px;
    color: var(--granite-gray);
    font-size: var(--fs-4);
}

.product-card .card-price .del {
    color: var(--spanish-gray);
}

.product-list>* {
    display: none;
}

.product-list[data-filter="all"]>*,
.product-list[data-filter="accessory"]>.accessory,
.product-list[data-filter="decoration"]>.decoration,
.product-list[data-filter="furniture"]>.furniture {
    display: block;
    animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/*-----------------------------------*\
  #BLOG
\*-----------------------------------*/

.blog .title-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 50px;
    margin-block-end: 50px;
}

.blog .btn-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: var(--fw-500);
    transition: var(--transition-1);
}

.blog .btn-link:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.blog-card .card-banner {
    position: relative;
}

.blog-card .card-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--white);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 15px;
    transform: translateX(100%);
    transition: var(--transition-2);
}

.blog-card:is(:hover, :focus) .card-btn {
    transform: translateX(0);
}

.blog-card .card-title {
    margin-block: 20px 10px;
    transition: var(--transition-1);
}

.blog-card .card-title:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.blog-card .card-meta-list {
    display: flex;
    align-items: center;
}

.card-meta-item {
    position: relative;
    color: var(--granite-gray);
    font-size: var(--fs-5);
}

.card-meta-item:not(:last-child)::after {
    content: "/";
    margin-inline: 8px;
    color: var(--spanish-gray);
}

.card-meta-text {
    display: inline-block;
    color: var(--black);
    transition: var(--transition-1);
}

a.card-meta-text:is(:hover, :focus) {
    color: var(--tan-crayola);
}


/*-----------------------------------*\
  #NEWSLATTER
\*-----------------------------------*/

.newsletter {
    --section-padding: 20px;
    background-color: var(--cultured);
}

.newsletter-card {
    padding-inline: 15px;
}

.newsletter-card .card-content {
    margin-block-end: 40px;
}

.newsletter .section-title {
    margin-block-end: 8px;
}

.newsletter-card .h2 {
    --fs-2: 2.6rem;
}

.newsletter .card-form {
    position: relative;
}

.newsletter-card .email-field {
    background-color: var(--white);
    padding-block: 14px;
    padding-inline: 20px 50px;
    outline: 3px solid transparent;
    outline-offset: 0;
    transition: var(--transition-1);
}

.newsletter-card .email-field:focus {
    outline-color: var(--black_25);
}

.newsletter-btn {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    padding-inline: 20px;
}


/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer-top {
    display: grid;
    gap: 30px;
    padding-block-end: 40px;
    display: inline-block;
    justify-content: center;
    align-items: center;
}

.footer-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    display: inline-block;
    margin-left: 80px;
}

.footer-link {
    padding-block: 4px;
}

.footer-link:is(:hover, :focus) {
    color: var(--tan-crayola);
}

.footer-brand .social-list {
    margin-block-start: 30px;
}

.footer-list-title {
    color: var(--smokey-black);
    font-size: var(--fs-4);
    font-weight: var(--fw-500);
    margin-block-end: 15px;
    align-items: center;
}

.footer-form {
    position: relative;
}

.footer .email-field {
    padding-block: 10px;
    padding-inline-end: 35px;
    border-block-end: 1px solid var(--black_25);
    outline: none;
}

.footer .email-field:focus {
    border-color: var(--tan-crayola);
}

.footer-form-btn {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    font-size: 20px;
    color: var(--granite-gray);
}

.footer-list .wrapper {
    display: flex;
    gap: 20px;
    margin-block-start: 20px;
}

.copyright {
    text-align: center;
    padding-block: 20px;
}

.copyright-link {
    display: inline-block;
}

.footer {
    display: inline-block;
    justify-content: center;
    align-items: center;
}


/*-----------------------------------*\
  #BACK TO TOP
\*-----------------------------------*/

.back-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--tan-crayola);
    color: var(--white);
    font-size: 24px;
    padding: 18px;
    border-radius: 50%;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-1);
}

.back-top-btn.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-10px);
}


/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/


/**
 * responsive for large than 575px screen
 */

@media (min-width: 575px) {
    /**
   * REUSED STYLE
   */
    .container {
        max-width: 575px;
        width: 100%;
        margin-inline: auto;
    }
    .grid-list {
        grid-template-columns: 1fr 1fr;
        column-gap: 25px;
    }
    .grid-list>li:last-child {
        grid-column: span 2;
        max-width: calc(50% - 12.5px);
        width: 100%;
        margin-inline: auto;
    }
    /**
   * HEADER
   */
    .header .container {
        gap: 35px;
    }
    .header .input-wrapper {
        display: block;
        position: relative;
    }
    .header .input-field {
        padding-block: 10px;
        padding-inline-end: 30px;
        border-block-end: 1px solid var(--black_25);
        outline: none;
        transition: var(--transition-1);
    }
    .header .input-field::-webkit-search-cancel-button {
        display: none;
    }
    .header .input-field:focus {
        border-block-end-color: var(--tan-crayola);
    }
    .header .input-wrapper ion-icon {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        font-size: 24px;
    }
    .header-action {
        gap: 25px;
    }
    /**
   * NEWSLETTER
   */
    .newsletter {
        background: none;
    }
    .newsletter-card {
        background-color: var(--cultured);
        padding: 20px 30px;
    }
    /**
   * FOOTER
   */
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}


/**
 * responsive for large than 768px screen
 */

@media (min-width: 768px) {
    /**
   * REUSED STYLE
   */
    .container {
        max-width: 768px;
    }
    /**
   * HEADER
   */
    .header-action {
        gap: 35px;
    }
    .header .input-wrapper {
        width: 200px;
    }
    /**
   * HERO
   */
    .hero-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    .hero-list .colspan-2 {
        grid-column: span 2;
    }
    /**
   * ABOUT
   */
    .about .section-text {
        margin-block-end: 75px;
    }
    /**
   * PRODUCT
   */
    .product .title-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-block-end: 80px;
    }
    .filter-btn-list {
        margin: 0;
    }
    /**
   * NEWSLETTER
   */
    .newsletter-card {
        padding: 50px 70px;
    }
}


/**
 * responsive for large than 992px screen
 */

@media (min-width: 992px) {
    /**
   * REUSED STYLE
   */
    .container {
        max-width: 992px;
    }
    .grid-list>li:last-child {
        all: unset;
    }
    .grid-list {
        grid-template-columns: repeat(3, 1fr);
    }
    /**
   * HERO
   */
    .hero-card .card-title {
        --fs-3: 2.2rem;
    }
    /**
   * ABOUT
   */
    .about .section-text {
        max-width: 85ch;
        margin-inline: auto;
    }
    /**
   * NEWSLETTER
   */
    .newsletter {
        --section-padding: 50px;
    }
    .newsletter-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 40px;
    }
    .newsletter-card .card-content {
        margin-block-end: 0;
    }
    /**
   * FOOTER
   */
    .footer-top {
        grid-template-columns: 1fr 0.75fr 0.6fr 1fr;
        padding-block-end: 60px;
    }
}


/**
 * responsive for large than 1200px screen
 */

@media (min-width: 1200px) {
    /**
   * CUSTOM PROPERTY
   */
     :root {
        /**
     * typography
     */
        --fs-2: 3.6rem;
    }
    /**
   * REUSED STYLE
   */
    .container {
        max-width: 1200px;
    }
    /**
   * PRODUCT
   */
    .product-list {
        grid-template-columns: repeat(4, 1fr);
    }
}