@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Roboto:wght@400;500&display=swap');


* {
    box-sizing: border-box; 
}
body {
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #222;
    margin: 0;
}


h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

nav {
    position: relative;
    margin-left: auto;
    padding: 10px;
}

nav a {
    color: black;
    text-decoration: none;
    margin: 15px;
    font-size: 1rem;
    font-weight: 500;
    padding: 5px 5px;
    border-radius: 50%; 
    position: relative;
    transition: color 0.25s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #999999;
    transition: width 0.3s ease;
}

nav a:hover {
    color: #999999;
    transform: translateY(-2px);
    transition: color 0.25s ease, transform 0.3s ease;
    text-decoration: none;
}

nav a:hover::after {
    width: 100%;
}

nav a.active {
    text-decoration: underline;
    color: #999999;
    font-weight: 700;
}

#search-form {
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
}

#search-form input {
    border-radius: 15px;
    border: none;
    width: 350px;
    height: 30px;
    background-color: #ebebeb;
    font-size: 1rem;
    padding: 5px;
}
#search-form input:focus{
    color: #000000;
}

#search-form input:focus + label {
    transform: translateY(-20px);
    color: #000000;
}

a:hover {
    color: rgb(209, 150, 0);
    text-decoration: underline;
}

#header {
    background-color: white;
    display: flex;
    align-items: center;
    text-align: right;
}
.input-group {
    position: relative;
    margin-bottom: 30px; 
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 10px;
    min-height: 40px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
    padding-top: 15px; 
}

.input-group label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    transition: transform 0.3s ease, font-size 0.3s ease, background-color 0.3s ease;
}

.input-group input:focus + label,
.input-group input:valid + label {
    transform: translateY(-25px); 
    font-size: 0.75em;
    background-color: white; 
    padding: 0 5px; 
    left: 5px; 
    color: #313131;
}

form {
    width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.form-buttons{
    padding: 10px;
}
.form-buttons button{
    width: 100px;
    height: 25px;
    border-radius: 35px;
}

#main {
    /* background-color: #fef7de; */
    width: 100%;
    height: auto;
    text-align: center;
}

#mainphoto {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

#coffee-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
}

footer {
    grid-area: footer; 
    text-align: center;
    background-color: #333;
    color: white;
    bottom: 0;
    height: 100px;
    padding: 2rem;
    width: 100%;
}
.barista{
    width: 500px;
    height: 500px;
}
.coffee-beans {
    width: 500px;
}
button {
    color: rgb(255, 255, 255);
    background-color: #a98501;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

button:hover {
    color: rgb(255, 255, 255);
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;

}

input:focus, textarea:focus {
  border-color: #0066cc;
  outline: none;
}

#logo {
    width: 200px;
    height: 80px;
    cursor: pointer;
    top: 15px;
    left: 30px;
    /* position: relative; */
    margin-right: auto;
}

.login {
    width: 45px;
    height: 45px;
    top: 10px;
    right: 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.7s;
    position: relative;
}

.login:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.orderbag {
    margin-top: 10px;
    margin-right: 15px;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    transition: background 0.7s;
}

.orderbag:hover {
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.cards-coffee, .cards-desserts {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px;
    justify-content: center;
    padding: 20px;
    max-width: 960px; 
    margin: 0 auto;
}

.card {
    background: #f8f4f4;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

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

.card-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.card button {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    font-size: 15px;
    width: 70px;
    height: 60px;
    margin-bottom: 10px;
    color: black;
    background: none;
    transition: background 0.7s;
}

.card button:hover {
    transform: none;
    background: rgba(0, 0, 0, 1);
    color: white;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.layout {
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main"
        "footer footer";
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto 1fr auto; 
    min-height: 100vh;
}

header { 
    grid-area: header; 
    background: #444; 
    color: white; 
}

aside  { 
    grid-area: sidebar; 
    background: #fef7de; 
    padding: 20px 0;
    position: sticky; 
    top: 0;
    height: 100vh;
}

main   { 
    grid-area: main; 
    background: #f4f4f4;
    width: 100%;
    height: auto;
    text-align: center;
}

#section-sidebar nav {
    display: flex;
    flex-direction: column;
    padding-top: 50px;
}

#section-sidebar nav a.active {
  color: #ff9800;
  font-weight: bold;
  border-left: 3px solid #ff9800;
  padding-left: 6px;
  transition: all 0.3s ease;
}


main section {
    min-height: 80vh; 
    padding: 50px 20px;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

main section:target {
    border: 1px solid #313131;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.Menu button {
    padding: 5px;
    border-radius: 15px;
}

.Menu button:hover {
    cursor: pointer;
}

.cards-location {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
}

.card-location {
    background: #f8f4f4;
    border-radius: 10px;
    text-align: center;
    width: 450px;
}
.card-location img {
    width: 100%;
}
.cards-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px;
    justify-content: center;
    padding: 20px;
    max-width: 960px; 
    margin: 0 auto;
}

.card-menu {
    background: #f8f4f4;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-menu img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-menu:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.password-img {
    width: 250px;
    height: 250px;
}
.password-reset {
    padding: 15px;
}
.password-reset button{ 
    background-color: #0066cc;
    width: 50px;
    height: 25px;
}

.auth-form {
    border-radius: 10px;
}
.auth-form button {
    border-radius: 10px;
    border: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 10px;
  max-width: 1150px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 350px;
  display: block;
}

.card-index{
    border-radius: 10px;
    width: 30%;
}

.card-index2 {
    border-radius: 10px;
    width: 50%;
}


#coffeeCarousel .carousel-item img {
  height: 420px;
  object-fit: cover;
}

