/* Products Hero Section */
.products-hero {
  position: relative;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("img/products-hero.jpg") center center no-repeat;
  background-size: cover;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(58, 40, 21, 0.85),
    rgba(212, 175, 55, 0.3)
  );
  z-index: 1;
}

.products-hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  text-align: center;
  color: white;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 300;
  opacity: 0.95;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

/* Cart Button in Header */
.cart-menu-item {
  position: relative;
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #d4af37 0%, #f4e5b0 50%, #d4af37 100%);
  color: #3a2815;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-left: 10px;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  position: relative;
}

.cart-button svg {
  width: 20px;
  height: 20px;
}

.cart-button:hover {
  background: linear-gradient(135deg, #f4e5b0 0%, #d4af37 50%, #f4e5b0 100%);
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dd0e1a;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(221, 14, 26, 0.4);
}

/* Cart Dropdown - DÜZELTİLMİŞ */
.cart-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: white;
  width: 350px;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
}

/* Görünmez köprü - buton ile dropdown arası */
.cart-dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

/* Hover durumunda göster - DÜZELTİLMİŞ */
.cart-menu-item:hover .cart-dropdown,
.header-cart-wrapper:hover .cart-dropdown,
.cart-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #d4af37 0%, #f4e5b0 100%);
}

.cart-header h3 {
  margin: 0;
  font-size: 18px;
  color: #3a2815;
  font-weight: 600;
}

.cart-items {
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
}

.empty-cart {
  text-align: center;
  color: #999;
  padding: 30px 20px;
  font-size: 15px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #f9f9f9;
  transition: all 0.2s ease;
}

.cart-item:hover {
  background: #f0f0f0;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #3a2815;
  margin-bottom: 5px;
}

.cart-item-price {
  font-size: 13px;
  color: #666;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.quantity-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: #d4af37;
  border-color: #d4af37;
  color: white;
}

.quantity-value {
  font-size: 13px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.remove-item {
  background: none;
  border: none;
  color: #dd0e1a;
  cursor: pointer;
  padding: 5px;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.remove-item:hover {
  transform: scale(1.2);
}

.cart-footer {
  border-top: 1px solid #eee;
  padding: 15px 20px;
  background: #f9f9f9;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
  color: #3a2815;
}

.checkout-button {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #d4af37, #f4e5b0);
  color: #3a2815;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.checkout-button:hover {
  background: linear-gradient(135deg, #f4e5b0, #d4af37);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Categories Section */
.categories-section {
  padding: 60px 0 40px;
  background: rgba(255, 255, 255, 0.95);
}

.categories-header {
  text-align: center;
  margin-bottom: 30px;
}

.categories-header h2 {
  font-size: 32px;
  color: #3a2815;
  font-weight: 600;
}

.categories-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.category-btn {
  padding: 12px 30px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  border-color: #d4af37;
  color: #3a2815;
  transform: translateY(-2px);
}

.category-btn.active {
  background: linear-gradient(135deg, #d4af37, #f4e5b0);
  border-color: #d4af37;
  color: #3a2815;
  font-weight: 600;
}

/* Products Grid Section */
.products-grid-section {
  padding: 60px 0 80px;
  background: rgba(248, 248, 248, 0.95);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.product-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  opacity: 1;
}

.product-item.hidden {
  display: none;
}

.product-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.25);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-item:hover .product-img {
  transform: scale(1.05);
}

.add-to-cart-btn {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: linear-gradient(135deg, #d4af37, #f4e5b0);
  color: #3a2815;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  white-space: nowrap;
}

.add-to-cart-btn svg {
  width: 18px;
  height: 18px;
}

.product-item:hover .add-to-cart-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #f4e5b0, #d4af37);
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.add-to-cart-btn.added {
  background: #4caf50;
  color: white;
}

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: #3a2815;
  margin-bottom: 8px;
}

.product-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #d4af37;
}

.product-weight {
  font-size: 13px;
  color: #999;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 12px;
}

/* Notification Toast */
.notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10000;
  font-weight: 500;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification svg {
  width: 24px;
  height: 24px;
}

/* Masaüstü/Mobil görünürlük kontrolleri */
.desktop-only {
  display: flex !important;
}

.mobile-only {
  display: none !important;
}

/* Mobil Sepet Wrapper */
.header-cart-wrapper {
  position: relative;
  z-index: 1000;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}

@media (max-width: 992px) {
  .products-hero {
    height: 300px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .products-hero {
    height: 250px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .header-cart-wrapper {
    margin-left: auto;
    margin-right: 10px;
  }

  .cart-dropdown {
    width: calc(100vw - 40px);
    right: -10px;
  }

  .categories-list {
    gap: 10px;
  }

  .category-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .products-grid {
    gap: 15px;
  }

  .product-image-wrapper {
    height: 180px;
  }

  .notification {
    bottom: 20px;
    right: 20px;
    left: 20px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-image-wrapper {
    height: 150px;
  }

  .product-info {
    padding: 15px;
  }

  .product-name {
    font-size: 15px;
  }

  .product-description {
    font-size: 13px;
  }

  .product-price {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 26px;
  }

  .cart-dropdown {
    right: -50px;
  }

  .categories-section {
    padding: 40px 0 30px;
  }

  .products-grid-section {
    padding: 40px 0 60px;
  }
}

@media (max-width: 400px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-image-wrapper {
    height: 200px;
  }
}
