/* ================= BASE ================= */
body{
  font-family: Arial, sans-serif;
  margin:0;
  padding-top:80px;
  scroll-behavior: smooth;
}

section{
  padding:80px 40px;
  box-sizing:border-box;
}

/* ================= HEADER ================= */
header{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:80px;
  background:#1a1a1a;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 40px;
  z-index:1000;
}


header h1{
  margin:0;
  font-size:22px;
  font-weight:bold;
}

nav{
  display:flex;
  align-items:center;
  gap:20px;
}

nav a{
  color:#fff;
  text-decoration:none;
  font-size:15px;
  transition:opacity 0.2s;
}

nav a:hover{
  opacity:0.7;
}

/* LOGIN BUTTON */
header button{
  background:#fff;
  color:#000;
  border:none;
  padding:8px 14px;
  border-radius:4px;
  cursor:pointer;
  font-size:14px;
  margin-right: 45px;
}
.welcome{
  font-size:14px;
  color:#fff;
  opacity:0.9;
}

/* logout button */
.logout-btn{
  background:#c0392b;
  color:#fff;
  border:none;
  padding:8px 14px;
  border-radius:4px;
  cursor:pointer;
  font-size:14px;
  transition:background 0.2s;
}

.logout-btn:hover{
  background:#a93226;
}

/* ================= HERO ================= */
/* ================= HERO ADVANCED ================= */
.hero{
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #fff;
}

/* BACKGROUND SLIDES */
.hero-bg{
  position:absolute;
  inset:0;
  z-index:0;
}

.hero-bg .slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  opacity:0;
  transition:opacity 1.5s ease;
}

.hero-bg .slide.active{
  opacity:1;
}

/* CONTENT */
.hero-content{
  position:relative;
  z-index:2;
  max-width:480px;
  margin-right:60px;
}

/* INFO BOX */
.hero-box{
  background:rgba(0, 0, 0, 0.6);
  padding:25px;
  border-radius:10px;
  margin-top:20px;
}

.hero-box h3{
  margin-top:0;
}

.hero-clock{
  margin-top:15px;
  font-size:18px;
  font-weight:bold;
}


.hero h2{
  font-size:36px;
  margin-bottom:10px;
}

.hero p{
  font-size:18px;
  color:#e7e7e7;
}

h2 {
  text-align: center; /* заголовки по центру */
}

/* ================= PRODUCTS ================= */
.products{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
  margin-top:30px;
}

.card{
  border:1px solid #ddd;
  padding:20px;
  text-align:center;
  border-radius:6px;
  background:#fff;
}

/* ================= FOOTER ================= */
.main-footer{
  display: flex;
  justify-content: center;
  gap: 120px; 
  background: #000;
  color: #fff;
  padding: 30px 40px;
  flex-wrap: wrap;
  align-items:center;
}

.footer-links a{
  color:#fff;
  margin-left:20px;
  text-decoration:none;
  font-size:14px;
}

.footer-links a:hover{
  text-decoration:underline;
}

/* ================= LOGIN POPUP ================= */
.form-popup{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  justify-content:center;
  align-items:center;
  z-index:2000;
}
.form-popup.active{display:flex}

.form-box{
  background:#fff;
  padding:20px;
  width:320px;
  position:relative;
  border-radius:6px;
}

.close-btn{
  position:absolute;
  top:10px;
  right:10px;
  cursor:pointer;
}

.signup{display:none}
.form-popup.show-signup .login{display:none}
.form-popup.show-signup .signup{display:block}

input{
  width:100%;
  padding:8px;
  margin-bottom:10px;
  box-sizing:border-box;
}

.reviews{
  background:#fafafa;
}

.reviews-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:20px;
  margin-top:40px;
}

.review-card{
  background:#fff;
  padding:20px;
  border-radius:6px;
  border:1px solid #ddd;
}

.review-card span{
  display:block;
  margin-top:10px;
  font-weight:bold;
}

/* ================= CONTACT SECTION ================= */

.contact-section {
  background: #f7f7f7;
  min-height: 100vh;
  padding: 80px 40px;
  box-sizing: border-box;
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  font-weight: bold;
  color: #111;
}

.section-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

/* -------- CONTACT INFO -------- */

