/* Общие стили для всех страниц */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  background-image: url('img/глав фон.png');
  background-attachment: fixed;
  background-size: cover;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.features {
  background-color: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  text-align: center;
}

.features p {
  display: inline-block;
  margin: 0 20px;
}

.features a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.features a:hover {
  background-color: #2575fc;
  color: white;
}

#scrollBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: #2575fc;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
}

#scrollBtn:hover {
  background-color: #0056b3;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.cart-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #ff6b6b;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: all 0.3s;
}

.cart-icon:hover {
  transform: scale(1.1);
  background-color: #ff5252;
}

.cart-icon.pulse {
    animation: cartPulse 0.5s;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

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

.flying-image {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 5px;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

h2 {
  text-align: center;
  margin: 30px 0;
  font-size: 2.2rem;
  position: relative;
}

.dark-heading {
  color: #2c3e50;
}

.light-heading {
  color: #ffffff;
}

h2:after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, #a551ff, #307cff);
  margin: 10px auto;
  border-radius: 2px;
}

.products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-bottom: 50px;
}

.product-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  width: 350px;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-image {
  width: 100%;
  height: 300px;
  object-fit: fill;
}

.product-bed-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.product-furniture-image {
  width: 100%;
  height: 300px;
  object-fit: contain;
}

.product-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #2c3e50;
  flex-grow: 1;
}

.product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2575fc;
  margin: 10px 0;
}

.add-to-cart {
  background: linear-gradient(to right, #6a11cb, #2575fc);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  margin-top: 15px;
}

.add-to-cart:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
}

.add-to-cart:active {
  transform: translateY(0);
}

footer {
  background: #2c3e50;
  color: white;
  padding: 30px 0;
  text-align: center;
}

footer p {
  margin: 10px 0;
}

footer a {
  color: #a551ff;
  text-decoration: none;
}

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

/* Модальное окно корзины */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: modalOpen 0.4s ease;
}

@keyframes modalOpen {
  from {opacity: 0; transform: translateY(-50px);}
  to {opacity: 1; transform: translateY(0);}
}

.modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px 10px 0 0;
}

.close {
  font-size: 30px;
  cursor: pointer;
  transition: all 0.3s;
}

.close:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px;
}

.cart-items {
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.cart-item:last-child {
  border-bottom: none;
}

.item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  margin-right: 15px;
}

.item-details {
  flex-grow: 1;
}

.item-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.item-price {
  color: #2575fc;
  font-weight: 700;
}

.item-quantity {
  display: flex;
  align-items: center;
  margin: 0 15px;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: #2575fc;
  color: white;
}

.quantity-value {
  margin: 0 10px;
  min-width: 30px;
  text-align: center;
}

.remove-item {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.remove-item:hover {
  background: #ff5252;
}

.cart-total {
  text-align: right;
  padding: 20px;
  font-size: 1.4rem;
  font-weight: 700;
  border-top: 2px solid #eee;
}

.total-price {
  color: #2575fc;
  font-size: 1.6rem;
}

.checkout-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(to right, #00b09b, #96c93d);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.checkout-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 176, 155, 0.4);
}

.empty-cart {
  text-align: center;
  padding: 40px 20px;
  color: #777;
}

.empty-cart i {
  font-size: 60px;
  margin-bottom: 20px;
  color: #ddd;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2575fc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 117, 252, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.order-confirmation {
    text-align: center;
    padding: 20px;
}

.order-confirmation h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.order-confirmation p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.order-confirmation strong {
    color: #2575fc;
    font-size: 1.3rem;
}

.order-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.order-details h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.order-details ul {
    list-style-type: none;
    padding: 0;
}

.order-details li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.order-details li:last-child {
    border-bottom: none;
}

/* Иконка профиля */
.profile-icon {
    position: fixed;
    top: 20px;
    right: 80px; /* Рядом с корзиной */
    background-color: #4CAF50;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s;
}

.profile-icon:hover {
    transform: scale(1.1);
    background-color: #45a049;
}

.profile-icon.pulse {
    animation: profilePulse 0.5s;
}

@keyframes profilePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Модальное окно профиля */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.profile-modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalOpen 0.4s ease;
}

.profile-modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

/* Стили для страницы заказов */
.orders-page {
    padding: 20px;
}

.orders-page h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.order-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.order-number {
    font-weight: 700;
    color: #4CAF50;
    font-size: 1.2rem;
}

.order-date {
    color: #777;
}

.order-items {
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.order-item-details {
    flex-grow: 1;
}

.order-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.order-item-price {
    color: #2575fc;
    font-weight: 700;
}

.order-total {
    text-align: right;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2575fc;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.no-orders {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.no-orders i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #ddd;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-icon {
        right: 80px;
        top: 20px;
    }
    
    .order-item {
        flex-direction: column;
    }
    
    .order-item-image {
        margin-bottom: 10px;
    }
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes fadeOut {
  from {opacity: 1;}
  to {opacity: 0;}
}

@media (max-width: 768px) {
  .product-card {
      width: 100%;
      max-width: 400px;
  }
  
  .features {
      text-align: center;
  }
  
  .features p {
      display: block;
      margin: 10px 0;
  }
}