:root {
  /* Palette taken from the Al Assala logo: roasted-coffee brown artwork on a warm cream ground,
     with a saffron-gold accent (coffee / spices / oil). */
  --brand-dark: #4a3423;
  --brand-dark-2: #5c432b;
  --brand-accent: #b8842c;
  --brand-accent-hover: #946a22;
  --brand-olive: #6b7f3a;
  --brand-cream: #faf6ef;
}

body { background: var(--brand-cream); }

#cartToast { background: var(--brand-dark); }

/* ---------- Storefront ---------- */
.shop-navbar { background: var(--brand-dark); padding-top: .6rem; padding-bottom: .6rem; }

/* Every nav item (link or dropdown toggle) is a flex row so its icon and label always sit on
   the same baseline, regardless of how tall the Bootstrap Icons glyph happens to render. */
.shop-navbar .nav-link,
.shop-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.shop-navbar .nav-link {
  padding: .5rem .7rem;
  border-radius: .4rem;
  transition: background-color .15s ease;
}
.shop-navbar .nav-link:hover,
.shop-navbar .nav-link:focus,
.shop-navbar .nav-link.show {
  background: rgba(255, 255, 255, .08);
}
.shop-navbar .nav-link i.bi {
  font-size: 1.05rem;
  line-height: 1;
}
.shop-navbar .navbar-brand i.bi {
  font-size: 1.3rem;
}
/* Al Assala logo mark in the navbar (cream recolour of the brown logo so it reads on the dark bar) */
.shop-navbar .brand-logo { height: 38px; width: auto; display: block; }
.shop-navbar .brand-name { font-size: 1.15rem; letter-spacing: .02em; }

/* Thin visual separators between the "browse" / "settings" / "account" groups of nav items,
   so the bar reads as organized clusters instead of one long unbroken row of icons. */
.shop-navbar .nav-divider {
  width: 1px;
  align-self: center;
  height: 1.5rem;
  background: rgba(255, 255, 255, .18);
  margin: 0 .35rem;
}

/* Cart icon with a small badge pinned to its corner, instead of a badge that awkwardly
   floats after the "Cart" text on its own line. */
.nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-icon-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  font-size: .6rem;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

@media (max-width: 1199.98px) {
  .shop-navbar .nav-divider { display: none; }
  .shop-navbar .nav-link { padding: .6rem .5rem; }
}

/* Scales with the viewport width instead of a fixed pixel height, so the banner keeps the
   same proportions (and doesn't over-crop or leave odd gaps) at every screen size. */
.banner-carousel .carousel-inner,
.banner-carousel .carousel-item {
  width: 100%;
}
.banner-carousel .banner-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 768px) {
  .banner-carousel .banner-image { aspect-ratio: 16 / 9; }
}
@media (max-width: 480px) {
  .banner-carousel .banner-image { aspect-ratio: 4 / 3; }
}
.shop-footer { background: var(--brand-dark); }

.btn-accent {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
}
.btn-accent:hover { background-color: var(--brand-accent-hover); border-color: var(--brand-accent-hover); color:#fff; }

.price { font-weight: 700; color: var(--brand-accent); }
.compare-price { text-decoration: line-through; color: #9aa0ac; margin-left: 6px; font-size: .85rem; }

.product-card {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,.14); }
.product-card .card-body { padding: 14px; }
.product-card .card-title {
  font-size: .95rem;
  font-weight: 600;
  min-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color .15s ease;
}
.product-card:hover .card-title { color: var(--brand-accent); }

/* image swap + zoom on hover */
.product-img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: #fff;
}
.product-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: opacity .4s ease, transform .5s ease;
}
.product-img-wrap .img-primary { opacity: 1; transform: scale(1); }
.product-img-wrap .img-hover { opacity: 0; transform: scale(1.08); }
.product-card:hover .img-primary { opacity: 0; }
.product-card:hover .img-hover { opacity: 1; }

/* sale ribbon */
.ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* floating quick-action icons (wishlist / quick view) */
.product-actions {
  position: absolute;
  top: 10px;
  right: -40px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: right .3s ease;
}
.product-card:hover .product-actions { right: 10px; }
.action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.action-btn:hover { background: var(--brand-accent); color: #fff; transform: scale(1.1); }
.action-btn.active { color: var(--brand-accent); }

/* slide-up quick add to cart bar */
.quick-add-form {
  position: absolute;
  left: 0; right: 0; bottom: -50px;
  z-index: 3;
  transition: bottom .3s ease;
  margin: 0;
}
.product-card:hover .quick-add-form { bottom: 0; }
.quick-add-btn {
  width: 100%;
  border: none;
  background: rgba(74,52,35,.92);
  color: #fff;
  font-size: .85rem;
  padding: 9px 0;
  cursor: pointer;
  transition: background .15s ease;
}
.quick-add-btn:hover { background: var(--brand-accent); }

.star-rating { color: #f2b01e; font-size: .8rem; }
.star-rating i { margin-right: 1px; }

.hero-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand-dark-2));
  color: #fff;
  border-radius: 16px;
  padding: 56px 32px;
  margin-bottom: 32px;
}
.hero-shape {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,132,44,.35), transparent 70%);
  top: -100px; right: -60px;
}

