/* ============================================================
   Didiz Shapers — Components CSS
   Product cards, shop, cart, checkout, product detail, etc.
   ============================================================ */


/* ╔══════════════════════════════════════════════════════════╗
   ║  PRODUCT CARD                                            ║
   ╚══════════════════════════════════════════════════════════╝ */

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  height: 100%;
}
.product-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
  transform: translateY(-3px);
}

.product-card__image {
  position: relative;
  overflow: hidden;
  background: var(--surface, #faf9f7);
  aspect-ratio: 3 / 4;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.product-card:hover .product-card__img { transform: scale(1.04); }

.product-card__img--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}

.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.4;
  z-index: 2;
}
.product-badge--sale { background: #e74c3c; color: #fff; }
.product-badge--new  { background: #27ae60; color: #fff; }
.product-badge--hot  { background: var(--primary, #c8965a); color: #fff; }

.product-card__wishlist {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: none;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: .9rem;
  transition: background .2s, color .2s, transform .2s;
}
.product-card__wishlist:hover,
.product-card__wishlist.active { color: #e74c3c; background: #fff; transform: scale(1.1); }

.product-card__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .75rem;
  background: linear-gradient(transparent, rgba(255,255,255,.95) 40%);
  transform: translateY(100%);
  transition: transform .25s ease;
  z-index: 2;
}
.product-card:hover .product-card__overlay { transform: translateY(0); }
.product-card__link { display: block; height: 100%; }

.product-card__info {
  padding: .85rem;
  border-top: 1px solid var(--border, #e8e0d6);
}

.product-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .875rem;
  font-weight: 500;
  color: var(--dark, #1a1208);
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: .35rem;
}
.product-card__name:hover { color: var(--primary, #c8965a); }

.product-card__price { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.price-current  { font-weight: 700; color: var(--dark, #1a1208); font-size: .925rem; }
.price-original { font-size: .8rem; color: #999; text-decoration: line-through; font-weight: 400; }

/* Quick-add / Add-to-cart button on product card */
.product-card__atc-btn {
  display: block;
  width: 100%;
  margin-top: .55rem;
  padding: .45rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
  background: var(--primary, #c8965a);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, transform .15s, opacity .2s;
}
.product-card__atc-btn:hover  { background: var(--primary-dark, #a0703a); transform: translateY(-1px); }
.product-card__atc-btn:active { transform: translateY(0); }
.product-card__atc-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
/* Wishlisted state */
.product-card__wishlist.is-wishlisted { color: #e74c3c; background: #fff; }


/* ╔══════════════════════════════════════════════════════════╗
   ║  SHOP PAGE                                               ║
   ╚══════════════════════════════════════════════════════════╝ */

.shop-sidebar { position: sticky; top: calc(var(--header-h, 72px) + 1.5rem); }

.sidebar-widget__title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted, #8a7a68);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border, #e8e0d6);
}

.sidebar-cat-link {
  display: block;
  font-size: .875rem;
  padding: .35rem 0;
  color: var(--text, #3d3022);
  text-decoration: none;
  transition: color .15s;
}
.sidebar-cat-link:hover { color: var(--primary, #c8965a); }
.sidebar-cat-link.active { color: var(--primary, #c8965a); font-weight: 600; }

.shop-toolbar {
  background: #fff;
  border: 1px solid var(--border, #e8e0d6);
  border-radius: var(--radius, 8px);
  padding: .75rem 1rem;
}
.shop-toolbar__count { font-size: .85rem; }


/* ╔══════════════════════════════════════════════════════════╗
   ║  PRODUCT DETAIL                                          ║
   ╚══════════════════════════════════════════════════════════╝ */

.product-gallery__main {
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface, #faf9f7);
  cursor: zoom-in;
}
.product-gallery__main img { transition: transform .25s ease; }

.product-gallery__thumb {
  cursor: pointer;
  transition: border-color .2s, opacity .2s;
  opacity: .75;
  border: 2px solid transparent !important;
}
.product-gallery__thumb:hover,
.product-gallery__thumb.active { opacity: 1; border-color: var(--primary, #c8965a) !important; }

.size-btn, .color-btn {
  min-width: 48px;
  height: 36px;
  font-size: .82rem;
  border-radius: 6px;
  transition: background .15s, border-color .15s, color .15s;
}
.size-btn.active, .color-btn.active {
  background: var(--dark, #1a1208);
  border-color: var(--dark, #1a1208);
  color: #fff;
}


/* ╔══════════════════════════════════════════════════════════╗
   ║  CART                                                    ║
   ╚══════════════════════════════════════════════════════════╝ */

.cart-item { transition: background .15s; }
.cart-item:hover { background: var(--surface, #faf9f7); }


/* ╔══════════════════════════════════════════════════════════╗
   ║  BLOG CARDS                                              ║
   ╚══════════════════════════════════════════════════════════╝ */

.blog-card {
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.blog-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
  transform: translateY(-2px);
}
.blog-card .card-img-top { transition: transform .4s ease; }
.blog-card:hover .card-img-top { transform: scale(1.03); }


/* ╔══════════════════════════════════════════════════════════╗
   ║  TOPBAR + MARQUEE                                        ║
   ╚══════════════════════════════════════════════════════════╝ */

.site-topbar {
  background: var(--dark, #1a1208);
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  font-weight: 500;
  text-align: center;
  padding: .45rem 1rem;
  letter-spacing: .3px;
  overflow: hidden;
}
.site-topbar a { color: var(--primary, #c8965a); text-decoration: none; }

.topbar-marquee {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.topbar-marquee span {
  flex-shrink: 0;
  padding: 0 2.5rem;
}
.topbar-marquee span::after {
  content: '·';
  margin-left: 2.5rem;
  color: var(--primary, #c8965a);
}
.topbar-marquee span:last-child::after { display: none; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ╔══════════════════════════════════════════════════════════╗
   ║  SEARCH OVERLAY                                          ║
   ╚══════════════════════════════════════════════════════════╝ */

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,18,8,.7);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}
.search-overlay.is-open { display: flex; }
.search-overlay__box {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: min(700px, 90vw);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.search-overlay__input {
  font-size: 1.2rem;
  border: none;
  outline: none;
  width: 100%;
  padding: .5rem 0;
  border-bottom: 2px solid var(--border, #e8e0d6);
  color: var(--dark, #1a1208);
}
.search-overlay__input:focus { border-bottom-color: var(--primary, #c8965a); }
.search-result-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .5rem;
  text-decoration: none;
  border-radius: 6px;
  color: var(--dark, #1a1208);
  transition: background .15s;
}
.search-result-item:hover { background: var(--surface, #faf9f7); color: var(--primary, #c8965a); }
.search-result-item img { width: 44px; height: 52px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }


/* ╔══════════════════════════════════════════════════════════╗
   ║  PAGINATION                                              ║
   ╚══════════════════════════════════════════════════════════╝ */

.page-link { color: var(--primary, #c8965a); }
.page-item.active .page-link {
  background: var(--primary, #c8965a);
  border-color: var(--primary, #c8965a);
  color: #fff;
}
.page-link:hover { color: var(--primary-dark, #a57040); }
.page-link:focus { box-shadow: 0 0 0 3px rgba(200,150,90,.18); }


/* ╔══════════════════════════════════════════════════════════╗
   ║  REVIEW ITEM                                             ║
   ╚══════════════════════════════════════════════════════════╝ */

.review-item:first-of-type {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}


/* ╔══════════════════════════════════════════════════════════╗
   ║  RESPONSIVE                                              ║
   ╚══════════════════════════════════════════════════════════╝ */

@media (max-width: 991.98px) {
  .shop-sidebar { position: static; }
}

@media (max-width: 575.98px) {
  .product-card__info { padding: .65rem; }
  .product-card__name { font-size: .8rem; }
}
