@import url(variables.css);

/* Main body */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: var(--color-background);
    font-family: var(--font-body);
    color: var(--color-text);
}

main {
    flex: 1;
}

h1 {
    font-family: var(--font-heading);
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
}   

p {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--color-text);
}

/* Header styles */

header {
    position: relative;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    margin-left: 25px;
}

nav ul {
    font-family: var(--font-heading);
    font-size: var(--font-size-h2);
    font-weight: 700;
    text-transform: uppercase;
    list-style: none;   
    gap: 30px;
    display: flex;
    margin: 0;
}
nav ul li a {
    text-decoration: none;
    color: var(--color-text);
}

.header-icons {
    display: flex;
    gap: 41px;
    margin-right: 81px;    
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.cta {
  display: inline-block;
  background-color: var(--color-background);
  font-family: var(--font-body);
  font-size: 20px;
  text-align: center;
  color: #401713;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: normal;
  white-space: nowrap;
  border: var(--border-width-thin) solid #401713;
  border-radius: 15px;
  padding: 1em 2rem;
  max-height: 75px;
  width: 100%;
  max-width: 300px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.cta:hover {
  background-color: var(--color-primary);
  color: var(--color-background);
}

/* Footer styles */

footer {
    background-color: #BFA095;
    text-align: center;
    padding: 20px 0;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 2px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

footer ul li a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
}

footer ul li a:hover {
    color: #401713;
}

/*Hamburger Menu Styles*/
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Rotate lines when active */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

/* Carousel styles */
.carousel {
    position: relative;
    width: 80%;
    max-width: 1200px;
    height: 500px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    width: 300%; 
}

.carousel-slide {
    flex: 0 0 33.333%; 
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}

.carousel-slide p {
    font-family: var(--font-heading);
    color: var(--color-background);
    font-size: 72px;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-shadow: 
        0 0 4px rgba(166, 94, 78, 0.9),
        0 0 4px rgba(166, 94, 78, 0.9),
        0 0 4px rgba(166, 94, 78, 0.9),
        0 0 4px rgba(166, 94, 78, 0.9);
}

/* General carousel content styles */
.carousel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    z-index: 2;
}

/*Carousel Content 1 styles*/
.carousel-content-slide-1,
.carousel-content-slide-3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.carousel-image-1{
    opacity: 0.9;
}

/*Carousel Content 2 styles*/
.carousel-image_text-2 {
    position: absolute;
    left: 5rem;
    bottom: 1rem;
    line-height: 1;
    z-index: 3;
}

.carousel-content-slide-2-button {
    position: absolute;
    right: 3rem;
    bottom: 5rem;
    z-index: 3;
}

/*Carousel Content 3 styles*/
.carousel-image_text-3 {
    text-transform: uppercase;
}

.shop-now-btn {
    background-color: var(--color-background);
    color: var(--color-text);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: var(--border-radius-medium);
    padding: 10px 30px;
    width: 207px;
    height: 49px;
    font-family: var(--font-heading);
    font-size: var(--font-size-body);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.shop-now-btn:hover {
    background-color: #401713;
    color: #BFA095;
}

.carousel-nav__prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: var(--border-width-thick) solid var(--color-background);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.5s ease;
    left: 20px;
}

.carousel-nav__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: 4px solid #F2E0D0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.5s ease;
    right: 20px;
}

.carousel-nav__prev::before,
.carousel-nav__next::before {
    font-weight: 900;
    font-size: 24px;
    color: var(--color-background);
}

.carousel-nav__prev:hover,
.carousel-nav__next:hover {
    background-color: var(--color-accent);
    border: 4px solid var(--color-accent);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #f2e0d080;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicator.active {
    background-color: var(--color-white);
}


/*Featured Products styles*/

.featured-products {
    padding: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-content: center;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background-color: var(--color-white);
    border: var(--color-accent) 3px solid;
    max-width: 420px;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.1s ease;

}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px #0000001a;
}

.product-card img {
    width: 100%;
    max-height: 352px;
    aspect-ratio: 350/352;
    object-fit: cover;
    background-color: var(--color-white);
    display: block;
    box-sizing: border-box;
}

.product-info {
    padding: 32px 35px 61px 35px;
    width: 100%;
    box-sizing: border-box;
}

.product-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-heading);
    color: var(--color-text);
    font-size: var(--font-size-body);
}

.product-card h3 {
    font-weight: 400;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.1;
}


.product-card_rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.product-card_price {
    margin-top: -12px;
}

/* Loading styles */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    font-family: var(--font-body);
    font-size: 18px;
    color: #401713;
    grid-column: 1 / -1; 
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #BFA095;
    border-top: 3px solid #401713;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}