* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
  overflow-x: hidden;
  max-width: 483px;
  margin: 0 auto;
  padding: 0;
  direction: rtl;
  text-align: right;
  color: #0f1111;
}

/* Header Banner */
.header-banner {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 100vh;
}

.announcement-section {
  width: 100%;
}

/* TOP BAR */
.topbar {
  background: #FEF3E2;
  padding: 12px 20px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s ease;
  border-bottom: 1px solid #FCD200;
}

.topbar:hover {
  opacity: 0.9;
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 100%;
  height: 100%;
  flex-wrap: nowrap;
}

.topbar-text-primary {
  font-size: 14px;
  color: #0f1111;
  margin: 0;
  white-space: nowrap;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-text-secondary {
  font-size: 13px;
  color: #565959;
  margin: 0;
  white-space: nowrap;
  text-transform: none;
  font-weight: 400;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-image {
  width: 80px;
  height: auto;
  object-fit: contain;
  max-height: 30px;
}

.topbar-image-placeholder {
  width: 80px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f4f4f4;
  border-radius: 4px;
}

.topbar-image-placeholder svg {
  width: 60%;
  height: 60%;
  opacity: 0.5;
}

/* Header Logo */
.header-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 20px;
  background-color: #fff;
}

.header-logo {
  max-width: 180px;
  height: auto;
  display: block;
}

.modal-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background-color: #ffffff;
  border-radius: 8px;
  border: 0px solid #e0e0e0;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-close:hover {
  background-color: #f0f0f0;
  transform: scale(1.1);
}

.modal-close svg {
  width: 60%;
  height: 60%;
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s ease;
}

.modal-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-loading-text {
  color: #666666;
  font-size: 16px;
  margin-top: 20px;
  text-align: center;
}

.modal-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #000000;
  border-radius: 50%;
  animation: modal-spin 1s linear infinite;
}

@keyframes modal-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 768px) {
  .topbar-content {
    gap: 7px;
  }

  .topbar-text-primary {
    font-size: 12.6px;
  }

  .topbar-text-secondary {
    font-size: 12.6px;
  }

  .topbar-image {
    width: 64px;
  }

  .topbar-image-placeholder {
    width: 64px;
  }

  .header-logo-container {
    padding: 15px 15px;
  }

  .header-logo {
    max-width: 140px;
  }
}

@media screen and (max-width: 480px) {
  .topbar-content {
    gap: 5px;
  }

  .topbar-text-primary {
    font-size: 11.2px;
  }

  .topbar-text-secondary {
    font-size: 11.2px;
  }

  .topbar-image {
    width: 56px;
  }

  .topbar-image-placeholder {
    width: 56px;
  }

  .header-logo-container {
    padding: 12px 12px;
  }

  .header-logo {
    max-width: 120px;
  }
}

.product-gallery {
  width: 100%;
  padding: 20px 16px;
}

/* Main Product Slider */
.main-slider-container {
  position: relative;
  margin-bottom: 16px;
}

.swiper.main-slider {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 1px solid #D5D9D9;
  background: #ffffff;
}

.main-slider .swiper-slide {
  width: 100%;
  height: 100%;
  position: relative;
}

.main-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f8f8f8;
}

/* Pagination Dots */
.main-slider .swiper-pagination {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
  width: auto;
}

.main-slider .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  opacity: 1;
  transition: all 0.2s ease;
  border: none;
  pointer-events: auto;
}

.main-slider .swiper-pagination-bullet-active {
  background: #FFA41C;
  transform: scale(1.3);
}

/* Navigation Arrows - RTL Optimized */
.main-slider .swiper-button-next,
.main-slider .swiper-button-prev {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 1px solid #D5D9D9;
  transition: all 0.2s ease;
  z-index: 20;
}

.main-slider .swiper-button-next:after,
.main-slider .swiper-button-prev:after {
  font-size: 16px;
  font-weight: 900;
  color: #0f1111;
}

/* RTL: Reverse the arrow directions for Arabic */
[dir="rtl"] .main-slider .swiper-button-next:after {
  content: "←";
}

[dir="rtl"] .main-slider .swiper-button-prev:after {
  content: "→";
}

