/* ============================================================
   PAPA PV — Shop Pages (Product, Category, Cart, Checkout, Confirmation)
   ============================================================ */

/* Product Detail */
.product-detail {
  padding: var(--sp-12) 0;
}

.product-breadcrumb {
  margin-bottom: var(--sp-6);
  font-size: var(--text-small);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.product-breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.product-breadcrumb a:hover {
  text-decoration: underline;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.product-main-image {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-main-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.product-thumbnails {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.product-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--t-fast);
}

.product-thumbnail:hover {
  border-color: var(--color-primary);
}

.product-info {
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: var(--text-h2);
  margin-bottom: var(--sp-2);
  color: var(--color-text);
}

.product-pricing {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.product-price {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

.product-old-price {
  text-decoration: line-through;
  color: var(--gray-400);
  font-size: 1.25rem;
}

.product-badge {
  background: var(--color-danger);
  color: white;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  font-weight: var(--fw-semibold);
}

.product-description {
  color: var(--gray-600);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-6);
}

.product-specs {
  background: var(--gray-50);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-6);
}

.product-specs h4 {
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}

.product-specs ul {
  font-size: var(--text-small);
  color: var(--gray-600);
  list-style: none;
  padding: 0;
}

.product-specs li {
  margin-bottom: var(--sp-1);
}

.quantity-control {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  margin-bottom: var(--sp-6);
}

.quantity-control button {
  width: 40px;
  padding: var(--sp-2);
  min-width: 40px;
}

.quantity-control input {
  width: 60px;
  text-align: center;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.product-info-footer {
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--gray-200);
}

.product-info-item {
  font-size: var(--text-small);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.product-info-item:last-child {
  margin-bottom: 0;
}

.product-info-icon {
  color: var(--color-primary);
}

/* Recommended Products */
.recommended-section {
  margin-top: var(--sp-16);
  padding-top: var(--sp-12);
  border-top: 1px solid var(--gray-200);
}

.recommended-title {
  font-size: var(--text-h2);
  text-align: center;
  margin-bottom: var(--sp-8);
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-6);
}

/* Cart Page */
.cart-container {
  padding: var(--sp-12) 0;
}

.cart-title {
  font-size: var(--text-h1);
  margin-bottom: var(--sp-8);
}

.cart-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-8);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.cart-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  display: grid;
  grid-template-columns: 100px 1fr 150px;
  gap: var(--sp-4);
  align-items: center;
}

.cart-item-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--gray-100);
}

.cart-item-details h3 {
  font-size: var(--text-body);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-1);
}

.cart-item-details p {
  font-size: var(--text-small);
  color: var(--gray-600);
}

.cart-item-price {
  text-align: right;
}

.cart-item-price .price {
  font-size: var(--text-h4);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

.cart-item-price .remove {
  display: block;
  color: var(--color-danger);
  font-size: var(--text-small);
  cursor: pointer;
  margin-top: var(--sp-2);
}

.cart-item-price .remove:hover {
  text-decoration: underline;
}

.cart-empty {
  text-align: center;
  padding: var(--sp-16) var(--sp-8);
}

.cart-empty-icon {
  font-size: 4rem;
  color: var(--gray-300);
  margin-bottom: var(--sp-4);
}

.cart-empty h3 {
  color: var(--gray-600);
  margin-bottom: var(--sp-2);
}

.cart-empty p {
  color: var(--gray-500);
  margin-bottom: var(--sp-6);
}

.cart-summary {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  height: fit-content;
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-4));
}

.cart-summary-title {
  font-size: var(--text-h4);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
}

.cart-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  font-size: var(--text-small);
}

.cart-summary-total {
  border-top: 1px solid var(--gray-200);
  padding-top: var(--sp-4);
  margin-top: var(--sp-4);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-h4);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-bottom: var(--sp-6);
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* Checkout Page */
.checkout-container {
  padding: var(--sp-12) 0;
}

.checkout-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-8);
}

.checkout-form-section {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  border: 1px solid var(--gray-200);
}

.checkout-form-title {
  font-size: var(--text-h3);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
}

.checkout-form-section + .checkout-form-section {
  margin-top: var(--sp-6);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-label {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.form-input {
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: var(--text-body);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.checkout-summary {
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-4));
  height: fit-content;
}

/* Confirmation Page */
.confirmation-container {
  padding: var(--sp-12) 0;
}

.confirmation-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.confirmation-icon {
  font-size: 4rem;
  color: var(--color-success);
  margin-bottom: var(--sp-4);
}

.confirmation-title {
  font-size: var(--text-h1);
  margin-bottom: var(--sp-2);
  color: var(--color-success);
}

.confirmation-message {
  font-size: var(--text-h4);
  color: var(--gray-600);
  margin-bottom: var(--sp-8);
  line-height: var(--lh-relaxed);
}

.confirmation-order {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  margin-bottom: var(--sp-8);
  text-align: left;
}

.confirmation-order-item {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--gray-200);
}

.confirmation-order-item:last-child {
  border-bottom: none;
}

.confirmation-order-item label {
  font-weight: var(--fw-semibold);
  color: var(--gray-600);
}

.confirmation-order-item span {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* Responsive */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .checkout-content,
  .cart-content {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
  }

  .cart-item-price {
    grid-column: 2;
    text-align: left;
  }

  .cart-summary {
    position: static;
  }

  .checkout-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .product-detail {
    padding: var(--sp-8) 0;
  }

  .cart-container {
    padding: var(--sp-8) 0;
  }

  .checkout-container {
    padding: var(--sp-8) 0;
  }

  .confirmation-container {
    padding: var(--sp-8) 0;
  }

  .product-main-image img {
    height: 300px;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: var(--sp-2);
    padding: var(--sp-3);
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .product-grid {
    gap: var(--sp-4);
  }

  .recommended-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--sp-4);
  }
}
