/* NanhiSmile — product cards, price, stars, gallery, carousels, sticky CTA */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { position: relative; display: flex; flex-direction: column; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: var(--ns-radius-card); overflow: hidden; transition: box-shadow var(--ns-transition), transform var(--ns-transition); }
.product-card:hover { box-shadow: var(--ns-shadow-md); transform: translateY(-2px); }
.product-card__media { position: relative; display: block; aspect-ratio: 1 / 1; background: #FBF4F0; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__flag { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.product-card__wish { position: absolute; top: 6px; right: 6px; z-index: 2; width: 36px; height: 36px; background: rgba(255, 255, 255, 0.92); box-shadow: var(--ns-shadow-sm); border-radius: 999px; }
.product-card__body { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 12px; flex: 1; }
.product-card__brand { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ns-text-muted); }
.product-card__title { font-size: 0.9rem; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.45em; }
.product-card__title a:hover { color: var(--ns-primary-600); }
.product-card__oos { font-size: 0.8rem; font-weight: 800; color: var(--ns-error); margin-top: auto; }
.product-card .btn { margin-top: auto; }

.rating-line { display: flex; align-items: center; }
.stars { position: relative; display: inline-flex; line-height: 0; }
.stars__row { display: flex; gap: 1px; color: #E8D9E2; }
.stars__fill { position: absolute; top: 0; bottom: 0; left: 0; overflow: hidden; color: var(--ns-accent-600); }
.stars__fill .stars__row { color: inherit; }
.stars__count { font-size: 0.75rem; font-weight: 700; color: var(--ns-text-muted); margin-left: 5px; }

.price-block { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.price-block__now { font-size: 1.02rem; font-weight: 800; color: var(--ns-text-primary); }
.price-block__mrp { font-size: 0.8rem; color: var(--ns-text-muted); text-decoration: line-through; }
.price-block__off { font-size: 0.78rem; font-weight: 800; color: var(--ns-success); }
.price-block--large .price-block__now { font-size: 1.5rem; }
.price-block--large .price-block__mrp { font-size: 0.95rem; }
.price-block--large .price-block__off { font-size: 0.9rem; }

.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--ns-input-border); border-radius: 999px; background: var(--ns-surface); overflow: hidden; }
.qty-stepper__btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--ns-primary-600); }
.qty-stepper__btn:hover { background: var(--ns-primary-50); }
.qty-stepper__val { min-width: 34px; text-align: center; font-weight: 800; }

/* Horizontal scroll carousel */
.carousel { position: relative; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(46%, 1fr); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
@media (min-width: 768px) { .carousel__track { grid-auto-columns: minmax(230px, 1fr); gap: 14px; } }
.carousel__nav { display: none; position: absolute; top: 38%; width: 40px; height: 40px; border-radius: 50%; background: var(--ns-surface); border: 1px solid var(--ns-border); box-shadow: var(--ns-shadow-md); color: var(--ns-text-primary); align-items: center; justify-content: center; z-index: 5; }
.carousel__nav:hover { color: var(--ns-primary-600); border-color: var(--ns-primary-500); }
.carousel__nav--prev { left: -8px; }
.carousel__nav--next { right: -8px; }
@media (min-width: 1024px) { .carousel__nav { display: flex; } }

/* Product row (cart, orders) */
.product-row { display: flex; gap: 12px; }
.product-row__img { flex: none; width: 86px; height: 86px; border-radius: 14px; overflow: hidden; border: 1px solid var(--ns-border); background: #FBF4F0; }
.product-row__img img { width: 100%; height: 100%; object-fit: cover; }
.product-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.product-row__brand { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ns-text-muted); }
.product-row__title { font-weight: 700; font-size: 0.92rem; line-height: 1.35; }
.product-row__variant { font-size: 0.76rem; color: var(--ns-text-muted); }
.product-row__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* Gallery (PDP) */
.gallery__main { aspect-ratio: 1 / 1; border-radius: var(--ns-radius-card); overflow: hidden; background: #FBF4F0; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { flex: none; width: 58px; height: 58px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #FBF4F0; padding: 0; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--ns-primary-500); }

/* Sticky add-to-cart bar */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: calc(var(--ns-bottomnav-h) + env(safe-area-inset-bottom, 0px)); z-index: 65; background: var(--ns-surface); border-top: 1px solid var(--ns-border); box-shadow: 0 -6px 20px rgba(42, 32, 48, 0.08); padding: 10px 16px; display: flex; gap: 12px; align-items: center; }
.sticky-cta__price { line-height: 1.2; }
.sticky-cta__price small { display: block; font-size: 0.72rem; color: var(--ns-text-muted); }
.sticky-cta .btn { flex: 1; }
@media (min-width: 1024px) { .sticky-cta { display: none; } }

/* Attribute list (specs) */
.attr-list { display: grid; gap: 0; }
.attr-list__row { display: flex; gap: 12px; padding-block: 9px; border-bottom: 1px dashed var(--ns-border); font-size: 0.88rem; }
.attr-list__row:last-child { border-bottom: 0; }
.attr-list__key { flex: none; width: 132px; color: var(--ns-text-muted); font-weight: 700; }
.attr-list__val { color: var(--ns-text-primary); }
