/* Breadcrumb */
.pd-breadcrumb {
  padding-top: calc(var(--header-height) + 16px);
  background-color: #f5f5f5;
  padding-bottom: 4px;
}

.pd-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
  margin: 0;
  align-items: center;
}

.pd-breadcrumb__item {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
}

.pd-breadcrumb__link {
  text-decoration: none;
  color: #999;
  display: block;
  padding: 8px 0;
}

.pd-breadcrumb__item--active .pd-breadcrumb__link {
  color: var(--primary-color);
}

.pd-breadcrumb__icon {
  font-size: 1rem;
  color: #999;
  margin: 0 8px;
}

/* Product Detail Main */
.pd-main {
  background-color: #f5f5f5;
  padding-bottom: 40px;
}

.pd-content {
  display: grid;
  grid-template-columns: 1fr 1.1fr 300px;
  gap: 16px;
  background-color: var(--white-color);
  border-radius: 2px;
  padding: 16px;
  margin-top: 12px;
}

/* Product Images */
.pd-image-main {
  width: 100%;
  border: 1px solid #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.pd-image-main__img {
  width: 100%;
  display: block;
}

.pd-image-thumbs {
  display: flex;
  gap: 8px;
}

.pd-image-thumb {
  width: calc(20% - 6.4px);
  border: 1px solid #f0f0f0;
  border-radius: 2px;
  cursor: pointer;
  padding: 2px;
  transition: border-color 0.2s;
}

.pd-image-thumb:hover {
  border-color: var(--primary-color);
}

.pd-image-thumb--active {
  border-color: var(--primary-color);
}

.pd-image-thumb img {
  width: 100%;
  display: block;
}

/* Product Info */
.pd-info__name {
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 0 0 12px;
  line-height: 2.6rem;
}

.pd-info__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.pd-info__stars {
  display: flex;
  gap: 2px;
}

.pd-info__star--gold {
  color: var(--star-gold-color);
}

.pd-info__rating-text {
  font-weight: 500;
  color: var(--primary-color);
}

.pd-info__divider {
  color: #ccc;
}

.pd-info__sold {
  color: #666;
}

/* Price */
.pd-info__price {
  background-color: #fafafa;
  padding: 16px;
  border-radius: 2px;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.pd-info__price-old {
  font-size: 1.6rem;
  color: #999;
  text-decoration: line-through;
}

.pd-info__price-current {
  font-size: 3rem;
  font-weight: 500;
  color: var(--primary-color);
}

.pd-info__price-discount {
  font-size: 1.2rem;
  color: var(--white-color);
  background-color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 500;
}

/* Shipping */
.pd-info__shipping {
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.pd-info__shipping-row {
  display: flex;
  margin-bottom: 8px;
}

.pd-info__label {
  width: 110px;
  color: #888;
  flex-shrink: 0;
  font-size: 1.4rem;
}

.pd-info__shipping-free {
  color: var(--primary-color);
  font-weight: 500;
}

.pd-info__shipping-detail {
  color: #333;
  font-size: 1.3rem;
}

.pd-info__shipping-detail i {
  color: #00bfa5;
  margin-right: 4px;
}

/* Variants */
.pd-info__variants {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
}

.pd-info__variant-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pd-info__variant-btn {
  min-width: 60px;
  padding: 6px 16px;
  border: 1px solid #ddd;
  background-color: var(--white-color);
  border-radius: 2px;
  font-size: 1.3rem;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
}

.pd-info__variant-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pd-info__variant-btn--active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: rgba(208, 1, 27, 0.03);
}

/* Quantity */
.pd-info__quantity {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.pd-info__qty-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 2px;
}

.pd-info__qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background-color: var(--white-color);
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.pd-info__qty-btn:hover {
  background-color: #f5f5f5;
}

.pd-info__qty-input {
  width: 50px;
  height: 32px;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  text-align: center;
  font-size: 1.4rem;
  outline: none;
  -moz-appearance: textfield;
}

.pd-info__qty-input::-webkit-outer-spin-button,
.pd-info__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pd-info__stock {
  font-size: 1.3rem;
  color: #888;
  margin-left: 16px;
}

/* Actions */
.pd-info__actions {
  display: flex;
  gap: 12px;
}

.pd-info__cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--primary-color);
  background-color: rgba(208, 1, 27, 0.04);
  color: var(--primary-color);
  border-radius: 2px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pd-info__cart-btn:hover {
  background-color: rgba(208, 1, 27, 0.08);
}