#cards-section .card-img-top {
  height: 200px;
  object-fit: cover;
}

.accordion-section {
  max-width: 600px;
  margin: 40px auto;
}

.accordion-item {
    margin-bottom: 10px;
}
.accordion-btn {
  width: 100%;
  padding: 12px;
  text-align: left;
  font-size: 1.2rem;
  background: whitesmoke;
  color: black;
  cursor: pointer;
  transition: 0.3s;
}

.accordion-btn:hover {
  background: #ccc;
}

.accordion-content {
  display: none;
  padding: 10px;
  border: 1px solid #ddd;
  border-top: none;
}

.accordion-content p {
    font-size: 0.8rem;
}

.datetime p {
    font-size: 1rem;
}

:root {
  --coffee-brown: #7b4b2a;
  --coffee-brown-dark: #5e3b21;
}
/* Popup overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}
/* Popup окно */
.popup-content {
  background: #fff8f2;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 450px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: popupFade 0.3s ease;
}
@keyframes popupFade {
  from { transform: scale(0.95) translateY(-10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
/* Кнопка закрытия */
.close-popup {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  border: none;
  background: none;
  color: #999;
  transition: color 0.2s;
}
.close-popup:hover {
  color: var(--coffee-brown);
}
/* Заголовок формы */
.popup-content h4 {
  text-align: center;
  margin-bottom: 1.2rem;
  font-weight: 600;
  color: var(--coffee-brown);
}
/* Поля формы */
.popup-content .form-control {
  margin-bottom: 1rem;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d9c4b0;
  background-color: #fff;
}
.popup-content .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(123, 75, 42, 0.25);
  border-color: var(--coffee-brown);
}
/* Кнопка отправки */
.popup-content button[type="submit"] {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.6rem;
  background-color: var(--coffee-brown);
  border: none;
  transition: background 0.2s;
}
.popup-content button[type="submit"]:hover {
  background-color: var(--coffee-brown-dark);
}
/* Основная кнопка */
#openPopupBtn {
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
  background-color: var(--coffee-brown);
  border: none;
  color: #fff;
  transition: background 0.2s, transform 0.15s;
}
#openPopupBtn:hover {
  background-color: var(--coffee-brown-dark);
  transform: translateY(-1px);
}
/* Заголовки */
h2, h4 {
  color: var(--coffee-brown);
  font-weight: 600;
}

@media (max-width: 575px) { /* Mobile */
  .cards-coffee, .cards-desserts, .cards-menu {grid-template-columns: 1fr;}
  h1 {font-size: 1.5rem;}
  h2 {font-size: 1.3rem}
  h3 {font-size: 0.9rem;}
  p, a {font-size: 0.6rem;}
  #logo {width: 180px; height: 60px;}
  .card{flex: 1 1 calc(100%);}
  
  .datetime h2 {
    font-size: 0.8rem;
  }
  .datetime p {
    font-size: 0.5rem;
  }
  /* Responsice Gallery Fix */
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery-item img {
    width: 100%;
    height: auto;
  }
}

.rating {
  display: inline-flex;
  gap: 5px;
  font-size: 22px;
  cursor: pointer;
  user-select: none;
  margin-top: 8px;
}

.star {
  color: #aaa;
  transition: color 0.2s, transform 0.15s;
}

.star.selected {
  color: gold;
  transform: scale(1.1);
}

.readmore-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid #c49b63;
  border-radius: 6px;
  background: transparent;
  color: #333;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.readmore-btn:hover {
  background: #c49b63;
  color: white;
}

@media (min-width: 576px) and (max-width: 767px) { /* Tablet */
  .cards-coffee, .cards-desserts, .cards-menu {grid-template-columns: 1fr;}
  h1 {font-size: 1.7rem;}
  h2 {font-size: 1.5rem}
  h3 {font-size: 1rem;}
  p, a {font-size: 0.7rem;}
  #logo {width: 190px; height: 70px;}
  .card{flex: 1 1 calc(50% - 20px);}
  
  .datetime h2 {
    font-size: 1.1rem;
  }
  .datetime p {
    font-size: 0.7rem;
  }
  /* Responsice Gallery Fix */
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery-item img {
    width: 100%;
    height: auto;
  }
  /* --- Responsive Sidebar and Layout --- */
  #section-sidebar nav a {
    display: inline-block;
    margin: 5px;
  }
}

@media (min-width: 768px) and (max-width: 991px) { /* Laptop */
  .cards-coffee, .cards-desserts, .cards-menu {grid-template-columns: repeat(2, 1fr);}
  h1 {font-size: 2rem;}
  h2 {font-size: 1.8rem}
  h3 {font-size: 1.2rem;}
  p, a {font-size: 0.9rem;}
  /* Responsice Gallery Fix */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .datetime h2 {
    font-size: 1.3rem;
  }
  .datetime p {
    font-size: 0.8rem;
  }
}

@media (min-width: 992px) { /* Desktop */
  .cards-coffee, .cards-desserts, .cards-menu {
    grid-template-columns: repeat(3, 1fr);
  }
  h1 {font-size: 2.2rem;}
  h2 {font-size: 2rem}
  h3 {font-size: 1.4rem;}
  p, a {font-size: 1.2rem;}
  #logo {width: 200px; height: 80px;}
  .card{flex: 1 1 calc(30% - 20px);}
  /* Responsice Gallery Fix */
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
