@font-face {
  font-family: "Thmanyah Sans";
  src: url("./fonts/thmanyahsans-Regular.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "Thmanyah Sans";
  src: url("./fonts/thmanyahsans-Medium.otf") format("opentype");
  font-weight: 500;
}

@font-face {
  font-family: "Thmanyah Sans";
  src: url("./fonts/thmanyahsans-Bold.otf") format("opentype");
  font-weight: 700;
}

@font-face {
  font-family: "Thmanyah Sans";
  src: url("./fonts/thmanyahsans-Black.otf") format("opentype");
  font-weight: 900;
}

:root {
  --primary-gradient: linear-gradient(135deg, #4d7dff, #3157ff);
  --secondary-bg: #f5f7fc;
  --white: #ffffff;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Thmanyah Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--secondary-bg);
  color: var(--text-dark);
  line-height: 1.6;
  padding-bottom: 120px;
}

/* ================= HEADER ================= */
header {
  background: var(--primary-gradient);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(49, 87, 255, 0.2);
}

.header-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-right {
  display: flex;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.header-left {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.icon-link {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.search-container {
  max-width: 1200px;
  margin: 15px auto 5px;
  padding: 0 20px;
}

.search-bar {
  position: relative;
  width: 100%;
}

.search-bar input {
  width: 100%;
  padding: 12px 45px 12px 20px;
  border-radius: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
  font-family: "Thmanyah Sans", sans-serif;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-bar i {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
}

/* ================= PRODUCT SECTION ================= */
.main-content {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.product-gallery {
  position: sticky;
  top: 150px;
  align-self: start;
}

.image-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  justify-content: center;
  position: relative;
}

.image-card img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.product-info h1 {
  font-size: 26px;
  font-weight: 800;
  margin-top: 15px;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* ===== PRICE SECTION ===== */
.price-section {
  margin-bottom: 20px;
}

.original-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.original-price {
  font-size: 18px;
  color: #9ca3af;
  text-decoration: line-through;
  font-weight: 500;
}

.discount-pill {
  background: #fff0f0;
  color: #ff416c;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
  border: 1px solid #ffc5c5;
}

.price-tag {
  font-size: 36px;
  color: #ff416c;
  font-weight: 800;
  line-height: 1;
}

.price-tag small {
  font-size: 18px;
}

.savings-note {
  font-size: 13px;
  color: #16a34a;
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===== STOCK BAR ===== */
.stock-bar-section {
  background: white;
  border-radius: var(--radius-md);
  padding: 15px 18px;
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stock-header span {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.stock-header .sold-count {
  font-size: 13px;
  color: #3157ff;
  font-weight: 700;
}

.progress-bar-bg {
  background: #f3f4f6;
  border-radius: 50px;
  height: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  background: #3157ff;
  height: 100%;
  border-radius: 50px;
  width: 73%;
  transition: width 1s ease;
}

.stock-footer {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
}

.stock-footer .urgent {
  color: #dc2626;
  font-weight: 700;
}

/* ===== DETAILS CARD ===== */
.details-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.details-card h3 {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

/* ===== DESCRIPTION SYSTEM ===== */
.description-content {
  position: relative;
  max-height: 100%;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.8;
}

.description-content.expanded {
  max-height: 100%;
}

.description-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 10px 0;
  display: block;
}

/* ===== DESC SECTIONS ===== */
.desc-section {
  margin-bottom: 28px;
}

.desc-section:last-child {
  margin-bottom: 0;
}

.desc-section h4 {
  font-size: 17px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.desc-section p {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 8px;
}

.desc-section p:last-child {
  margin-bottom: 0;
}

/* قائمة النقاط المنسقة */
.styled-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.styled-list li {
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #374151;
  border-right: 3px solid #3157ff;
  line-height: 1.6;
}

.styled-list.check-list li {
  border-right-color: #16a34a;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.styled-list.check-list li::before {
  content: "✓";
  color: #16a34a;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.styled-list.steps-list {
  counter-reset: steps;
}

.styled-list.steps-list li {
  border-right-color: #ff416c;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  counter-increment: steps;
}

.styled-list.steps-list li .step-num {
  background: #ff416c;
  color: white;
  font-size: 12px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* بطاقة نتائج */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.result-card {
  background: linear-gradient(135deg, #f0f4ff, #e8edff);
  border: 1px solid #c7d5ff;
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.result-card::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 60%;
  height: 80%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  pointer-events: none;
}

.result-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 28px rgba(49, 87, 255, 0.18);
}

.result-card .result-icon {
  font-size: 20px;
  margin-bottom: 6px;
  display: block;
}

.result-card .result-num {
  font-size: 22px;
  font-weight: 800;
  color: #3157ff;
  display: block;
  line-height: 1;
}

.result-card .result-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 5px;
  display: block;
  font-weight: 500;
}

.result-card.highlight {
  background: linear-gradient(135deg, #fff0f0, #ffe8e8);
  border-color: #ffc5c5;
}

.result-card.highlight:hover {
  box-shadow: 0 12px 28px rgba(255, 65, 108, 0.2);
}

.result-card.highlight .result-num {
  color: #ff416c;
}

/* أنيميشن عند الظهور */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card {
  animation: countUp 0.5s ease both;
}

.result-card:nth-child(1) {
  animation-delay: 0.05s;
}

.result-card:nth-child(2) {
  animation-delay: 0.15s;
}

.result-card:nth-child(3) {
  animation-delay: 0.25s;
}

.result-card:nth-child(4) {
  animation-delay: 0.35s;
}

/* تنبيه مهم */
.alert-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 14px;
  color: #92400e;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-box i {
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}

.actions-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-circle:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

/* ================= STICKY BAR ================= */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
  z-index: 2000;
}

.sticky-countdown-strip {
  background: #3157ff;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.sticky-countdown-strip .strip-timer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 14px;
}

.sticky-pad {
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}

.sticky-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.price-info {
  text-align: right;
  min-width: 100px;
}

.price-info .p-label {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.price-info .p-original {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
}

.price-info .p-val {
  font-size: 22px;
  font-weight: 800;
  color: #ff416c;
  line-height: 1;
}

.buy-now-btn {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: white;
  border: none;
  padding: 15px 35px;
  border-radius: 14px;
  font-weight: 800;
  flex-grow: 2;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  font-family: "Thmanyah Sans", sans-serif;
}

.buy-now-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(25deg);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -60%;
  }

  100% {
    left: 120%;
  }
}

.add-cart-btn {
  background: white;
  color: #3157ff;
  border: 2px solid #3157ff;
  padding: 13px 25px;
  border-radius: 14px;
  font-weight: 800;
  flex-grow: 1;
  cursor: pointer;
  font-size: 16px;
  font-family: "Thmanyah Sans", sans-serif;
}

.buy-now-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ================= FOOTER ================= */
footer {
  background: var(--primary-gradient);
  color: white;
  padding: 60px 0 140px;
  margin-top: 50px;
}

.footer-grid {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-links h4 {
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  text-decoration: none;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-gallery {
    order: -1;
    position: relative;
    top: 0;
  }

  .sticky-container {
    gap: 10px;
  }

  .price-info {
    display: none;
  }

  .buy-now-btn {
    padding: 15px 10px;
  }

  .add-cart-btn {
    padding: 13px 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }

  .product-info h1 {
    font-size: 22px;
  }
}
