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

/* ================== VARIABLES ================== */
:root {
  --dark: #000;
  --primary: #0d6efd;
  --secondary: #6c757d;
  --success: #198754;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #0dcaf0;
  --light: #f8f9fa;
  --gray: #666;
  --border: #ddd;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
  /* --gradient-primary: linear-gradient(135deg, var(--main), #ff8c00);
  --gradient-hover: linear-gradient(135deg, #ff8c00, var(--main)); */
}

/* ================== RESET ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}
li {
  list-style: none;
}

body {
  background: #f5f6f9;
  color: var(--gray);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--dark);
}

/* ================== HEADER ================== */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

/* Logo */
.navbar-brand,
.navbar-brand img {
  transition: var(--transition);
}

.navbar-brand img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
.navbar-brand:hover {
  transform: translateY(-2px);
}
.navbar-brand:hover img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Nav Links */
.navbar-nav .nav-link {
  /* color: var(--primary); */
  font-weight: 500;
  padding: 12px 20px;
  margin: 0 4px;
  /* border: 2px solid transparent; */
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
}
.navbar-nav .nav-link:hover {
  color: var(--dark);
  background: var(--shadow);
  transform: translateY(-2px);
}
.navbar-nav .nav-link.active {
  color: var(--primary);
  background: linear-gradient(
    135deg,
    rgba(0, 102, 255, 0.1),
    rgba(47, 0, 255, 0.05)
  );
  border-color: var(--shadow);
  box-shadow: 0 2px 8px rgba(137, 222, 255, 0.2);
}
.navbar-nav .nav-link i {
  margin-right: 8px;
  width: 18px;
  text-align: center;
  transition: var(--transition);
}
.navbar-nav .nav-link:hover i {
  transform: scale(1.1);
  color: var(--primary);
}

/* ================== SEARCH BAR ================== */
.search-bar {
  max-width: 400px;
  width: 100%;
}

.search-bar .input-group {
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}
.search-bar .input-group:focus-within {
  box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3);
  transform: translateY(-2px);
}

.search-bar .form-control {
  border: 2px solid transparent;
  padding: 12px 20px;
  font-size: 14px;
  background: #f8f9fa;
  transition: var(--transition);
}
.search-bar .form-control:focus {
  border-color: var(--main);
  background: #fff;
  box-shadow: none;
}

.search-bar .btn {
  padding: 12px 20px;
  font-weight: 600;
  border: none;
  color: #fff;
  background: var(--gradient-primary);
  transition: var(--transition);
}
.search-bar .btn:hover {
  background: var(--gradient-hover);
  transform: scale(1.05);
}

/* ================== CART ================== */
.cart-icon {
  cursor: pointer;
  transition: var(--transition);
}
.cart-icon:hover {
  transform: translateY(-3px);
}

.cart-count {
  font-size: 10px;
  padding: 4px 6px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

/* ================== SLIDER ================== */
/* الشكل الافتراضي للشاشات الكبيرة */
.slider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  padding-block: 20px;
}
.slider .container {
  display: flex;
  gap: 15px;
  width: 100%;
  max-width: 1200px;
}
.swiper {
  width: 100%;
  /* height: 400px;  */
}
.swiper-slide img {
  width: 100%;
  /* height: 100%; */
  border-radius: 15px;
  object-fit: contain;
}
.sidebanner {
  width: 24%;
}

.sidebanner img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
}

/* للشاشات الصغيرة (مثلاً أقل من 768px) */
@media (max-width: 768px) {
  .slider .container {
    flex-direction: column;
  }

  .sidebanner {
    width: 100%; /* Sidebanner ياخد العرض كله */
    height: 100%;
  }

  .sidebanner img {
    display: none;
  }
}

/* Sale Badge */
.sale-badge_icon {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.8rem;
  padding: 5px 10px;
  background: var(--dark);
  color: #fff;
  border-radius: 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* ================== CATEGORY ================== */
.category-item {
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.category-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.category-item img {
  max-height: 80px;
  object-fit: contain;
}

/* ================== PRODUCT CARD ================== */
.swiper-slide {
  height: auto !important;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: center;
  justify-content: space-around;
}

/* Product Title */
.product-card .product-title {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  min-height: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Product Price */
.product-card .product-price h5 {
  font-size: 1rem;
}

/* Buttons */
.btn-group-custom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.btn-group-custom .btn {
  width: 100%;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 576px) {
  .product-card .btn {
    flex: 100%;
    max-width: 100%;
  }
  .slider .swiper-button-prev:after,
  .slider .swiper-button-next:after {
    display: none;
  }
  .swiper-button-next {
    display: none;
  }
  .sidebanner {
    display: none;
  }
}
@media (min-width: 1400px) {
  .swiper {
    height: 500px;
  }
  .product-card .product-title {
    font-size: 1.1rem;
  }
  .product-card .product-price h5 {
    font-size: 1.1rem;
  }
}

/* ================== UTILITIES ================== */
html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #e4e2e2;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #808184;
}

/* ================== ANIMATIONS ================== */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1) translate(-50%, -50%);
  }
  50% {
    transform: scale(1.1) translate(-50%, -50%);
  }
}
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
@keyframes glow {
  from {
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3);
  }
  to {
    box-shadow: 0 4px 20px rgba(255, 165, 0, 0.5);
  }
}

.hero-section {
  background-color: #000;
}
.swiper-pagination-clickable {
  display: none;
}
/* loader */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-color: rgb(117, 117, 117);
}
.loader-container .loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