/* product detail gallery */
.gallery-main img { width: 100%; border-radius: 16px; }
.gallery-thumbs { overflow-x: auto; }
.gallery-thumb {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: .6;
  border: 2px solid transparent;
  transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumb:hover, .gallery-thumb.active { opacity: 1; border-color: var(--brand-accent); }

/* category tiles on home page */
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 26px 12px;
  text-decoration: none;
  color: var(--brand-dark);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.category-tile-icon { font-size: 1.6rem; color: var(--brand-accent); transition: transform .2s ease; }
.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0,0,0,.12);
  background: var(--brand-dark);
  color: #fff;
}
.category-tile:hover .category-tile-icon { transform: scale(1.15) rotate(-6deg); color: #fff; }

/* category sidebar on shop page */
.category-filter-list li { margin-bottom: 4px; }
.category-filter-list a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--brand-dark);
  text-decoration: none;
  font-size: .9rem;
  transition: background .15s ease, color .15s ease, padding-left .15s ease;
}
.category-filter-list a:hover { background: #f1f2f6; padding-left: 14px; }
.category-filter-list a.active { background: var(--brand-accent); color: #fff; font-weight: 600; }

.badge-status-pending { background:#f0ad4e; }
.badge-status-paid { background:#5bc0de; }
.badge-status-processing { background:#0d6efd; }
.badge-status-shipped { background:#6f42c1; }
.badge-status-delivered { background:#28a745; }
.badge-status-cancelled { background:#dc3545; }
.badge-status-refunded { background:#6c757d; }

/* ---------- Admin ---------- */
.admin-body { background: #f1f2f6; }
.admin-sidebar {
  width: 250px;
  min-height: 100vh;
  background: var(--brand-dark);
}
.admin-link {
  color: rgba(255,255,255,.75) !important;
  border-radius: 8px;
}
.admin-link:hover, .admin-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.08);
}
.admin-content { max-width: 100%; }

.stat-card {
  border: none;
  border-radius: 14px;
  color: #fff;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { opacity: .85; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-card.bg-1 { background: linear-gradient(135deg, #4e54c8, #8f94fb); }
.stat-card.bg-2 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.stat-card.bg-3 { background: linear-gradient(135deg, #f2994a, #f2c94c); color:#3a2a00; }
.stat-card.bg-4 { background: linear-gradient(135deg, #ee0979, #ff6a00); }

.admin-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  padding: 20px;
}

table.admin-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; }

.product-image-tile {
  position: relative;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 6px;
  background: #f8f9fa;
}
.product-image-tile.is-primary { border-color: var(--brand-accent); background: #fdf6ea; }
.product-image-tile img { height: 90px; width: 100%; object-fit: cover; border-radius: 6px; }
.main-image-badge {
  position: absolute;
  top: 4px; left: 4px;
  z-index: 2;
}
.bg-accent-solid { background: var(--brand-accent); color: #fff; }

/* AliExpress-style variant swatches */
.swatch-group { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-option {
  -webkit-appearance: none;
  appearance: none;
  min-width: 48px;
  height: 42px;
  padding: 0 14px;
  border: 2px solid #dfe3e8 !important;
  border-radius: 8px;
  background-color: #fff !important;
  background-image: none;
  color: var(--brand-dark) !important;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .1s ease;
}
.swatch-option:hover { border-color: var(--brand-accent) !important; color: var(--brand-accent) !important; }
.swatch-option.active {
  border-color: var(--brand-accent) !important;
  background-color: var(--brand-accent) !important;
  color: #fff !important;
  font-weight: 700;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(184,132,44,.45) !important;
}
.swatch-option.active::after {
  content: "\2713";
  margin-left: 6px;
  font-weight: 700;
}
#displayPrice.text-muted { color: #9aa0ac !important; font-size: 1.1rem !important; }
#addToCartBtn:disabled { opacity: .55; cursor: not-allowed; }

.star-rating-input { font-size: 1.6rem; color: #f2b01e; }
.star-input-icon { cursor: pointer; margin-right: 4px; transition: transform .1s ease; }
.star-input-icon:hover { transform: scale(1.15); }
.wishlist-btn-detail.active { color: var(--brand-accent); border-color: var(--brand-accent); }
.wishlist-btn-detail.active i { color: var(--brand-accent); }

/* ---------- Al Assala additions (same visual language as above) ---------- */
.shop-navbar .btn { white-space: nowrap; }
.shop-footer .footer-logo { height: 46px; width: auto; opacity: .9; }
.shop-footer a { text-decoration: none; }
.shop-footer a:hover { color: #fff !important; }

.pagination .page-link { color: var(--brand-dark); }
.pagination .page-item.active .page-link { background: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }

.form-control:focus, .form-select:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 .2rem rgba(184,132,44,.2);
}
a { color: var(--brand-dark-2); }
a:hover { color: var(--brand-accent); }

.cart-thumb { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid #eee; }
.category-tile-img { width: 56px; height: 56px; object-fit: contain; }
.review-pending { background: #fff8e6; border-radius: 8px; padding: 8px 10px; }
.checkout-option.is-selected { border-color: var(--brand-accent) !important; background: #fffdf8; }
.admin-sidebar .admin-brand img { height: 34px; width: auto; }
.variant-row { background: #fafafa; border-radius: 10px; padding: 12px; border: 1px solid #eee; }
.gallery-main img { background: #fff; object-fit: contain; max-height: 520px; }

/* Floating WhatsApp chat button. Sits on the "start" side (right in Arabic, left in English) so it
   never covers the add-to-cart toast, which appears on the "end" side. */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  z-index: 1070;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.whatsapp-float:hover, .whatsapp-float:focus {
  background: #1ebe5b;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
}
@media (max-width: 575.98px) {
  .whatsapp-float { width: 50px; height: 50px; font-size: 1.6rem; bottom: 16px; inset-inline-start: 16px; }
}
@media print { .whatsapp-float { display: none; } }

/* Navbar fit. The bar now carries the full currency name ("ريال عماني" / "Omani Rial"), so:
   - it collapses to the hamburger menu below 1200px instead of 992px, and
   - wishlist / admin / account show their icon only on desktop (text inside the hamburger menu),
   - between 1200px and 1399px the language and cart items are icon-only too.
   The search box also keeps a usable minimum width. */
.shop-navbar .nav-search .form-control { min-width: 150px; }
@media (min-width: 1200px) {
  .shop-navbar .nav-label-menu { display: none; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .shop-navbar .nav-label { display: none; }
  .shop-navbar .nav-link { padding: .5rem .55rem; }
}

/* Fallback when the AOS animation script is unavailable: never leave content invisible. */
.no-aos [data-aos] { opacity: 1 !important; transform: none !important; }

/* ---- Company behind the site: footer line, home band, About page ---- */
.shop-footer .footer-company {
  display: inline-flex; align-items: center; gap: .75rem;
  margin: .35rem 0 .75rem; padding: .5rem 1rem;
  border: 1px solid rgba(255,255,255,.14); border-radius: 14px;
  color: rgba(255,255,255,.75); text-align: start;
  transition: border-color .2s ease, background-color .2s ease;
}
.shop-footer .footer-company:hover { border-color: var(--brand-accent); background: rgba(255,255,255,.04); color: #fff; }
.shop-footer .footer-company-logo { width: 64px; height: 64px; flex: 0 0 auto; }
.shop-footer .footer-company-label { display: block; font-size: .8rem; opacity: .8; }
.shop-footer .footer-company-name { display: block; font-size: 1rem; font-weight: 600; color: #e9d29a; }
.shop-footer .footer-links .list-inline-item:not(:last-child)::after { content: "·"; margin-inline-start: .6rem; opacity: .5; }

.company-logo-tile { width: 96px; height: 96px; border-radius: 18px; flex: 0 0 auto; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.company-logo-lg { width: 100%; max-width: 220px; height: auto; border-radius: 24px; }
.about-eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--brand-accent); margin-bottom: .15rem; }

.about-band {
  display: flex; align-items: center; gap: 1.25rem;
  background: #fff; border: 1px solid #efe6d6; border-radius: 18px; padding: 1.25rem 1.5rem;
}
.about-band-text { flex: 1 1 auto; min-width: 0; }
.about-band-btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 767.98px) {
  .about-band { flex-direction: column; text-align: center; padding: 1.25rem 1rem; }
}

.about-card { background: #fff; border: 1px solid #efe6d6; border-radius: 18px; padding: 1.5rem; }
.about-chip {
  display: inline-block; padding: .4rem .9rem; border-radius: 999px;
  background: var(--brand-cream); border: 1px solid #e7dcc8; color: var(--brand-dark); text-decoration: none; font-size: .95rem;
}
.about-chip:hover { background: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #fff; font-weight: 600; }
.btn-whatsapp:hover, .btn-whatsapp:focus { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