/* LTR: Normal arrow directions */
[dir="ltr"] .main-slider .swiper-button-next:after {
  content: "→";
}

[dir="ltr"] .main-slider .swiper-button-prev:after {
  content: "←";
}

.main-slider .swiper-button-next {
  left: 10px;
}

.main-slider .swiper-button-prev {
  right: 10px;
}

.main-slider .swiper-button-next:hover,
.main-slider .swiper-button-prev:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border-color: #FFA41C;
}

.main-slider .swiper-button-next:active,
.main-slider .swiper-button-prev:active {
  transform: scale(0.95);
}

.main-slider .swiper-button-next.swiper-button-disabled,
.main-slider .swiper-button-prev.swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Thumbnail Slider */
.thumbnail-slider-container {
  margin-top: 16px;
}

.swiper.thumbnail-slider {
  width: 100%;
  height: 80px;
  padding: 0 4px;
}

.thumbnail-slider .swiper-slide {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  opacity: 0.7;
  background: #ffffff;
}

.thumbnail-slider .swiper-slide.swiper-slide-thumb-active {
  border-color: #FFA41C;
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.thumbnail-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f8f8f8;
}

/* Loading states */
.swiper-slide {
  background: #f8f8f8;
}

.swiper-slide img {
  transition: opacity 0.3s ease;
}

/* Touch feedback */
.swiper-slide:active {
  transform: scale(0.98);
}

/* Product Info Section */
.product-info {
  padding: 24px 16px 16px;
  background: #ffffff;
}

.product-reviews {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
}

.star-rating .star {
  color: #ffc107;
  font-size: 16px;
}

.review-count {
  color: #666;
  font-size: 14px;
  margin-left: 4px;
}

.review-count:hover {
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
}

.product-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  color: #0f1111;
  margin: 0;
  padding: 0;
  text-align: right;
}

/* Price Section */
.price-section {
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.price-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.sale-price {
  font-size: 28px;
  font-weight: 400;
  color: #B12704;
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1.2;
}

.currency {
  font-size: 20px;
  font-weight: 400;
}

.regular-price {
  font-size: 14px;
  font-weight: 400;
  color: #565959;
  text-decoration: line-through;
  margin-right: 8px;
}

.discount-badge {
  background: #CC0C39;
  border: none;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  margin-right: 8px;
}

.logo-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Stock Section */
.stock-section {
  margin: 20px 0;
  padding: 14px 16px;
  background: #FEF3E2;
  border: 1px solid #FCD200;
  border-radius: 8px;
}

.stock-notice {
  font-size: 13px;
  color: #0f1111;
  font-weight: 400;
  text-align: center;
  line-height: 1.6;
}

/* Add to Cart Section */
.add-to-cart-section {
  margin: 24px 0;
}

.add-to-cart-btn {
  width: 100%;
  padding: 14px 24px;
  background: #FFD814;
  color: #0f1111;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 5px rgba(15, 17, 17, 0.15);
}

.add-to-cart-btn:hover {
  background: #FCD200;
  box-shadow: 0 3px 8px rgba(15, 17, 17, 0.2);
}

.add-to-cart-btn:active {
  transform: scale(0.98);
  box-shadow: 0 1px 3px rgba(15, 17, 17, 0.15);
}

.add-to-cart-btn i {
  font-size: 18px;
}

/* Brand Description Images */
.brand-description-images {
  margin: 24px 0;
  width: 100%;
}

.brand-description-images img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
}

/* Trust Badges Section */

/* Specifications Section */
.specifications {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: white;
}

