:root {
  /* Palette matched to the Al Diyafah / Blue Sea olive oil label: deep navy bottle + gold script + olive green leaves */
  --brand-dark: #0e3358;
  --brand-dark-2: #123a63;
  --brand-accent: #c9a227;
  --brand-accent-hover: #a9861c;
  --brand-olive: #6b7f3a;
  --brand-cream: #faf7ee;
}

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

#cartToast { background: var(--brand-dark); }
#cartCountBadge { font-size: .65rem; vertical-align: top; }

/* ---------- Storefront ---------- */
.shop-navbar { background: var(--brand-dark); }

.banner-carousel .banner-image { height: 380px; object-fit: cover; }
@media (max-width: 768px) {
  .banner-carousel .banner-image { height: 220px; }
}
.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: 190px;
  background: #eee;
}
.product-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  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(26,26,46,.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(201,162,39,.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: #fff5f6; }
.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(201,162,39,.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); }
