/* =============================================
   NEW PRODUCT PAGE — Kenaf Mall
   Editorial / Magazine-Inspired Product Layout
   ============================================= */

/* --- Breadcrumb --- */
.np-breadcrumb {
  padding: 20px 0 10px;
}

.np-breadcrumb ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.np-breadcrumb ul li {
  font-size: 0.8rem;
  color: var(--color-text-light);
  letter-spacing: 0.3px;
}

.np-breadcrumb ul li a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.25s ease;
}

.np-breadcrumb ul li a:hover {
  color: var(--theme-color);
}

.np-breadcrumb ul li .bc-sep {
  color: #ccc;
  font-size: 0.65rem;
}

/* --- Product Hero Section --- */
.np-product-hero {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
  padding: 0;
  overflow: hidden;
  margin-bottom: 40px;
}

/* --- Gallery Side --- */
.np-gallery {
  position: relative;
  background: #fafafa;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.np-gallery-main {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: crosshair;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.np-gallery-main:hover {
  transform: scale(1.03);
}

.np-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.np-gallery-thumbs a {
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  opacity: 0.65;
}

.np-gallery-thumbs a:hover,
.np-gallery-thumbs a.active {
  border-color: var(--theme-color);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.np-gallery-thumbs a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Product Info Side --- */
.np-info {
  padding: 40px 40px 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.np-vendor-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f8f4f0, #f0ebe5);
  color: #7a5a3a;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
  width: fit-content;
}

.np-vendor-tag i {
  font-size: 0.7rem;
}

.np-product-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.np-short-desc {
  color: var(--color-text-light);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 480px;
}

/* Rating */
.np-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.np-stars {
  display: flex;
  gap: 2px;
}

.np-stars i {
  font-size: 0.85rem;
  color: #e0c97f;
}

.np-stars i.empty {
  color: #ddd;
}

.np-rating-count {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* Price Block */
.np-price-block {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #fdf9f5, #faf6f1);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--theme-color);
}

.np-price-current {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.5px;
}

.np-price-old {
  font-size: 1.05rem;
  color: #b0a090;
  text-decoration: line-through;
}

.np-price-save {
  font-size: 0.78rem;
  font-weight: 600;
  color: #d4763a;
  background: rgba(212, 118, 58, 0.1);
  padding: 3px 10px;
  border-radius: 50px;
}

/* Stock Indicator */
.np-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.np-stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  animation: np-pulse 1.8s infinite;
}

.np-stock-dot.low {
  background: #ff9800;
}

.np-stock-dot.out {
  background: #e53935;
  animation: none;
}

@keyframes np-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.np-stock-label {
  color: var(--color-text);
  font-weight: 500;
}

.np-stock-qty {
  color: var(--color-text-light);
  font-weight: 400;
}

/* Options (Size/Color) */
.np-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.np-option-group {
  flex: 1;
  min-width: 160px;
}

.np-option-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.np-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e8e2dc;
  border-radius: 10px;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  cursor: pointer;
}

.np-select:focus {
  outline: none;
  border-color: var(--theme-color);
  box-shadow: 0 0 0 3px rgba(97, 46, 9, 0.08);
}

/* Quantity */
.np-qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.np-qty-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.np-qty-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #e8e2dc;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-white);
}

.np-qty-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--color-text);
  transition: background 0.2s ease;
}

.np-qty-btn:hover {
  background: #f5f0eb;
}

.np-qty-input {
  width: 50px;
  text-align: center;
  border: none;
  border-left: 1.5px solid #e8e2dc;
  border-right: 1.5px solid #e8e2dc;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-dark);
  outline: none;
  -moz-appearance: textfield;
}

