/* NEW PRODUCT DETAIL CSS - Premium UI */
:root {
  --pink-50: #fdf2f8;
  --pink-100: #fce7f3;
  --pink-300: #f9a8d4;
  --pink-500: #ec4899;
  --pink-600: #db2777;
  --pink-700: #be185d;
  --emerald-50: #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --bg-page: #f5f5f5;
  --font-plus: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-page);
}

body .main-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 150px !important;
  left: 0 !important;
}

.detail-container {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 16px 12px 16px;
  font-family: var(--font-plus);
}

.detail-container .container-vinh {
  max-width: 1488px;
  margin: 0 auto;
  width: 100%;
}

/* Main Grid */
.p-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 0;
  max-width: 1488px;
  margin: 0 auto;
  width: 100%;
}

.p-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1488px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .p-grid {
    grid-template-columns: 1fr 340px;
  }
  .p-left {
    border-bottom: none;
    border-right: 1px solid var(--gray-100);
    padding-top: 24px;
  }
  .p-right {
    padding: 24px 16px 16px 16px;
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .p-grid {
    grid-template-columns: 1fr 420px;
  }
  .p-right {
    max-width: 440px;
    padding: 24px 20px 20px 20px;
  }
}

@media (min-width: 1280px) {
  .p-grid {
    grid-template-columns: 1fr 460px;
  }
  .p-right {
    max-width: 460px;
  }
}

.p-left {
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.p-right {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Images */
.p-main-img-box {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 12px auto 16px auto;
  aspect-ratio: 16/9;
  background: #fff;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  border-radius: 12px;
}

.p-main-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.p-discount-badge-top {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--pink-600);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.p-thumb-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.p-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.p-opt-thumb {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--gray-200);
  cursor: pointer;
  aspect-ratio: 16/9;
  transition: 0.2s;
  background: #000;
  padding: 0;
  outline: none;
  border-radius: 8px;
}

.p-opt-thumb:hover {
  border-color: var(--pink-300);
}

.p-opt-thumb.active {
  border-color: var(--pink-500);
}

.p-opt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #fff;
  opacity: 0.6;
  transition: 0.2s;
}

.p-opt-thumb:hover img {
  opacity: 0.85;
}

.p-opt-thumb.active img {
  opacity: 1;
}

.p-opt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
  background: rgba(0, 0, 0, 0.1);
}

.p-opt-thumb.active .p-opt-overlay {
  background: rgba(236, 72, 153, 0.2);
}

.p-opt-label {
  font-size: 8px;
  font-weight: 900;
  padding: 1px 4px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
}

.p-opt-thumb.active .p-opt-label {
  background: var(--pink-600);
}

.p-opt-check {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--pink-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
}

/* Trust Box */
.p-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.p-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 8px;
}

.p-trust-icon {
  color: var(--pink-600);
  font-size: 14px;
}

.p-trust-text h5 {
  font-size: 11px;
  font-weight: bold;
  color: var(--gray-800);
  margin: 0;
  line-height: 1;
}

.p-trust-text p {
  font-size: 10px;
  color: var(--gray-400);
  margin: 2px 0 0 0;
}

.p-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

/* Right Info */
.p-brand {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pink-600);
  margin-bottom: 2px;
}

.p-title-main {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin: 0;
}

.p-price-box {
  padding: 10px 12px;
  border-left: 4px solid var(--pink-600);
  background: #fff7fa;
}

.p-old-price {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 2px;
}

.p-old-price s {
  text-decoration: line-through;
}

.p-price-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.p-price-current {
  font-size: 36px;
  font-weight: 900;
  color: var(--pink-600);
  line-height: 1;
}

.p-price-pct {
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  background: var(--pink-600);
  padding: 2px 6px;
  margin-bottom: 4px;
}

.p-save-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald-600);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.p-total-calc {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

.p-opts-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.p-opts-title span {
  color: var(--gray-900);
  font-weight: 800;
}

.p-opts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: 0.2s;
  border-radius: 4px;
}

