/* Shop page – modern layout overrides (shop.php only) */

/* Toolbar */
.shop-toolbar {
  background: rgba(18, 18, 34, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  margin-bottom: 22px;
}
.shop-toolbar .sidebar-widget { margin-bottom: 0; }
.shop-toolbar .search-box { background: transparent; padding: 0; }
.shop-toolbar .search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 10px;
}
.shop-toolbar .search-form .form-control {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 8px 10px;
  border-radius: 999px;
  box-shadow: none;
}
.shop-toolbar .search-form .form-control::placeholder { color: rgba(255, 255, 255, 0.6); }
.shop-toolbar .search-form .search-btn {
  height: 40px;
  width: 40px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #6366f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shop-toolbar .search-form .search-btn:hover { opacity: 0.85; }

.shop-top {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.shop-top .left-content {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.2;
}
.shop-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.shop-top-actions .select-control-wrap { min-width: 280px; }
.shop-top .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}
.shop-top .btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.shop-top .select-control,
.shop-top .nice-select {
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  padding-right: 48px;
  color: rgba(255, 255, 255, 0.9);
}
.shop-top .nice-select { min-width: 280px; }
.shop-top .nice-select:after {
  color: rgba(255, 255, 255, 0.7);
  right: 18px;
}
.shop-top .nice-select .list {
  border-radius: 14px;
  background: rgba(18, 18, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: max-content;
  min-width: 100%;
}

/* Filters */
.shop-filters {
  background: rgba(18, 18, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  color: var(--rr-color-common-white);
  position: sticky;
  top: 110px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}
.shop-filters .filter-title {
  font-weight: 700;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.9);
}
.shop-filters .form-check { margin-bottom: 8px; }
.shop-filters .form-check-label { color: rgba(255, 255, 255, 0.85); }
.shop-filters .tiny-text { color: rgba(255, 255, 255, 0.55); }
.shop-filters .form-check-input {
  border-color: #6366f3;
  background-color: transparent;
}
.shop-filters .form-check-input:checked {
  background-color: #121222;
  border-color: #121222;
}
.shop-filters .form-check-input:focus {
  border-color: #6366f3;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 243, 0.18);
}
.shop-filters .btn.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}
.shop-filters .btn.btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* Product cards */
.shop-item {
  background: rgba(18, 18, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  height: 100%;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.shop-item:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 243, 0.45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}
.shop-item .shop-thumb {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 680 / 620;
}
.shop-item .shop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  transition: transform 0.35s ease;
}
.shop-item .shop-thumb .overlay {
  visibility: visible;
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 35%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}
.shop-item .shop-thumb .sale {
  border-radius: 999px;
  padding: 6px 12px;
  top: 12px;
  left: 12px;
  letter-spacing: 0.6px;
}
.shop-item .shop-thumb .shop-list {
  top: auto;
  bottom: 12px;
  left: 50%;
  width: auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  transform: translate(-50%, 10px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.shop-item .shop-thumb .shop-list li { display: inline-flex; margin: 0 !important; }
.shop-item .shop-thumb .shop-list .shop-action,
.shop-item .shop-thumb .shop-list li a {
  height: 44px;
  width: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 18, 34, 0.7);
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shop-item .shop-thumb .shop-list button.shop-action { padding: 0; cursor: pointer; }
.shop-item .shop-thumb .shop-list .shop-action:hover,
.shop-item .shop-thumb .shop-list li a:hover {
  background: rgba(99, 102, 243, 0.9);
  border-color: rgba(99, 102, 243, 1);
  color: #fff;
}
.shop-item .shop-thumb .shop-list .shop-action.is-active {
  background: rgba(99, 102, 243, 0.95);
  border-color: rgba(99, 102, 243, 1);
  color: #ffffff;
}

.shop-item .shop-content { margin-top: 14px; }
.shop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.shop-meta .category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
}
.shop-rating {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.shop-rating i { color: #ffba08; }
.shop-rating-count { color: rgba(255, 255, 255, 0.6); font-weight: 600; }

.shop-title {
  display: block;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 10px 0;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.shop-title:hover { color: #6366f3; }
.shop-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
}
.shop-price .current {
  color: #6366f3;
  font-size: 1rem;
}
.shop-price .offer {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
  font-weight: 700;
}

/* Light theme overrides */
[data-theme=light] .shop-toolbar {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(18, 18, 34, 0.12);
}
[data-theme=light] .shop-toolbar .search-form {
  background: rgba(18, 18, 34, 0.04);
  border-color: rgba(18, 18, 34, 0.12);
}
[data-theme=light] .shop-toolbar .search-form .form-control {
  color: #121222;
}
[data-theme=light] .shop-toolbar .search-form .form-control::placeholder {
  color: rgba(18, 18, 34, 0.55);
}
[data-theme=light] .shop-top .left-content {
  color: rgba(18, 18, 34, 0.65);
}
[data-theme=light] .shop-top .btn-outline-light {
  border-color: rgba(99, 102, 243, 0.55);
  color: #6366f3;
}
[data-theme=light] .shop-top .btn-outline-light:hover {
  background: rgba(99, 102, 243, 0.1);
}
[data-theme=light] .shop-top .select-control,
[data-theme=light] .shop-top .nice-select {
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  color: #121222;
}
[data-theme=light] .shop-top .nice-select:after {
  color: rgba(18, 18, 34, 0.65);
}
[data-theme=light] .shop-top .nice-select .list {
  background: #ffffff;
  border-color: rgba(18, 18, 34, 0.12);
}

[data-theme=light] .shop-filters {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(18, 18, 34, 0.12);
  color: #121222;
}
[data-theme=light] .shop-filters .filter-title,
[data-theme=light] .shop-filters .form-check-label {
  color: #121222;
}
[data-theme=light] .shop-filters .tiny-text {
  color: rgba(18, 18, 34, 0.55);
}
[data-theme=light] .shop-filters .form-check-input {
  border-color: #6366f3;
}

[data-theme=light] .shop-item {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(18, 18, 34, 0.12);
}
[data-theme=light] .shop-meta .category {
  color: rgba(18, 18, 34, 0.65);
}
[data-theme=light] .shop-rating {
  color: #121222;
}
[data-theme=light] .shop-rating-count {
  color: rgba(18, 18, 34, 0.55);
}
[data-theme=light] .shop-title {
  color: #121222;
}
[data-theme=light] .shop-title:hover {
  color: #6366f3;
}
[data-theme=light] .shop-price .offer {
  color: rgba(18, 18, 34, 0.55);
}

/* Shop details: keep primary button icon stable */
.product-info .product-btn .rr-primary-btn i {
  transform: none;
}
.product-info .product-btn .rr-primary-btn:hover i {
  transform: none;
}

/* Mobile filters drawer + backdrop */
@media (max-width: 991.98px) {
  .shop-section aside.col-lg-3 { display: contents; }
  body.shop-filters-open { overflow: hidden; }
  .shop-filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 19990;
  }
  body.shop-filters-open .shop-filters-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .shop-filters {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: min(85vh, 720px);
    overflow: auto;
    transform: translateY(110%);
    transition: transform 0.25s ease;
    z-index: 20000;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  body.shop-filters-open .shop-filters {
    transform: translateY(0);
  }
  /* Touch-friendly: always show quick actions */
  .shop-item .shop-thumb .overlay { opacity: 1; }
  .shop-item .shop-thumb .shop-list {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%);
  }
  .shop-top-actions .select-control-wrap {
    flex: 1 1 280px;
    min-width: 280px;
  }
}

@media (max-width: 575.98px) {
  .shop-toolbar { padding: 12px; }
  .shop-item { padding: 12px; border-radius: 16px; }
  .shop-item .shop-thumb { border-radius: 14px; }
  .shop-item .shop-thumb .shop-list .shop-action,
  .shop-item .shop-thumb .shop-list li a { height: 42px; width: 42px; }
}

@media (max-width: 767.98px) {
  .shop-section #catalog > .col-xl-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Desktop hover: reveal actions */
@media (hover: hover) and (pointer: fine) {
  .shop-item:hover .shop-thumb img { transform: scale(1.03); transition: transform 0.35s ease; }
  .shop-item:hover .shop-thumb .overlay { opacity: 1; }
  .shop-item:hover .shop-thumb .shop-list {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* Shop details: ensure 680x620 images show fully (no white bar) */
.product-details-wrap .product-gallary .gallary-item {
  background-color: transparent;
  overflow: hidden;
}
.product-details-wrap .product-gallary .gallary-item .product-lightbox-trigger {
  display: block;
  height: 100%;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}
.product-details-wrap .product-gallary .gallary-item img {
  display: block;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

/* Product lightbox (shop-details) */
body.product-lightbox-open { overflow: hidden; }
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
}
.product-lightbox.is-open { display: block; }
.product-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}
.product-lightbox__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 92vw);
  height: min(90vh, 860px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.product-lightbox__swiper {
  width: 100%;
  height: 100%;
}
.product-lightbox__swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-lightbox__swiper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #121222;
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.45);
}
.product-lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000001;
  height: 44px;
  width: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 18, 34, 0.55);
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  pointer-events: auto;
}
.product-lightbox__close-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.product-lightbox__close:hover { background: rgba(18, 18, 34, 0.75); }
.product-lightbox__next,
.product-lightbox__prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 48px;
  width: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 18, 34, 0.5);
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  font-size: 0;
  line-height: 0;
}
.product-lightbox__prev { left: 16px; }
.product-lightbox__next { right: 16px; }
.product-lightbox__nav-icon {
  width: 26px;
  height: 26px;
  display: block;
}
.product-lightbox__next:hover,
.product-lightbox__prev:hover {
  background: rgba(18, 18, 34, 0.75);
}
.product-lightbox--single .product-lightbox__next,
.product-lightbox--single .product-lightbox__prev {
  display: none;
}
@media (max-width: 575.98px) {
  .product-lightbox__dialog { width: 92vw; height: 86vh; }
  .product-lightbox__close { top: 12px; right: 12px; height: 40px; width: 40px; }
  .product-lightbox__close-icon { width: 20px; height: 20px; }
  .product-lightbox__nav-icon { width: 24px; height: 24px; }
  .product-lightbox__next,
  .product-lightbox__prev { height: 42px; width: 42px; }
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.3s ease;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  min-width: 240px;
  max-width: 360px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-success {
  background: #16a34a;
}
.toast-error {
  background: #dc2626;
}
.toast-info {
  background: #2563eb;
}
.toast-warning {
  background: #f59e0b;
  color: #111;
}