.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 16px;
  color: #333;
}

.contact-info i {
  font-size: 18px;
  color: #000;
  min-width: 22px;
}

/* -------- CONTACT FORM -------- */

.contact-form {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #000;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.submit-button {
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-button:hover {
  background: #333;
}

/* MESSAGE (SUCCESS / ERROR) */
#contact-message {
  margin-bottom: 15px;
  font-size: 14px;
}
/* ================= CHAT ================= */
.chat-icon{
  position:fixed;
  bottom:20px;
  right:20px;
  background:#222;
  color:#fff;
  width:55px;
  height:55px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  cursor:pointer;
  z-index:999;
}

.chat-box{
  position:fixed;
  bottom:90px;
  right:20px;
  width:280px;
  background:#fff;
  border:1px solid #ccc;
  display:none;
  flex-direction:column;
  z-index:999;
}

.chat-box.active{display:flex}

.chat-header{
  background:#222;
  color:#fff;
  padding:10px;
  display:flex;
  justify-content:space-between;
}

.chat-messages{
  padding:10px;
  height:180px;
  overflow-y:auto;
  font-size:14px;
}

.chat-input{
  display:flex;
  border-top:1px solid #ccc;
}

.chat-input input{
  flex:1;
  border:none;
  padding:8px;
}

.chat-input button{
  border:none;
  background:#222;
  color:#fff;
  padding:8px;
}

/* ================= CART ================= */
.cart-icon{
  position:fixed;
  bottom:20px;
  left:20px;
  background:#000;
  color:#fff;
  width:55px;
  height:55px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  cursor:pointer;
  z-index:999;
}

.cart-count{
  position:absolute;
  top:-5px;
  right:-5px;
  background:#e74c3c;
  color:#fff;
  font-size:12px;
  font-weight:bold;
  width:20px;
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
}

.cart-box{
  position:fixed;
  bottom:90px;
  left:20px;
  width:300px;
  background:#fff;
  border-radius:8px;
  padding:15px;
  display:none;
  flex-direction:column;
  z-index:999;
}

.cart-box.active{display:flex}


/* ===== PRODUCTS IN ONE ROW ===== */
.row-products{
  display:flex;
  gap:30px;
  justify-content:center;
  flex-wrap:wrap; /* щоб на мобільному ламалось */
}

.row-products .card{
  width:240px;
  background:#fff;
  border-radius:8px;
  padding:15px;
  text-align:center;
  box-shadow:0 5px 15px rgba(0,0,0,0.1);
  transition:transform 0.2s;
}

.row-products .card:hover{
  transform:translateY(-5px);
}

.row-products img{
  width:100%;
  height:260px;
  object-fit:cover;
  border-radius:6px;
  margin-bottom:10px;
}

.row-products .price{
  font-weight:bold;
  margin:10px 0;
}

.row-products button{
  width:100%;
  padding:10px;
  background:#000;
  color:#fff;
  border:none;
  border-radius:6px;
  cursor:pointer;
}

.row-products button:hover{
  background:#333;
}

#contact-message{
  margin-bottom:15px;
  font-size:14px;
  font-weight:bold;
}

/* ================= ADMIN ================= */
.admin-body{
  background:#f4f4f4;
  padding:20px;
}

.admin-box{
  background:#fff;
  padding:15px;
  margin-bottom:20px;
  border-radius:4px;
}

.admin-table{
  width:100%;
  border-collapse:collapse;
}

.admin-table th,
.admin-table td{
  border:1px solid #ccc;
  padding:8px;
}


.admin-link-btn{
  display:inline-block;
  background:#3498db;
  color:#fff;
  padding:8px 14px;
  border-radius:4px;
  text-decoration:none;
}

.admin-link-btn:hover{
  background:#2980b9;
}
/* ================= MOBILE ================= */
@media (max-width:900px){
  header{
      flex-direction:column;
      height:auto;
      padding:15px;
      gap:10px;
  }

  nav{
      flex-wrap:wrap;
      justify-content:center;
  }

  section{
      padding:60px 20px;
  }

  .section-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 26px;
  }
  .product-row {
    flex-wrap: wrap;
  }

  .product-card {
    width: 90%;
    max-width: 320px;
  }
}
