/* ============================================================
   RK Keys — components.css
   Buttons, Cards, Badges, Product Cards, Forms
   ============================================================ */

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--clr-primary);
  color: var(--clr-white);
  border-color: var(--clr-primary);
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-teal);
}

.btn-accent {
  background: var(--clr-accent);
  color: var(--clr-dark);
  border-color: var(--clr-accent);
}

.btn-accent:hover,
.btn-accent:active {
  background: var(--clr-accent-dark);
  border-color: var(--clr-accent-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}

.btn-outline:hover,
.btn-outline:active {
  background: var(--clr-primary);
  color: var(--clr-white);
}

.btn-dark {
  background: var(--clr-dark);
  color: var(--clr-white);
  border-color: var(--clr-dark);
}

.btn-dark:hover {
  background: #0f1e20;
}

.btn-sm {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-icon {
  min-height: 48px;
  min-width: 48px;
  padding: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.badge-new {
  background: var(--clr-new);
  color: #fff;
}

.badge-sale {
  background: var(--clr-danger);
  color: #fff;
}

.badge-hot {
  background: var(--clr-accent);
  color: var(--clr-dark);
}

.badge-featured {
  background: var(--clr-primary);
  color: #fff;
}

/* ── Product Card ────────────────────────────────────────── */
.product-card {
  background: var(--clr-white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--clr-gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-primary-light);
}

.product-card__badges {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.product-card__image-wrap {
  position: relative;
  background: var(--clr-gray-50);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.product-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform var(--ease-slow);
}

.product-card:hover .product-card__image-wrap img {
  transform: scale(1.06);
}

.product-card__actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem;
  background: linear-gradient(to top, rgba(26, 46, 48, 0.85) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform var(--ease);
}

.product-card:hover .product-card__actions {
  transform: translateY(0);
}

.product-card__actions .btn {
  flex: 1;
  min-height: 38px;
  font-size: 0.7rem;
}

.product-card__body {
  padding: 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-card__brand {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.product-card__price-current {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--clr-primary-dark);
}

.product-card__price-old {
  font-size: 0.8rem;
  color: var(--clr-gray-500);
  text-decoration: line-through;
}

.product-card__price-discount {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--clr-danger);
}

.product-card__add-btn {
  margin-top: 0.6rem;
  width: 100%;
  min-height: 42px;
  background: var(--clr-primary);
  color: var(--clr-white);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background var(--ease);
  border: none;
  cursor: pointer;
}

.product-card__add-btn:hover,
.product-card__add-btn:active {
  background: var(--clr-primary-dark);
}

/* Hide WooCommerce default View Cart link */
.product-card .added_to_cart {
  display: none !important;
}

/* ── Quantity Stepper (archive/shop page) ──────────────── */
.product-card__qty-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.product-card__qty-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--clr-gray-500, #6c757d);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.product-card__qty-stepper {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1.5px solid var(--clr-gray-200, #e9ecef);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  height: 34px;
  transition: border-color var(--ease, 0.18s ease);
}

.product-card__qty-stepper:focus-within {
  border-color: var(--clr-primary, #42979d);
}

.qty-stepper__btn {
  flex-shrink: 0;
  width: 30px;
  height: 100%;
  border: none;
  background: var(--clr-gray-50, #f8f9fa);
  color: var(--clr-gray-700, #343a40);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background var(--ease, 0.18s ease), color var(--ease, 0.18s ease);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.qty-stepper__btn:hover {
  background: var(--clr-primary, #42979d);
  color: #fff;
}

.qty-stepper__btn:active {
  background: var(--clr-primary-dark, #357a80);
  color: #fff;
}

.qty-stepper__input {
  flex: 1;
  width: 0;
  /* flex will expand it */
  min-width: 28px;
  height: 100%;
  border: none;
  border-left: 1.5px solid var(--clr-gray-200, #e9ecef);
  border-right: 1.5px solid var(--clr-gray-200, #e9ecef);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--clr-gray-900, #212529);
  background: transparent;
  -moz-appearance: textfield;
  outline: none;
  padding: 0;
}

/* Hide browser number spin arrows */
.qty-stepper__input::-webkit-inner-spin-button,
.qty-stepper__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


/* Product Grid ────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.product-card-wrap .product-card {
  width: 100%;
}

@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1280px) {
  .product-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ── Brand Card ──────────────────────────────────────────── */
.brand-card {
  background: var(--clr-white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--clr-gray-200);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all var(--ease);
  text-align: center;
}

.brand-card:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-teal);
  transform: translateY(-2px);
}

.brand-card__logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--clr-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
}

.brand-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-card__name {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-text);
}

/* ── Search Box ──────────────────────────────────────────── */
.search-box {
  display: flex;
  align-items: center;
  background: var(--clr-white);
  border: 2px solid var(--clr-gray-200);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--ease);
}

.search-box:focus-within {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(66, 151, 157, 0.15);
}

.search-box input {
  flex: 1;
  min-height: 48px;
  padding: 0 1.25rem;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--clr-text);
  background: transparent;
}

.search-box input::placeholder {
  color: var(--clr-gray-300);
}

.search-box button {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-primary);
  color: var(--clr-white);
  border: none;
  cursor: pointer;
  transition: background var(--ease);
  flex-shrink: 0;
}

.search-box button:hover {
  background: var(--clr-primary-dark);
}

/* Search in header (compact) */
.header-search .search-box {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.header-search .search-box input {
  color: var(--clr-white);
  font-size: 0.88rem;
  min-height: 42px;
}

.header-search .search-box input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search .search-box:focus-within {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.header-search .search-box button {
  background: var(--clr-accent);
  color: var(--clr-dark);
  width: 42px;
  height: 42px;
}

/* ── Swiper overrides ────────────────────────────────────── */
.swiper-button-next,
.swiper-button-prev {
  width: 40px !important;
  height: 40px !important;
  background: var(--clr-white);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  color: var(--clr-dark) !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 14px !important;
  font-weight: 900;
}

.swiper-pagination-bullet {
  background: var(--clr-primary) !important;
}

.swiper-pagination-bullet-active {
  background: var(--clr-primary-dark) !important;
}

/* Hero swiper */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
  background: rgba(255, 255, 255, 0.15);
  color: var(--clr-white) !important;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}