.np-qty-input::-webkit-outer-spin-button,
.np-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Action Buttons */
.np-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.np-btn-cart {
  flex: 1;
  min-width: 200px;
  padding: 14px 28px;
  background: var(--color-dark);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.np-btn-cart::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.np-btn-cart:hover::before {
  left: 100%;
}

.np-btn-cart:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.np-btn-cart i {
  font-size: 1rem;
}

.np-btn-wishlist {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e8e2dc;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-text-light);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.np-btn-wishlist:hover {
  border-color: #e74c6f;
  color: #e74c6f;
  background: #fef0f3;
  transform: scale(1.08);
}

/* --- Product Details Tabs --- */
.np-details-section {
  margin-bottom: 50px;
}

.np-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eee;
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.np-tab-btn {
  padding: 16px 28px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
  margin-bottom: -2px;
}

.np-tab-btn:hover {
  color: var(--color-dark);
}

.np-tab-btn.active {
  color: var(--color-dark);
  border-bottom-color: var(--theme-color);
}

.np-tab-content {
  background: var(--color-white);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.np-tab-pane {
  display: none;
  padding: 32px 36px;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--color-text);
  animation: np-fadeIn 0.35s ease;
}

.np-tab-pane.active {
  display: block;
}

@keyframes np-fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.np-tab-pane p {
  margin-bottom: 12px;
}

.np-tab-pane img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* --- Reviews Section --- */
.np-reviews-section {
  padding: 32px 36px;
}

.np-reviews-header {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 24px;
}

.np-review-card {
  background: var(--color-bg-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 14px;
  border-left: 3px solid #e8e2dc;
  transition: border-color 0.3s ease;
}

.np-review-card:hover {
  border-left-color: var(--theme-color);
}

.np-review-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.np-review-text {
  color: var(--color-text-light);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Review Form */
.np-review-form {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.np-review-form h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 18px;
}

.np-star-rating {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.np-star-rating input[type="radio"] {
  display: none;
}

.np-star-rating label {
  font-size: 1.6rem;
  color: #ddd;
  cursor: pointer;
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.np-star-rating label:hover,
.np-star-rating label:hover ~ label,
.np-star-rating input:checked ~ label {
  color: #e0c97f;
}

.np-star-rating label:hover {
  transform: scale(1.15);
}

/* Reverse order trick for CSS-only star rating */
.np-star-rating {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.np-star-rating input:checked + label,
.np-star-rating input:checked + label ~ label {
  color: #e0c97f;
}

.np-star-rating label:hover,
.np-star-rating label:hover ~ label {
  color: #e0c97f !important;
}

.np-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #e8e2dc;
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-family: var(--font-primary);
  font-size: 0.88rem;
  color: var(--color-text);
  resize: vertical;
  min-height: 100px;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.np-textarea:focus {
  outline: none;
  border-color: var(--theme-color);
  box-shadow: 0 0 0 3px rgba(97, 46, 9, 0.08);
}

.np-btn-submit {
  padding: 12px 30px;
  background: var(--color-dark);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.np-btn-submit:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.np-login-prompt {
  color: var(--color-text-light);
  font-size: 0.88rem;
  margin-top: 12px;
}

.np-login-prompt a {
  color: var(--theme-color);
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.np-login-prompt a:hover {
  color: var(--color-dark);
}

/* --- Related Products --- */
.np-related-section {
  padding: 60px 0 70px;
  background: var(--color-bg-light);
}

.np-section-title {
  text-align: center;
  margin-bottom: 40px;
}

.np-section-title h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: -0.3px;
}

.np-section-title p {
  color: var(--color-text-light);
  font-size: 0.92rem;
  margin-top: 6px;
}

/* Related Product Card */
.np-rel-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.np-rel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

.np-rel-thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #f5f5f5;
}

.np-rel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.np-rel-card:hover .np-rel-thumb img {
  transform: scale(1.08);
}

.np-rel-body {
  padding: 18px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.np-rel-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-rel-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.np-rel-name a:hover {
  color: var(--theme-color);
}

.np-rel-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 14px;
}

.np-rel-price .current {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
}

.np-rel-price .old {
  font-size: 0.85rem;
  color: #bbb;
  text-decoration: line-through;
}

.np-rel-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: var(--color-dark);
  color: #fff;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.np-rel-link:hover {
  background: #333;
  color: #fff;
  transform: translateY(-1px);
}

/* --- Alerts --- */
.np-alert {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  animation:
    np-slideIn 0.4s ease,
    np-slideOut 0.4s ease 3.5s forwards;
  max-width: 380px;
}

.np-alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.np-alert-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #e53935;
}

@keyframes np-slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes np-slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .np-product-hero .row {
    flex-direction: column;
  }

  .np-gallery {
    min-height: 380px;
    padding: 24px;
  }

  .np-info {
    padding: 28px 24px 32px;
  }

  .np-product-title {
    font-size: 1.45rem;
  }

  .np-price-current {
    font-size: 1.65rem;
  }

  .np-tab-btn {
    padding: 14px 20px;
    font-size: 0.82rem;
  }

  .np-tab-pane,
  .np-reviews-section {
    padding: 24px 20px;
  }
}

@media (max-width: 767px) {
  .np-gallery {
    min-height: 300px;
    padding: 20px;
  }

  .np-gallery-main {
    max-height: 300px;
  }

  .np-gallery-thumbs a {
    width: 56px;
    height: 56px;
  }

  .np-info {
    padding: 24px 18px 28px;
  }

  .np-product-title {
    font-size: 1.3rem;
  }

  .np-price-block {
    padding: 14px 16px;
  }

  .np-price-current {
    font-size: 1.5rem;
  }

  .np-options {
    flex-direction: column;
    gap: 14px;
  }

  .np-option-group {
    min-width: 100%;
  }

  .np-actions {
    flex-direction: column;
  }

  .np-btn-cart {
    min-width: 100%;
  }

  .np-btn-wishlist {
    width: 100%;
    border-radius: 50px;
    height: 46px;
  }

  .np-tab-nav {
    gap: 0;
  }

  .np-tab-btn {
    padding: 12px 16px;
    font-size: 0.78rem;
  }

  .np-rel-thumb {
    height: 180px;
  }
}

@media (max-width: 576px) {
  .np-breadcrumb {
    padding: 14px 0 6px;
  }

  .np-breadcrumb ul li {
    font-size: 0.72rem;
  }

  .np-gallery {
    min-height: 260px;
    padding: 16px;
  }

  .np-qty-row {
    flex-wrap: wrap;
  }

  .np-alert {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}