.p-opt-btn:hover {
  border-color: var(--pink-300);
}

.p-opt-btn.active {
  border-color: var(--pink-500);
  background: var(--pink-50);
  box-shadow: 0 0 0 1px var(--pink-500);
}

.p-opt-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.p-opt-btn.active .p-opt-radio {
  border-color: var(--pink-500);
}

.p-opt-radio-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
}

.p-opt-btn.active .p-opt-radio-inner {
  background: var(--pink-600);
}

.p-opt-name {
  flex: 1;
  font-size: 14px;
  font-weight: bold;
  color: var(--gray-700);
  line-height: 1.2;
}

.p-opt-btn.active .p-opt-name {
  color: var(--pink-700);
}

.p-opt-price {
  font-size: 14px;
  font-weight: 900;
  color: var(--gray-500);
}

.p-opt-btn.active .p-opt-price {
  color: var(--pink-600);
}

/* Features */
.p-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.p-feature-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 2px 8px;
}

.p-feature-tag i {
  color: var(--emerald-500);
  font-size: 10px;
}

/* Control row (Qty & Coupon) */
.p-control-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

@media (max-width: 400px) {
  .p-control-row {
    flex-direction: column;
    align-items: stretch;
  }
  .p-qty-box {
    width: 100%;
  }
  .p-qty-input {
    width: 100%;
    justify-content: space-between;
  }
  .p-qty-val {
    flex: 1;
  }
}

.p-qty-box {
  flex-shrink: 0;
}

.p-ctrl-title {
  font-size: 10px;
  font-weight: bold;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.p-qty-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--gray-200);
  height: 36px;
}

.p-qty-btn {
  width: 32px;
  height: 100%;
  font-size: 18px;
  color: var(--gray-400);
  background: transparent;
  border: none;
  font-weight: 300;
  cursor: pointer;
}

.p-qty-btn:hover {
  background: var(--gray-100);
}

.p-qty-val {
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--gray-800);
  border: none;
  padding: 0;
  outline: none;
  background: transparent;
}

.p-coupon-box {
  flex: 1;
  min-width: 0;
}

.p-coupon-input-group {
  display: flex;
  gap: 6px;
  height: 36px;
}

.p-coupon-input {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  font-size: 12px;
  border: 2px solid var(--gray-200);
  outline: none;
  transition: 0.2s;
}

.p-coupon-input:focus {
  border-color: var(--pink-600);
}

.p-coupon-btn {
  padding: 0 12px;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid var(--pink-600);
  color: var(--pink-600);
  background: transparent;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.p-coupon-btn:hover {
  background: var(--pink-600);
  color: #fff;
}

/* Buttons */
.p-cta-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.p-btn-buy {
  width: 100%;
  height: 44px;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  background: var(--pink-600);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(219, 39, 119, 0.3);
  transition: transform 0.1s;
}

.p-btn-buy:active {
  transform: scale(0.99);
}

.p-btn-cart {
  width: 100%;
  height: 40px;
  font-weight: bold;
  font-size: 13px;
  color: var(--pink-600);
  background: transparent;
  border: 2px solid var(--pink-600);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.1s;
}

.p-btn-cart:active {
  transform: scale(0.99);
}

.p-btn-cart.success {
  background: var(--emerald-600);
  color: #fff;
  border-color: var(--emerald-600);
}

/* Tabs & Bottom */
.p-tabs-wrap {
  background: #fff;
  border: 1px solid var(--gray-200);
  margin-top: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 0;
  max-width: 1488px;
  margin: 12px auto 0 auto;
  width: 100%;
}

.p-tabs-header {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.p-tab-btn {
  flex: 1;
  text-align: center;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 800;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  color: var(--gray-500);
  transition: 0.2s;
}

.p-tab-btn.active {
  border-bottom-color: var(--pink-500);
  color: var(--pink-600);
}

.p-tab-content {
  padding: 16px;
  max-width: 1150px;
  margin: 0 auto;
  width: 100%;
}

.p-desc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .p-desc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.p-desc-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 10px 12px;
  font-family: monospace;
  font-size: 12px;
  color: var(--gray-700);
  margin-bottom: 12px;
  word-break: break-all;
}

.p-desc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-desc-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-600);
}