.pd-info__buy-btn {
  padding: 10px 24px;
  border: none;
  background-color: var(--primary-color);
  color: var(--white-color);
  border-radius: 2px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pd-info__buy-btn:hover {
  opacity: 0.9;
}

/* Shop Info Sidebar */
.pd-shop {
  border: 1px solid #f0f0f0;
  border-radius: 2px;
  padding: 16px;
  align-self: start;
}

.pd-shop__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pd-shop__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.pd-shop__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-shop__name {
  font-size: 1.5rem;
  margin: 0 0 4px;
  color: var(--text-color);
}

.pd-shop__link {
  font-size: 1.2rem;
  color: var(--primary-color);
  text-decoration: none;
}

.pd-shop__stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.pd-shop__stat {
  text-align: center;
}

.pd-shop__stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--primary-color);
}

.pd-shop__stat-label {
  display: block;
  font-size: 1.1rem;
  color: #888;
  margin-top: 2px;
}

.pd-shop__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 500;
}

.pd-shop__badge-icon {
  font-size: 1.4rem;
}

/* Sections (Description, Reviews) */
.pd-section {
  background-color: var(--white-color);
  border-radius: 2px;
  padding: 24px;
  margin-top: 16px;
}

.pd-section__heading {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

/* Description */
.pd-desc__attr table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.pd-desc__attr td {
  padding: 8px 16px;
  font-size: 1.4rem;
  border: 1px solid #f0f0f0;
}

.pd-desc__attr td:first-child {
  width: 200px;
  color: #888;
  background-color: #fafafa;
}

.pd-desc__text {
  font-size: 1.4rem;
  line-height: 2.2rem;
  color: var(--text-color);
  margin: 0;
}

/* Reviews */
.pd-reviews__summary {
  display: flex;
  gap: 32px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.pd-reviews__overall {
  text-align: center;
  min-width: 140px;
}

.pd-reviews__score {
  font-size: 3rem;
  font-weight: 500;
  color: var(--primary-color);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}

.pd-reviews__stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.pd-reviews__total {
  font-size: 1.3rem;
  color: #888;
  display: block;
}

.pd-reviews__photos-count {
  font-size: 1.2rem;
  color: #aaa;
  display: block;
  margin-top: 2px;
}

.pd-reviews__bars {
  flex: 1;
}

.pd-reviews__bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 1.3rem;
}

.pd-reviews__bar-label {
  min-width: 12px;
  text-align: right;
  color: #888;
}

.pd-reviews__bar-row i {
  font-size: 1rem;
}

.pd-reviews__bar-track {
  flex: 1;
  height: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.pd-reviews__bar-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
}

.pd-reviews__bar-count {
  min-width: 24px;
  color: #888;
}

/* Photo Strip */
.pd-reviews__photos {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.pd-reviews__photos-heading {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 10px;
}

.pd-reviews__photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  grid-auto-flow: column;
  grid-auto-columns: 100px;
}

.pd-reviews__photos-item {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.pd-reviews__photos-item:hover {
  transform: scale(1.05);
}

.pd-reviews__photos-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-reviews__photos-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  color: var(--star-gold-color);
  font-size: 1rem;
  text-align: center;
  padding: 2px 0;
  line-height: 1.4;
}

.pd-reviews__photos-overlay i {
  font-size: 0.8rem;
}

/* Filter Tabs */
.pd-reviews__filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pd-reviews__filter-item {
  padding: 6px 14px;
  font-size: 1.3rem;
  color: #555;
  background: #f5f5f5;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.pd-reviews__filter-item:hover {
  background: #eee;
}

.pd-reviews__filter-item--active {
  background: var(--primary-color);
  color: #fff;
}

.pd-reviews__filter-item--active:hover {
  background: #b80118;
}

/* Review Items */
.pd-reviews__item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.pd-reviews__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pd-reviews__item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.pd-reviews__item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-reviews__item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.pd-reviews__item-name {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 0;
}

.pd-reviews__item-badge {
  font-size: 1.1rem;
  color: #05a;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pd-reviews__item-badge i {
  font-size: 1.2rem;
}

.pd-reviews__item-stars {
  display: flex;
  gap: 2px;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.pd-reviews__item-variation {
  font-size: 1.2rem;
  color: #888;
  margin-bottom: 6px;
  background: #f5f5f5;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
}

.pd-reviews__item-text {
  font-size: 1.4rem;
  color: var(--text-color);
  line-height: 2rem;
  margin: 0 0 8px;
}

.pd-reviews__item-images {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.pd-reviews__item-image {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #eee;
}

.pd-reviews__item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-reviews__item-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pd-reviews__item-date {
  font-size: 1.2rem;
  color: #999;
}

.pd-reviews__item-helpful {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.2rem;
  color: #888;
  background: none;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 3px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.pd-reviews__item-helpful:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pd-reviews__item-helpful--active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #fff0f0;
}

.pd-reviews__item-helpful-count {
  font-size: 1.1rem;
}

.pd-reviews__item-reply {
  margin-top: 10px;
  background: #fafafa;
  border-radius: 6px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary-color);
}

.pd-reviews__item-reply-header {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pd-reviews__item-reply-text {
  font-size: 1.3rem;
  color: #555;
  line-height: 1.8rem;
  margin: 0;
}

/* Related Products */
.pd-related .home-product-item {
  display: block;
  text-decoration: none;
}

/* Responsive - Mobile & Tablet */
@media (max-width: 1023px) {
  .pd-content {
    grid-template-columns: 1fr;
  }

  .pd-shop {
    display: none;
  }
}

@media (min-width: 740px) and (max-width: 1023px) {
  .pd-breadcrumb {
    padding-top: calc(var(--header-height) + var(--header-sort-bar-height) + 12px);
  }

  .pd-images {
    display: flex;
    gap: 16px;
  }

  .pd-image-main {
    flex: 1;
  }

  .pd-image-thumbs {
    flex-direction: column;
    order: -1;
  }

  .pd-image-thumb {
    width: 60px;
  }
}

@media (max-width: 739px) {
  .pd-breadcrumb {
    padding-top: calc(var(--header-height) + var(--header-sort-bar-height) + 12px);
    padding-left: 12px;
    padding-right: 12px;
  }

  .pd-breadcrumb__item {
    font-size: 1.2rem;
  }

  .pd-breadcrumb__icon {
    margin: 0 4px;
  }

  .pd-info__name {
    font-size: 1.6rem;
    line-height: 2.2rem;
  }

  .pd-info__price-current {
    font-size: 2.4rem;
  }

  .pd-info__actions {
    flex-direction: column;
  }

  .pd-info__cart-btn,
  .pd-info__buy-btn {
    width: 100%;
    justify-content: center;
  }

  .pd-reviews__summary {
    flex-direction: column;
    gap: 16px;
  }

  .pd-reviews__overall {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: auto;
  }

  .pd-section {
    padding: 16px;
  }

  .pd-desc__attr td:first-child {
    width: 120px;
  }
}

/* BONUS 100% Popup Styles */
.promo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
}

.promo-popup.active {
    display: flex;
    opacity: 1;
}

.promo-popup__container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 4px solid #ee4d2d;
}

.promo-popup.active .promo-popup__container {
    transform: scale(1);
}

.promo-popup__close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f1f1;
}

