@charset "UTF-8";
/*
Theme Name: AutoKing Mobile Shop
Theme URI: https://autoking1.com/
Author: AutoKing
Author URI: https://autoking1.com/
Description: قالب متجر إلكتروني بإستايل تطبيق موبايل على الجوال وتصميم احترافي على الديسكتوب، مخصص لـ WooCommerce لمتجر Auto King / أوتو كنك، مع بحث حي (Live Search)، سلة بعدّاد، ومعرض صور تفاعلي داخل صفحة المنتج.
Version: 1.4.0
Text Domain: autoking-mobile-shop
*/

:root {
  --primary: #c8102e;
  --primary-soft: #fdeaec;
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --radius-lg: 18px;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== HEADER / APP BAR ========== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.logo a {
  color: inherit;
}

.logo span {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Cart icon badge */
.icon-btn.cart-btn {
  position: relative;
}

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

/* ========== MAIN CONTENT ========== */
.app-main {
  flex: 1;
  padding: 0.75rem 1rem 4.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Search Bar */
.search-bar {
  margin-bottom: 0.75rem;
}

.autoking-search {
  position: relative;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: transparent;
}

.search-input-wrap span {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Live search results */
.autoking-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.35rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  padding: 0.4rem 0;
  max-height: 260px;
  overflow-y: auto;
  z-index: 40;
}

.autoking-search-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.autoking-search-item:hover {
  background: #f3f4f6;
}

.autoking-search-item .asi-thumb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.autoking-search-item .asi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.autoking-search-item .asi-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.autoking-search-item .asi-title {
  font-weight: 500;
}

.autoking-search-item .asi-price {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
}

.autoking-search-view-all {
  display: block;
  padding: 0.45rem 0.75rem 0.4rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8rem;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
}

/* Categories Slider */
.categories {
  margin: 0.5rem 0 0.9rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex: 0 0 auto;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* Filter chips */
.filter-chip {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f3f4f6;
  margin: 0 0.25rem 0.25rem 0;
}

/* Hero Banner */
.hero-banner {
  background: radial-gradient(circle at top right, #7f1d1d, #b91c1c);
  border-radius: 20px;
  padding: 1rem;
  color: #fff;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hero-label {
  font-size: 0.75rem;
  opacity: 0.85;
}

.hero-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.hero-sub {
  font-size: 0.8rem;
  opacity: 0.9;
}

.hero-cta {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

/* Section header & products grid */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.6rem 0;
}

.section-header h2 {
  font-size: 0.95rem;
}

.section-header a {
  font-size: 0.8rem;
  color: var(--primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Product card */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.product-img-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.35rem;
  background: #e5e7eb;
}

.product-img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 4; /* ارتفاع أكبر للصورة */
  object-fit: cover;
}

.badge-discount {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

.fav-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
}

.product-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.product-brand {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.product-brand a {
  color: var(--text-muted);
  text-decoration: none;
}

.product-rating {
  font-size: 0.7rem;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-bottom: 0.15rem;
}

.product-rating span {
  color: var(--text-muted);
}

.product-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.price-current {
  font-size: 0.9rem;
  font-weight: 700;
}

.price-old {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-footer {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.btn-add {
  flex: 1;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-add-ghost {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
  text-align: center;
}

/* ========== BOTTOM NAV (موبايل) ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 0.35rem 0.7rem 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  gap: 0.1rem;
  color: var(--text-muted);
}

.bottom-nav-item span.icon {
  font-size: 1.1rem;
}

.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 1rem 1.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Basic page/single styles */
.autoking-page, .autoking-post {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
}

.autoking-page .page-title,
.autoking-post .entry-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.autoking-page .page-content,
.autoking-post .entry-content {
  font-size: 0.9rem;
}

/* ---------- PRODUCT LIGHTBOX (single product) ---------- */
.ak-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: ak-fade-in 0.25s ease-out;
}

.ak-lightbox-inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  padding: 1.5rem 1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ak-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  animation: ak-zoom-in 0.25s ease-out;
}

.ak-lightbox-close,
.ak-lightbox-prev,
.ak-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
}

.ak-lightbox-close {
  top: 1.2rem;
  right: 1.2rem;
  transform: none;
}

.ak-lightbox-prev {
  left: 1rem;
}

.ak-lightbox-next {
  right: 1rem;
}

.ak-lightbox-download {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

/* Dots / indicators */
.ak-lightbox-dots {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ak-lightbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(249, 250, 251, 0.5);
}

.ak-lightbox-dot.ak-active {
  width: 16px;
  background: #ffffff;
}

/* Animations */
@keyframes ak-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ak-zoom-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 767px) {
  .ak-lightbox-inner {
    padding: 1.25rem 0.5rem 2.25rem;
  }
  .ak-lightbox-prev,
  .ak-lightbox-next {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

/* ---------- RESPONSIVE ---------- */

/* Mobile-specific adjustments */
@media (max-width: 767px) {
  .app-layout-desktop {
    display: block;
  }

  .filters-panel {
    display: none; /* إخفاء تصفية النتائج بالموبايل */
  }

  .site-footer {
    padding-bottom: 4.5rem; /* مساحة للنافبار السفلي */
  }
}

/* Tablet */
@media (min-width: 768px) {
  .app-main {
    padding: 1.5rem 1.5rem 2rem;
  }
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottom-nav {
    display: none;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .app {
    background: radial-gradient(circle at top, #fdf2f2 0, #f5f5f7 45%, #f5f5f7 100%);
  }

  .app-layout-desktop {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .filters-panel {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 80px;
  }

  .filters-panel h3 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .filter-group {
    margin-bottom: 1rem;
  }

  .filter-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
  }

  .filter-group input[type="range"] {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-banner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
  }
}

/* حسابي في الهيدر */
.ak-header-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ak-account-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.9rem;
}

/* صورة مصغرة للمنتج في السلة (موبايل وكمبيوتر) */
.
/* ===== Mobile cart item cards (قالب كروت للسلة) ===== */
@media (max-width: 768px) {

  body.woocommerce-cart .woocommerce-cart-form .shop_table.cart {
    border-collapse: separate !important;
    border-spacing: 0 0.75rem !important;
    background: transparent !important;
    width: 100% !important;
  }

  body.woocommerce-cart .woocommerce-cart-form .shop_table.cart thead {
    display: none !important;
  }

  body.woocommerce-cart .woocommerce-cart-form .cart_item {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 90px 1fr !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas:
      "thumb title"
      "thumb price"
      "thumb qty" !important;
    background: #ffffff !important;
    border-radius: 1.2rem !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
  }

  body.woocommerce-cart .woocommerce-cart-form .cart_item td {
    border: none !important;
    padding: 0.45rem 0.75rem !important;
    vertical-align: middle !important;
  }

  /* الصورة */
  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-thumbnail {
    grid-area: thumb !important;
    padding-right: 0.4rem !important;
  }

  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-thumbnail img {
    width: 90px !important;
    height: 90px !important;
    border-radius: 1rem !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* اسم المنتج */
  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-name {
    grid-area: title !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    padding-bottom: 0.1rem !important;
  }

  /* السعر / المجموع */
  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-price,
  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-subtotal {
    grid-area: price !important;
    font-size: 0.86rem !important;
    font-weight: 500 !important;
    color: #16a34a !important;
    padding-top: 0 !important;
  }

  /* الكمية */
  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-quantity {
    grid-area: qty !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }

  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-quantity input.qty {
    width: 60px !important;
    text-align: center !important;
    border-radius: 999px !important;
  }

  /* زر الحذف */
  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-remove {
    position: absolute !important;
    top: 0.35rem !important;
    left: 0.35rem !important;
    padding: 0 !important;
  }

  body.woocommerce-cart .woocommerce-cart-form .cart_item .product-remove a.remove {
    width: 24px !important;
    height: 24px !important;
    border-radius: 999px !important;
    background: #fee2e2 !important;
    color: #b91c1c !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
  }
}

.woocommerce-cart-form .product-thumbnail img {
  max-width: 56px;
  max-height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

/* رابط حذف المنتج من السلة بشكل نص أحمر */
.ak-cart-remove-link {
  color: #ef4444;
  font-size: 0.8rem;
  text-decoration: none;
}

.ak-cart-remove-link:hover {
  text-decoration: underline;
}

/* ===== شريط ثابت في صفحة المنتج (موبايل) ===== */
.ak-product-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #ffffff;
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.18);
  padding: 0.45rem 0.8rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

@media (min-width: 768px) {
  .ak-product-sticky-bar {
    display: none;
  }
}

.ak-product-sticky-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
}

.ak-product-sticky-title {
  color: var(--text-muted);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ak-product-sticky-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.ak-product-sticky-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ak-btn-sticky {
  border-radius: 999px;
  border: none;
  font-size: 0.72rem;
  padding: 0.4rem 0.55rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.ak-btn-buy-now {
  background: #111827;
  color: #ffffff;
}

.ak-btn-add-cart {
  background: var(--primary);
  color: #ffffff;
}

.ak-btn-wa {
  background: #22c55e;
  color: #ffffff;
}

/* مساحة أسفل المحتوى في صفحة المنتج حتى لا يلتصق بالشريط */
.single-product .app-main {
  padding-bottom: 4.2rem;
}

/* اسم المنتج في السلة باللون الأحمر */
.woocommerce-cart-form .product-name,
.woocommerce-cart-form .product-name a {
  color: #ef4444;
}

/* إظهار صورة المنتج المصغرة وترتيبها بجانب الاسم على الموبايل */
@media (max-width: 767px) {
  .woocommerce-cart-form table.shop_table tbody tr.cart_item {
    display: grid;
    grid-template-columns: 1fr 56px;
    grid-column-gap: 0.75rem;
    grid-row-gap: 0.25rem;
    align-items: flex-start;
  }

  /* حذف على اليسار فوق والصورة على اليمين فوق */
  .woocommerce-cart-form td.product-remove {
    grid-column: 1;
    grid-row: 1;
  }

  .woocommerce-cart-form td.product-thumbnail {
    display: block !important;
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: center;
  }

  /* اسم المنتج تحتهم بعرض كامل */
  .woocommerce-cart-form td.product-name {
    grid-column: 1 / span 2;
    grid-row: 2;
  }

  /* باقي الحقول تحت بشكل مرتب */
  .woocommerce-cart-form td.product-price,
  .woocommerce-cart-form td.product-quantity,
  .woocommerce-cart-form td.product-subtotal {
    grid-column: 1 / span 2;
  }
}



/* ========== CATEGORY RINGS (HOME) ========== */
.ak-category-rings-section {
  margin: 0 0 1rem;
}

.ak-category-rings-section .section-header {
  margin-bottom: 0.25rem;
}

.ak-category-rings-scroll {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ak-category-rings-scroll::-webkit-scrollbar {
  height: 3px;
}

.ak-category-rings-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.ak-category-ring {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ak-category-ring-circle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-inline: auto;
  margin-bottom: 0.25rem;
}

.ak-category-ring-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ak-category-ring-letter {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.ak-category-ring-name {
  max-width: 72px;
  margin-inline: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ========== BADGE: FREE SHIPPING ========== */
.badge-free-shipping {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-right: 0.25rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-free-shipping::before {
  content: "🚚";
  font-size: 0.9rem;
}

/* ========== HEADER MINI CART ========== */
.ak-header-cart {
  position: relative;
}

.ak-mini-cart {
  position: absolute;
  top: 44px;
  right: 0;
  width: min(320px, 90vw);
  max-height: 420px;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.24);
  padding: 0.75rem;
  display: none;
  z-index: 40;
}

.ak-header-cart.is-open .ak-mini-cart {
  display: block;
}

.ak-mini-cart-inner {
  max-height: 260px;
  overflow-y: auto;
}

.ak-mini-cart-footer {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.ak-mini-cart-footer a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.ak-mini-cart-footer a.ak-mini-cart-view-cart {
  background: #f3f4f6;
}

.ak-mini-cart-footer a.ak-mini-cart-checkout {
  background: var(--primary);
  color: #ffffff;
}

/* Adjust mini cart position on desktop so it doesn't go outside */
@media (min-width: 1024px) {
  .ak-mini-cart {
    top: 52px;
  }
}



/* ========== CART MOBILE FIX: NO OVERLAP, STICKY CHECKOUT, FREE SHIPPING HIGHLIGHT ========== */

/* 1) حجم صورة المنتج وتنسيق زر الحذف بدون تداخل */
@media (max-width: 768px) {
  .woocommerce-cart-form .cart_item {
    position: static !important;
  }

  .woocommerce-cart-form .cart_item td.product-thumbnail {
    display: table-cell !important;
    width: 64px;
    padding-top: 0.5rem;
    vertical-align: top;
  }

  .woocommerce-cart-form .cart_item td.product-thumbnail img {
    max-width: 52px;
    height: auto;
    border-radius: 6px;
  }

  .woocommerce-cart-form .cart_item td.product-remove {
    position: static !important;
    text-align: right;
    padding-top: 0.25rem;
  }

  .woocommerce-cart-form .cart_item td.product-remove a.remove,
  .woocommerce-cart-form .cart_item td.product-remove .ak-cart-remove-link {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.9rem;
  }
}

/* 3) شريط إتمام الطلب ثابت أسفل صفحة السلة في الموبايل */
@media (max-width: 768px) {
  .woocommerce-cart .cart-collaterals {
    padding-bottom: 4.5rem; /* مساحة إضافية حتى لا يختفي المحتوى خلف الشريط */
  }

  .woocommerce-cart .wc-proceed-to-checkout {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px; /* فوق شريط التنقل السفلي */
    z-index: 55;
    margin: 0;
    padding: 0.5rem 1rem 0.75rem;
    background: #ffffff;
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.15);
  }

  .woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    width: 100%;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
  }
}

/* 4) إبراز الشحن المجاني في إجمالي السلة */
.woocommerce-cart .cart_totals .shipping th,
.woocommerce-cart .cart_totals .shipping td {
  color: #166534;
  font-weight: 600;
}

.woocommerce-cart .cart_totals .shipping td {
  position: relative;
  padding-right: 1.4rem;
}

.woocommerce-cart .cart_totals .shipping td::before {
  content: "🚚";
  position: absolute;
  right: 0;
  top: 0;
}




/* ===== Free delivery badge on shop & single ===== */

/* loop badge (shop / category) */
ul.products li.product {
  position: relative;
}

.ak-free-delivery-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
}

/* single product section under price */
.ak-free-delivery-single {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ak-free-delivery-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
}

.ak-free-delivery-note {
  font-size: 0.73rem;
  color: var(--text-muted, #64748b);
}




/* ===== Daily Deals ("عروض اليوم") strip ===== */
.ak-daily-deals {
  margin: 0 0 1.2rem 0;
  padding: 0.4rem 0 0.8rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  position: relative;
  overflow: visible;
}

.ak-daily-deals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem 0.4rem;
}

.ak-daily-deals-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
}

/* horizontal scroll on mobile */
.ak-daily-deals-strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  max-width: 100%;
  gap: 0.55rem;
  padding: 0 0.75rem;
  scrollbar-width: thin;
}

.ak-daily-deals-strip::-webkit-scrollbar {
  height: 4px;
}

.ak-daily-deals-strip::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.8);
  border-radius: 999px;
}

/* Smaller free-shipping pill specifically inside daily deals cards */
.product-card.product-card--deal .badge-free-shipping {
  position: absolute;
  bottom: 0.35rem;
  left: 0.35rem;
  font-size: 0.65rem;
  padding: 0.08rem 0.35rem;
}
/* deal cards: more compact */
.product-card.product-card--deal {
  min-width: 110px;
  max-width: 120px;
  flex: 0 0 auto;
  padding: 0.4rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  scroll-snap-align: start;
}

.product-card.product-card--deal .product-img-wrap {
  margin-bottom: 0.35rem;
}

/* smaller title, clamp lines */
.product-card.product-card--deal .product-title--deal a {
  font-size: 0.78rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* pricing inside deals uses same unified flex column style via global rules */

/* footer: tiny circular add-to-cart button */
.product-card.product-card--deal .product-footer--deal {
  margin-top: 0.2rem;
  display: flex;
  justify-content: flex-end;
}

.btn-add--deal {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  border: none;
  background: linear-gradient(135deg, #0f172a, #1f2937);
  color: #fff;
}


/* === Daily deal countdown badge === */
.ak-deal-countdown {
  margin: 0.25rem 0 0.1rem;
  padding: 0.12rem 0.5rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
}

.ak-deal-countdown::before {
  content: "⏰";
  font-size: 0.85rem;
}

.ak-deal-countdown-timer {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ak-deal-countdown.ak-deal-countdown--urgent {
  background: #fee2e2;
  color: #b91c1c;
}

.product-card--deal.ak-deal-expired {
  opacity: 0.5;
}


/* === Unified price styling across store === */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.product-card .product-pricing .price-current,
.product-card .product-pricing .price {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 0.05rem;
}

.woocommerce ul.products li.product .price del,
.woocommerce div.product p.price del,
.woocommerce div.product span.price del,
.product-card .product-pricing .price-current del,
.product-card .product-pricing .price del {
  color: #dc2626;
  text-decoration: line-through;
  font-size: 0.8rem;
  opacity: 0.9;
}

.woocommerce ul.products li.product .price ins,
.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins,
.product-card .product-pricing .price-current ins,
.product-card .product-pricing .price ins {
  color: #16a34a;
  font-weight: 700;
  font-size: 0.96rem;
}

/* === Unified free-delivery "توصيل
/* Larger price on single product page */
.single-product .woocommerce div.product p.price,
.single-product .woocommerce div.product span.price {
  font-size: 1.7rem;
  font-weight: 700;
}

.single-product .woocommerce div.product p.price ins,
.single-product .woocommerce div.product span.price ins {
  font-size: 2rem;
  font-weight: 800;
}

/* Slightly smaller single-product title */
.single-product .product .product_title,
.single-product .product_title {
  font-size: 1.1rem;
  line-height: 1.5;
}
 مجاني" badges === */

/* overlay on product image (cards like home/archive/search) */
.product-card .product-img-wrap {
  position: relative;
}



/* WooCommerce default loop (if used anywhere with ak-free-delivery-badge) */
ul.products li.product {
  position: relative;
}

.ak-free-delivery-badge {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  font-size: 0.62rem;
  padding: 0.05rem 0.45rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.20);
  white-space: nowrap;
}

/* Single-product "توصيل مجاني" block under price */
.ak-free-delivery-single {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ak-free-delivery-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
}

.ak-free-delivery-note {
  font-size: 0.73rem;
  color: #64748b;
}



/* === Mobile cart custom design (image card + qty +/- + delete link) === */

.akm-cart-form,
.akm-cart-list,
.akm-cart-item {
  direction: rtl;
  font-family: inherit;
}

.akm-cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Each cart item card */
.akm-cart-item {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* Product image */
.akm-cart-item__image {
  position: relative;
  flex: 0 0 100px;
  height: 100px;
  border-radius: 18px;
  overflow: hidden;
}

.akm-cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Floating quantity pill on image */
.akm-cart-item__qty-card {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  font-size: 15px;
}

/* +/- buttons */
.akm-cart-item__qty-minus,
.akm-cart-item__qty-plus {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Quantity number */
.akm-cart-item__qty-number {
  min-width: 20px;
  text-align: center;
  font-weight: 500;
}

/* Hide the real qty field */
.akm-cart-item__qty-input {
  display: none;
}

/* Right side info */
.akm-cart-item__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.akm-cart-item__title-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.akm-cart-item__title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 2px;
}

.akm-cart-item__title a {
  color: inherit;
  text-decoration: none;
}

.akm-cart-item__title a:hover {
  text-decoration: underline;
}

.akm-cart-item__image a {
  display: block;
  height: 100%;
}


.akm-cart-item__subtitle {
  font-size: 13px;
  color: #999;
}

/* Delete link */
.akm-cart-item__delete-link {
  font-size: 14px;
  color: #ff4b4b;
  text-decoration: none;
}

/* Prices */
.akm-cart-item__price-row {
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: flex-end;
}

.akm-cart-item__price-old {
  font-size: 13px;
  color: #b3b3b3;
}

.akm-cart-item__price-current {
  font-size: 16px;
  font-weight: 700;
  color: #6bbf00;
}

/* Empty cart text */
.akm-cart-empty {
  text-align: center;
  padding: 30px 10px;
  font-size: 15px;
  color: #777;
}

/* Shipping / totals wrapper */
.akm-cart-totals-wrapper {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.akm-cart-shipping-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
}

/* Proceed to checkout button color */
.woocommerce .wc-proceed-to-checkout a.checkout-button,
.woocommerce-page .wc-proceed-to-checkout a.checkout-button {
  background-color: #6a3eea; /* بنفسجي أنيق */
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
}

/* Responsive tweaks */
@media (max-width: 480px) {
  .akm-cart-item {
    padding: 10px 12px;
  }

  .akm-cart-item__image {
    flex-basis: 90px;
    height: 90px;
  }

  .akm-cart-item__title {
    font-size: 15px;
  }

  .akm-cart-item__price-current {
    font-size: 15px;
  }
}


/* Bottom nav cart badge */
.bottom-nav .bottom-cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav .bottom-cart-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.45rem;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Daily deals header "view all" link */
.ak-daily-deals-view-all {
  font-size: 0.78rem;
  color: #ef4444;
  text-decoration: none;
  font-weight: 600;
}

.ak-daily-deals-view-all::after {
  content: "›";
  margin-right: 0.15rem;
}

.ak-daily-deals-view-all:hover {
  text-decoration: underline;
}