.p-desc-list li i {
  color: var(--emerald-500);
  margin-top: 2px;
}

.p-policy-box {
  border-left: 4px solid var(--pink-600);
  padding: 12px 16px;
  background: #fff7fa;
}

/* Reviews */
.p-rv-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 16px;
}

.p-rv-avg {
  text-align: center;
  flex-shrink: 0;
}

.p-rv-avg h2 {
  font-size: 48px;
  font-weight: 900;
  color: var(--gray-900);
  margin: 0;
  line-height: 1;
}

.p-rv-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.p-rv-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.p-rv-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  overflow: hidden;
}

.p-rv-bar-fill {
  height: 100%;
  background: var(--pink-600);
}

.p-rv-item {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 16px;
}

.p-rv-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.p-rv-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.p-rv-ava {
  width: 32px;
  height: 32px;
  background: var(--pink-600);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p-rv-name {
  font-size: 12px;
  font-weight: bold;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.p-rv-tick {
  font-size: 10px;
  color: var(--emerald-600);
  background: var(--emerald-50);
  padding: 1px 6px;
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
}

.p-rv-text {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-left: 40px;
  margin-top: 4px;
}

/* Related */
.p-related-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.p-related-title span:first-child {
  width: 4px;
  height: 16px;
  background: var(--pink-600);
}

.p-related-title span:last-child {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-800);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.p-related-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .p-related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .p-related-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 16px;
  }
}

.p-rel-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-200);
  text-decoration: none;
  transition: 0.3s;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.p-rel-card:hover {
  border-color: var(--pink-600);
  box-shadow: 0 6px 20px rgba(219, 39, 119, 0.12);
  transform: translateY(-2px);
}

.p-rel-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f8fafc;
}

.p-rel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}

.p-rel-card:hover .p-rel-img img {
  transform: scale(1.05);
}

.p-rel-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p-rel-name {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-rel-sub {
  font-size: 11px;
  color: var(--gray-400);
}

.p-rel-price {
  font-size: 16px;
  font-weight: 900;
  color: #db2777;
  margin-top: 4px;
}

/* Mobile Sticky */
.p-mobile-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  padding: 8px 12px;
  z-index: 40;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
  align-items: center;
  gap: 8px;
}

@media (max-width: 767px) {
  .p-mobile-sticky {
    display: flex;
  }

  body {
    padding-bottom: 60px;
  }
}

.p-mob-info {
  flex: 1;
  min-width: 0;
}

.p-mob-name {
  font-size: 10px;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-mob-price {
  font-size: 15px;
  font-weight: 900;
  color: var(--pink-600);
  line-height: 1.2;
}

.p-mob-btn-cart {
  height: 36px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: bold;
  border: 2px solid var(--pink-600);
  color: var(--pink-600);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 4px;
}

.p-mob-btn-buy {
  height: 36px;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  background: var(--pink-600);
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* IS PROXY LAYOUT (Dynamic JS toggle) */
.p-control-row.is-proxy-layout {
    flex-wrap: wrap;
}
.p-control-row.is-proxy-layout .p-coupon-box {
    flex: 0 0 100%;
    max-width: 100%;
    margin-top: 5px;
}
.p-control-row.is-proxy-layout .p-days-box,
.p-control-row.is-proxy-layout .p-qty-box {
    flex: 1 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
}
.p-control-row.is-proxy-layout .p-qty-input {
    width: 100%;
    display: flex;
}
.p-control-row.is-proxy-layout .p-qty-val {
    flex-grow: 1;
    width: 100%;
}
.p-control-row.is-proxy-layout .p-coupon-input-group {
    display: flex;
}
.p-control-row.is-proxy-layout .p-coupon-input {
    flex-grow: 1;
}