.promo-popup__close:hover {
    color: #333;
    background: #e1e1e1;
}

.promo-popup__title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ee4d2d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promo-popup__subtitle {
    font-size: 1.6rem;
    color: #555;
    margin-bottom: 20px;
    font-weight: 500;
}

.promo-popup__image-wrap {
    width: 100%;
    height: 100%;
    margin-bottom: 25px;
    background: #fff;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.promo-popup__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.promo-popup__container:hover .promo-popup__image {
    transform: scale(1.05);
}

.promo-popup__countdown {
    font-size: 1.4rem;
    color: #888;
    margin-bottom: 15px;
    font-weight: 400;
}

.promo-popup__timer {
    color: #ee4d2d;
    font-weight: 700;
    font-size: 1.6rem;
}

.promo-popup__btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #ee4d2d 0%, #ff7337 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(238, 77, 45, 0.4);
    border: none;
    cursor: pointer;
    animation: shake 1.5s ease-in-out infinite;
    transform-origin: center;
}

.promo-popup__btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(238, 77, 45, 0.5);
    filter: brightness(1.1);
    animation: none;
}

.promo-popup__btn:active {
    transform: translateY(-1px);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.promo-popup__badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffc107;
    color: #000;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
    100% { transform: translateX(-50%) scale(1); }
}