.specifications h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-list {
  display: grid;
  gap: 12px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.spec-label {
  font-weight: 500;
  color: #666;
  flex: 1;
}

.spec-value {
  font-weight: 600;
  color: #333;
  text-align: right;
  flex: 1;
}

/* Reviews Section */
.reviews-section {
  margin: 32px 0;
}

.reviews-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Reviews Photo Carousel */
.reviews-photo-carousel {
  margin: 8px 0 20px;
}

.swiper.reviews-photo-slider {
  width: 100%;
  padding: 0 4px;
}

.reviews-photo-slider .swiper-slide {
  width: 150px !important;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f8f8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.reviews-photo-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-item {
  padding: 20px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  margin-bottom: 16px;
  background: white;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.review-meta {
  flex: 1;
}

.review-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.review-date {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.review-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.review-rating .star {
  color: #ffc107;
  font-size: 14px;
}

.review-text {
  color: #555;
  line-height: 1.5;
  font-size: 14px;
}

/* Responsive adjustments for smaller screens */
/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: #FFA41C;
  color: #0f1111;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  transform: translateY(100px);
  opacity: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.show {
  transform: translateY(0);
  opacity: 1;
}

.scroll-to-top:hover {
  background: #FF8F00;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.scroll-to-top:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 400px) {
  .product-gallery {
    padding: 16px 12px;
  }

  .thumbnail-slider .swiper-slide {
    width: 60px;
    height: 60px;
  }

  .swiper.thumbnail-slider {
    height: 70px;
  }

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

  .product-title {
    font-size: 18px;
  }

  .trust-badges {
    gap: 8px;
    margin: 16px 0;
    padding: 12px;
  }

  .trust-badge {
    padding: 10px 8px;
    font-size: 12px;
  }

  .review-item {
    padding: 16px;
  }

  .review-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .announcement-bar {
    padding: 10px 12px;
    font-size: 13px;
  }

  .announcement-content {
    gap: 6px;
  }

  .countdown-timer {
    padding: 3px 6px;
    font-size: 13px;
  }

  .stock-section {
    margin: 16px 0;
    padding: 12px 16px;
  }

  .stock-notice {
    font-size: 13px;
  }

  .add-to-cart-btn {
    padding: 14px 20px;
    font-size: 15px;
  }

  .brand-description-images {
    margin: 20px 0;
  }

  .price-section {
    margin: 16px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .price-container {
    gap: 8px;
  }

  .sale-price {
    font-size: 22px;
  }

  .currency {
    font-size: 16px;
  }

  .regular-price {
    font-size: 16px;
  }

  .discount-badge {
    padding: 6px 10px;
    font-size: 13px;
    align-self: flex-end;
  }

  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 15px;
    left: 15px;
    font-size: 16px;
  }

  /* Navigation arrows responsive sizing */
  .main-slider .swiper-button-next,
  .main-slider .swiper-button-prev {
    width: 35px;
    height: 35px;
  }

  .main-slider .swiper-button-next:after,
  .main-slider .swiper-button-prev:after {
    font-size: 16px;
  }

  .main-slider .swiper-button-next {
    left: 8px;
  }

  .main-slider .swiper-button-prev {
    right: 8px;
  }
}

/* Footer Styles */
.ribal-footer {
  background-color: #131A22;
  color: #DDD;
  padding: 40px 0 20px;
  margin-top: 50px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border-top: 1px solid #3a4553;
}

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

.footer-top {
  text-align: center;
  margin-bottom: 50px;
}

.footer-logo-section {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
}

.footer-title {
  display: block;
  max-width: 200px;
  height: auto;
  margin: 0 auto 20px;
  color: #DDD;
}

.footer-description {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #999;
}

.social-media-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: white;
  color: #008245;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.social-icon i {
  font-size: 18px;
}

.footer-links-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 50px;
}

.footer-column {
  text-align: center;
}

.footer-column-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
  color: white;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.contact-item i {
  font-size: 14px;
  width: 16px;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 30px;
}

.footer-bottom-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.copyright-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copyright-text {
  font-size: 12px;
  margin: 0;
  color: #999;
}

.company-logo img {
  width: 30px;
  height: 30px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .ribal-footer {
    padding: 40px 0 20px;
  }

  .footer-container {
    padding: 0 15px;
  }

  .footer-logo {
    width: 80px;
  }

  .footer-title {
    max-width: 150px;
  }

  .footer-description {
    font-size: 13px;
  }

  .footer-links-section {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .social-icon {
    width: 35px;
    height: 35px;
  }

  .social-icon i {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .footer-links-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }

  .contact-item i {
    width: auto;
  }

  .social-media-icons {
    gap: 10px;
  }

  .app-store-btn img {
    height: 35px;
  }
}
