/* ===========================
   COMPONENTS - Unified component styles
   Combined from: categories_block.css, slider_block.css, image_grid_block.css,
   sections_block.css, notifications.css
   
   NOTE: Social widget styles moved to social-widget.css
   NOTE: One-click modal has been removed
   =========================== */

/* ===== CATEGORIES BLOCK ===== */
.categories {
  margin: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* ===== ENTRANCE ANIMATIONS ===== */
.category-item,
.grid-item,
.promo-tabs li,
.product-card,
.section-content,
.slider-container {
  animation: fadeInUp 0.6s ease-out both;
}

.category-item:nth-child(odd),
.grid-item:nth-child(odd),
.product-card:nth-child(odd) {
  animation-delay: 0.06s;
}

.category-item:nth-child(even),
.grid-item:nth-child(even),
.product-card:nth-child(even) {
  animation-delay: 0.12s;
}

.category-item {
  width: 200px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.category-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.img-frame {
  width: 100%;
  height: 150px;
  overflow: hidden;
}

.category-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.category-item:hover img {
  transform: scale(1.1);
}

.category-item p {
  padding: 10px;
  margin: 0;
}

.category-item a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
}

/* ===== SLIDER BLOCK ===== */
.slider-container {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  margin-bottom: 30px;
  background-color: #f9fbff;
}

.slider-slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  transition: left 0.5s ease-in-out;
  animation: fadeInUp 0.6s ease forwards;
}

.slide-image {
  width: 60%;
  height: 100%;
  object-fit: cover;
}

.slide-info {
  width: 40%;
  padding: 20px;
  text-align: left;
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.75);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-info h3 {
  font-size: 28px;
  margin-bottom: 15px;
  font-weight: 600;
  color: var(--primary-color);
}

.slide-info p {
  font-size: 16px;
  margin-bottom: 15px;
  line-height: 1.4;
  color: var(--primary-color);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  color: var(--primary-color);
  font-size: 30px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s;
}

.slider-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* ===== IMAGE GRID BLOCK ===== */
.image-grid {
  width: 100%;
  margin: 20px 0;
}

.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.grid-item:hover {
  transform: scale(1.05);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.grid-item:hover img {
  filter: brightness(0.8);
}

/* ===== SECTIONS BLOCK ===== */
.promo-tabs {
  margin-bottom: 20px;
}

.promo-tabs ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.promo-tabs li {
  padding: 10px 20px;
  background-color: #f0f0f0;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.promo-tabs li.active {
  background-color: var(--primary-color);
  color: white;
}

.promo-products {
  width: 100%;
}

.section-content {
  display: flex;
  flex-direction: row;
  gap: 18px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 10px 6px;
}

.section-content::-webkit-scrollbar {
  height: 8px;
}

.section-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.product-card {
  flex: 0 0 240px;
  min-width: 200px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.15s;
  position: relative;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

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

.product-card h3 {
  padding: 10px;
  margin: 0;
  font-size: 16px;
  text-align: center;
}

.product-info {
  padding-bottom: 12px;
}

.product-price {
  text-align: center;
}

.price-current {
  display: inline-block;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 18px;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  text-align: center;
}

.new-price {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 18px;
  text-align: center;
}

.product-buttons {
  display: flex;
  justify-content: space-around;
  padding: 10px;
}

.product-actions {
  display: flex;
  gap: 10px;
  padding: 0 10px 12px;
  margin-top: auto;
}

.product-actions button {
  flex: 1 1 0;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
}

.btn-add-to-cart {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-buy-now {
  background-color: #fff;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.product-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.product-buttons button {
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.to-cart {
  background-color: var(--primary-color);
  color: white;
}

.wish-btn {
  background-color: #ff69b4;
  color: white;
}

.compare-btn {
  background-color: #32cd32;
  color: white;
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: red;
  color: white;
  padding: 5px;
  border-radius: 50%;
  font-size: 12px;
}

/* ===== NOTIFICATIONS ===== */
.cart-toast {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--card-bg);
  color: var(--text-dark);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(30, 41, 59, 0.06);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  transform: translateX(12px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  font-size: 0.875rem;
  font-weight: 500;
  width: fit-content;
  max-width: 340px;
}

.cart-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.cart-toast.success {
  border-left: 4px solid var(--accent-blue);
}

.cart-toast i {
  color: var(--accent-blue);
  font-size: 1.05rem;
  flex: 0 0 22px;
}

.cart-toast span {
  flex: 1;
  color: var(--text-dark);
}

@media (max-width: 520px) {
  .cart-toast {
    right: 12px;
    top: 80px;
    left: auto;
    max-width: 340px;
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-item,
  .grid-item,
  .promo-tabs li,
  .product-card,
  .section-content,
  .slider-container {
    animation: none;
  }
}

@media (max-width: 768px) {
  .product-card,
  .grid-item,
  .category-card {
    transition: none;
    animation: none;
  }

  .product-card:active,
  .grid-item:active,
  .category-card:active,
  .product-card:hover,
  .grid-item:hover,
  .category-card:hover {
    transform: none;
  }
}
