* {
  box-sizing: border-box;
}

.product-detail-container {
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

.category-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  margin-top: -15px;
  font-size: 14px;
  color: #666;
}

.category-breadcrumb a {
  color: #1e3a8a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.category-breadcrumb a i {
  font-size: 14px;
  line-height: 1;
  position: relative;
  top: -1.5px;
}

.category-breadcrumb a:hover {
  color: #3b82f6;
}

.category-breadcrumb span:last-child {
  color: #666;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  width: 100%;
  max-width: 100%;
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.main-image-container {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: #f8f8f8;
  border-radius: 12px;
  overflow: hidden;
}

.main-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.out-of-stock-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(239, 68, 68, 0.95);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 18px;
  z-index: 10;
}

.thumbnail-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.scroll-btn {
  background: #1e3a8a;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.scroll-btn.visible {
  display: flex;
}

.scroll-btn:hover {
  background: #3b82f6;
}

.scroll-btn i {
  font-size: 20px;
}

.thumbnail-scroll-wrapper {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.thumbnail-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.thumbnail-grid {
  display: inline-flex;
  gap: 10px;
  padding: 2px;
  min-width: min-content;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

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

.thumbnail:hover {
  border-color: #3b82f6;
}

.thumbnail.active {
  border-color: #1e3a8a;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.product-title {
  font-size: 28px;
  color: #1e3a8a;
  font-weight: 700;
  line-height: 1.3;
}

.product-price-section {
  padding: 15px 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.current-price {
  font-size: 32px;
  font-weight: 700;
  color: #22c55e;
}

.original-price {
  font-size: 20px;
  color: #999;
  text-decoration: line-through;
}

.discount-badge {
  background: #fbbf24;
  color: #1e3a8a;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.stock-info {
  font-size: 16px;
  padding: 10px 0;
}

.in-stock {
  color: #22c55e;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.in-stock i {
  font-size: 20px;
}

.out-of-stock {
  color: #ef4444;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.out-of-stock i {
  font-size: 20px;
}

.product-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 10px;
  padding: 20px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.feature-item i {
  font-size: 24px;
  color: #1e3a8a;
  flex-shrink: 0;
}

.feature-text {
  font-size: 12px;
  line-height: 1.3;
  color: #333;
}

.feature-text strong {
  color: #1e3a8a;
  font-weight: 600;
}

.feature-text span {
  color: #666;
  font-size: 11px;
}

.product-tabs {
  margin-top: 30px;
  width: 100%;
  margin-bottom: 0;
  height: fit-content;
}

@media (min-width: 768px) {
  .product-tabs {
    width: 80%;
    margin-left: 0;
    margin-right: auto;
  }
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: #1e3a8a;
  border-bottom-color: #1e3a8a;
}

.tab-btn:hover {
  color: #1e3a8a;
}

.tab-content {
  min-height: auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.description-content {
  color: #666;
  line-height: 1.6;
  font-size: 15px;
  height: auto;
}

.description-content ul,
.description-content ol {
  margin: 10px 0;
  padding-left: 25px;
}

.description-content ul li,
.description-content ol li {
  margin: 5px 0;
}

.description-content p {
  margin: 10px 0;
}

.product-reviews-section {
  padding: 20px 0;
}

.rating-distribution {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.rating-overview {
  flex: 1;
  min-width: 200px;
}

.average-rating {
  font-size: 48px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.distribution-stars {
  margin-bottom: 10px;
}

.rating-bars {
  flex: 2;
  min-width: 250px;
}

.rating-bar {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.rating-bar span:first-child {
  width: 20px;
  font-size: 14px;
  color: #666;
}

.rating-bar i {
  color: #fbbf24;
  margin: 0 5px;
}

.bar-container {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  margin: 0 10px;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: #fbbf24;
  border-radius: 4px;
}

.rating-bar span:last-child {
  width: 30px;
  font-size: 14px;
  color: #666;
  text-align: right;
}

.reviews-list {
  margin-top: 30px;
}

.review-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.review-stars {
  display: flex;
}

.review-date {
  color: #666;
  font-size: 14px;
}

.review-comment {
  color: #333;
  line-height: 1.5;
  margin-top: 10px;
}

.view-all-reviews {
  text-align: center;
  margin-top: 20px;
}

.view-all-reviews a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.no-reviews {
  text-align: center;
  color: #666;
  padding: 40px 20px;
  font-size: 16px;
}

.share-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 0 0;
  border-top: 1px solid #ccc;
}

.share-label {
  font-size: 16px;
  font-weight: 600;
  color: #1e3a8a;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
}

.share-btn i {
  font-size: 20px;
}

.share-btn.whatsapp {
  background: #25d366;
}

.share-btn.whatsapp:hover {
  background: #1da851;
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.facebook:hover {
  background: #0c63d4;
}

.share-btn.twitter {
  background: #000000;
}

.share-btn.twitter:hover {
  background: #333333;
}

.share-btn.copy {
  background: #6b7280;
}

.share-btn.copy:hover {
  background: #4b5563;
}

.cart-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.cart-action-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.add-buy-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid #1e3a8a;
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  background: #1e3a8a;
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.qty-btn:hover {
  background: #3b82f6;
}

#quantityInput {
  width: 70px;
  height: 45px;
  text-align: center;
  border: none;
  font-size: 18px;
  font-weight: 600;
  color: #1e3a8a;
}

.btn-add-cart,
.btn-remove,
.btn-login,
.btn-buy-now,
.btn-disabled {
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.btn-add-cart {
  background: #1e3a8a;
  color: white;
}

.btn-add-cart:hover {
  background: #3b82f6;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-add-cart i {
  font-size: 20px;
}

.btn-buy-now {
  padding: 11px 30px;
  background: #22c55e;
  color: white;
}

.btn-buy-now:hover {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-buy-now i {
  font-size: 20px;
}

.btn-remove {
  background: #ef4444;
  color: white;
}

.btn-remove:hover {
  background: #dc2626;
}

.btn-remove i {
  font-size: 18px;
}

.btn-login {
  background: #22c55e;
  color: white;
  text-decoration: none;
  padding: 13px 30px;
}

.btn-login:hover {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-login i {
  font-size: 20px;
}

.btn-disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

.notifications {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  max-width: 440px;
  width: calc(100% - 40px);
}

.notification {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #ef4444;
}

.notification.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #22c55e;
}

.notification.info {
  background: #eff6ff;
  color: #1a365d;
  border: 1px solid #3b82f6;
}

@media (max-width: 768px) {
  .notifications {
    top: 10px;
    max-width: calc(100% - 20px);
    width: calc(100% - 20px);
  }

  .product-detail-container {
    padding: 10px 8px;
  }

  .category-breadcrumb {
    display: none;
  }

  .btn-login {
    width: 100%;
  }

  .main-image-container {
    border-radius: 8px;
  }

  .cart-action-row {
    flex-direction: row;
    align-items: center;
  }

  .btn-remove {
    padding: 15px 20px;
    flex: 1;
  }

  .add-buy-row {
    flex-direction: column;
    width: 100%;
  }

  .btn-add-cart,
  .btn-buy-now {
    width: 100%;
  }

  .btn-buy-now {
    padding: 16px 30px;
  }

  .thumbnail-container {
    gap: 5px;
  }

  .scroll-btn {
    width: 28px;
    height: 28px;
  }

  .scroll-btn i {
    font-size: 18px;
  }

  .thumbnail {
    width: 70px;
    height: 70px;
  }

  .tab-btn {
    padding: 10px 16px;
    text-align: left;
  }

  .rating-distribution {
    flex-direction: column;
    gap: 20px;
  }

  .rating-overview,
  .rating-bars {
    min-width: unset;
  }

  .product-features {
    gap: 10px;
  }

  .feature-item {
    padding: 10px;
  }

  .feature-item i {
    font-size: 20px;
  }

  .feature-text {
    font-size: 11px;
  }

  .feature-text strong {
    font-size: 12px;
  }

  .feature-text span {
    font-size: 10px;
  }
}

@media (min-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .main-image-container {
    padding-top: 60%;
  }

  .cart-action-row {
    flex-direction: row;
    align-items: center;
  }

  .btn-remove {
    flex: 1;
  }

  .add-buy-row {
    flex-direction: row;
  }

  .btn-add-cart,
  .btn-buy-now {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .main-image-container {
    padding-top: 75%;
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
  overflow-y: auto;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 20px 0;
}

.modal-content input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.modal-content input:focus {
  outline: none;
  border-color: #1e3a8a;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-content button {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#save-delivery {
  background: #22c55e;
  color: white;
}

#save-delivery:hover {
  background: #16a34a;
}

#close-modal {
  background: #e5e7eb;
  color: #374151;
}

#close-modal:hover {
  background: #d1d5db;
}

/* Confirmation Modal Styles */
.confirmation-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.confirmation-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 20px 0;
}

.delivery-info {
  background: #f3f4f6;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.delivery-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.delivery-info-row:last-child {
  margin-bottom: 0;
}

.delivery-label {
  font-weight: 600;
  color: #4b5563;
  font-size: 14px;
}

.delivery-value {
  color: #1f2937;
  font-size: 15px;
  font-weight: 500;
}

.edit-delivery-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 20px;
}

.edit-delivery-btn:hover {
  background: #2563eb;
}

.edit-delivery-btn i {
  font-size: 16px;
}

.confirm-buttons {
  display: flex;
  gap: 10px;
}

.confirm-buttons button {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#proceed-order {
  background: #22c55e;
  color: white;
}

#proceed-order:hover {
  background: #16a34a;
}

#cancel-order {
  background: #e5e7eb;
  color: #374151;
}

#cancel-order:hover {
  background: #d1d5db;
}

@media (max-width: 768px) {

  .modal-content,
  .confirmation-content {
    padding: 25px;
  }

  .modal-content h3,
  .confirmation-content h3 {
    font-size: 20px;
  }
}