/* =============================================
   DSR Life Sciences - E-Commerce Styles
   ============================================= */

/* ----- Cart Icon Badge in Navbar ----- */
.cart-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 22px;
  color: #0e2b5c;
  margin-left: 15px;
  text-decoration: none;
  transition: color 0.3s ease;
}
.cart-nav-link:hover {
  color: #1d8f5c;
  text-decoration: none;
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}

/* ----- Search Bar in Header ----- */
.header-search-form {
  display: flex;
  align-items: center;
  margin-left: 15px;
}
.header-search-form .search-input {
  border: 1px solid #dde2e8;
  border-right: none;
  border-radius: 25px 0 0 25px;
  padding: 7px 15px;
  font-size: 14px;
  outline: none;
  width: 200px;
  transition: width 0.3s ease, border-color 0.3s ease;
  background: #f8f9fa;
}
.header-search-form .search-input:focus {
  width: 260px;
  border-color: #1d8f5c;
  background: #fff;
}
.header-search-form .search-btn {
  border: 1px solid #1d8f5c;
  background: #1d8f5c;
  color: #fff;
  border-radius: 0 25px 25px 0;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.header-search-form .search-btn:hover {
  background: #166e48;
}

/* ----- Add to Cart Button ----- */
.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1d8f5c, #27ae60);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(29, 143, 92, 0.3);
  margin-top: 15px;
}
.btn-add-cart:hover {
  background: linear-gradient(135deg, #166e48, #1d8f5c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 143, 92, 0.4);
  color: #fff;
}
.btn-add-cart i {
  font-size: 18px;
}
.btn-add-cart.added {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

/* Quantity selector on product details */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 15px;
  margin-right: 15px;
}
.qty-selector button {
  background: #f0f0f0;
  border: none;
  width: 38px;
  height: 38px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.qty-selector button:hover {
  background: #ddd;
}
.qty-selector input {
  width: 50px;
  text-align: center;
  border: none;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  -moz-appearance: textfield;
}
.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ----- Cart Page ----- */
.cart-section {
  padding: 60px 0;
}
.cart-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0e2b5c;
  margin-bottom: 30px;
}
.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}
.cart-table thead {
  background: linear-gradient(135deg, #0e2b5c, #1d8f5c);
  color: #fff;
}
.cart-table th {
  padding: 15px 20px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff !important;
}
.cart-table td {
  padding: 15px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}
.cart-table tbody tr:hover {
  background: #f8fafe;
}
.cart-product-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}
.cart-product-name {
  font-weight: 600;
  color: #0e2b5c;
  font-size: 15px;
}
.cart-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.cart-qty-control button {
  background: #f5f5f5;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.cart-qty-control button:hover {
  background: #e0e0e0;
}
.cart-qty-control input {
  width: 45px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  height: 32px;
  -moz-appearance: textfield;
}
.cart-qty-control input::-webkit-outer-spin-button,
.cart-qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.cart-remove-btn {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s, transform 0.2s;
}
.cart-remove-btn:hover {
  color: #c0392b;
  transform: scale(1.2);
}
.cart-summary {
  background: #f8fafe;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  margin-top: 30px;
}
.cart-summary h4 {
  font-size: 20px;
  font-weight: 700;
  color: #0e2b5c;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 15px;
}
.cart-summary-row.total {
  border-top: 2px solid #0e2b5c;
  margin-top: 10px;
  padding-top: 15px;
  font-size: 18px;
  font-weight: 700;
  color: #0e2b5c;
}
.btn-checkout {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #1d8f5c, #27ae60);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(29,143,92,0.3);
}
.btn-checkout:hover {
  background: linear-gradient(135deg, #166e48, #1d8f5c);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}
.cart-empty {
  text-align: center;
  padding: 60px 20px;
}
.cart-empty i {
  font-size: 60px;
  color: #ccc;
  margin-bottom: 20px;
}
.cart-empty h4 {
  color: #666;
  margin-bottom: 15px;
}
.btn-continue-shopping {
  display: inline-block;
  background: #0e2b5c;
  color: #fff;
  border-radius: 30px;
  padding: 12px 30px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s;
}
.btn-continue-shopping:hover {
  background: #1a3d7a;
  color: #fff;
  text-decoration: none;
}

/* ----- Checkout Page ----- */
.checkout-section {
  padding: 60px 0;
}
.checkout-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0e2b5c;
  margin-bottom: 30px;
}
.checkout-form-card {
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}
.checkout-form-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: #0e2b5c;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}
.checkout-form-card .form-group {
  margin-bottom: 18px;
}
.checkout-form-card label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
}
.checkout-form-card .form-control {
  border-radius: 8px;
  border: 1px solid #dde2e8;
  padding: 10px 15px;
  font-size: 14px;
  transition: border-color 0.3s;
}
.checkout-form-card .form-control:focus {
  border-color: #1d8f5c;
  box-shadow: 0 0 0 3px rgba(29,143,92,0.1);
}

/* Payment method cards */
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.payment-option {
  position: relative;
  cursor: pointer;
}
.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.payment-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: #fafafa;
}
.payment-option-label i {
  font-size: 22px;
  color: #666;
}
.payment-option-label span {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}
.payment-option input[type="radio"]:checked + .payment-option-label {
  border-color: #1d8f5c;
  background: #eafaf1;
}
.payment-option input[type="radio"]:checked + .payment-option-label i {
  color: #1d8f5c;
}

.checkout-order-summary {
  background: #f8fafe;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}
.checkout-order-summary h4 {
  font-size: 18px;
  font-weight: 700;
  color: #0e2b5c;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}
.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.checkout-item:last-of-type {
  border-bottom: none;
}
.checkout-item-name {
  font-weight: 600;
  color: #333;
  flex: 1;
}
.checkout-item-qty {
  color: #888;
  margin: 0 10px;
}
.checkout-item-price {
  font-weight: 600;
  color: #0e2b5c;
}
.btn-place-order {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #e67e22, #f39c12);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(230,126,34,0.3);
}
.btn-place-order:hover {
  background: linear-gradient(135deg, #d35400, #e67e22);
  transform: translateY(-2px);
}

/* ----- Order Confirmation ----- */
.confirmation-section {
  padding: 80px 0;
  text-align: center;
}
.confirmation-card {
  background: #fff;
  border-radius: 15px;
  padding: 50px 40px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.08);
  max-width: 600px;
  margin: 0 auto;
}
.confirmation-icon {
  width: 80px;
  height: 80px;
  background: #eafaf1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 40px;
  color: #27ae60;
}
.confirmation-card h2 {
  color: #27ae60;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}
.confirmation-card .order-id {
  font-size: 16px;
  color: #666;
  margin-bottom: 25px;
}
.confirmation-card .order-id strong {
  color: #0e2b5c;
  font-size: 18px;
}

/* ----- Reviews Section ----- */
.reviews-section {
  margin-top: 20px;
}
.review-item {
  background: #f8fafe;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 4px solid #1d8f5c;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.review-author {
  font-weight: 700;
  color: #0e2b5c;
  font-size: 15px;
}
.review-date {
  font-size: 12px;
  color: #999;
}
.review-stars {
  color: #f1c40f;
  font-size: 16px;
  margin-bottom: 8px;
}
.review-stars .empty {
  color: #ddd;
}
.review-comment {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}
.review-form-card {
  background: #fff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  margin-top: 25px;
}
.review-form-card h5 {
  font-size: 18px;
  font-weight: 700;
  color: #0e2b5c;
  margin-bottom: 20px;
}
.star-rating-input {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  direction: rtl;
  justify-content: flex-end;
}
.star-rating-input input[type="radio"] {
  display: none;
}
.star-rating-input label {
  font-size: 28px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
}
.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input[type="radio"]:checked ~ label {
  color: #f1c40f;
}

/* ----- Search Results ----- */
.search-results-section {
  padding: 60px 0;
  min-height: 400px;
}
.search-results-section h2 {
  font-size: 24px;
  color: #0e2b5c;
  margin-bottom: 5px;
}
.search-results-section .search-query-text {
  color: #888;
  margin-bottom: 30px;
  font-size: 15px;
}
.search-results-section .search-query-text strong {
  color: #1d8f5c;
}
.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.search-filter-bar select {
  border: 1px solid #dde2e8;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

/* ----- Floating WhatsApp Button ----- */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37,211,102,0.5);
  text-decoration: none;
}
.whatsapp-float i {
  color: #fff;
  font-size: 30px;
}
.whatsapp-float .whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #333;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
}

/* ----- Toast Notification ----- */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #27ae60;
  color: #fff;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 10000;
  display: none;
  animation: slideInRight 0.4s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ----- Mobile Responsiveness ----- */
@media (max-width: 991px) {
  .header-search-form {
    display: none;
  }
  .mobile-search-form {
    display: block;
    padding: 10px 15px;
    background: #f8f9fa;
  }
  .mobile-search-form .search-input {
    width: 100%;
    border-radius: 25px;
    border: 1px solid #dde2e8;
    padding: 10px 15px;
    font-size: 14px;
  }
  .payment-options {
    grid-template-columns: 1fr;
  }
}

/* ----- Mobile Cart Icon in Navbar ----- */
@media (max-width: 1199px) {
  .navbar .cart-nav-link.d-flex.d-xl-none {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    font-size: 20px;
    color: #0e2b5c;
    text-decoration: none;
    padding: 8px;
    margin-left: auto;
    margin-right: 8px;
  }
  .navbar .cart-nav-link.d-flex.d-xl-none:hover {
    color: #1d8f5c;
  }
  .cart-badge-mobile {
    position: absolute;
    top: 0;
    right: -2px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
  }
}

@media (max-width: 767px) {
  .cart-table thead {
    display: none;
  }
  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: 100%;
  }
  .cart-table tr {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .cart-table td {
    text-align: right;
    padding: 10px 15px;
    position: relative;
    padding-left: 45%;
    border-bottom: 1px solid #f5f5f5;
  }
  .cart-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 13px;
    color: #0e2b5c;
    text-transform: uppercase;
  }
  .cart-product-img {
    width: 50px;
    height: 50px;
  }

  /* Better touch targets on mobile */
  .btn-add-cart {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }
  .qty-selector button {
    width: 44px;
    height: 44px;
  }

  /* Product grid on mobile */
  .product-item {
    margin-bottom: 20px;
  }
  .product__img img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .checkout-form-card {
    padding: 20px 15px;
  }
  .cart-summary {
    padding: 20px 15px;
  }
  .confirmation-card {
    padding: 30px 20px;
  }
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
    width: 55px;
    height: 55px;
  }
}

/* ----- Lazy Loading Placeholder ----- */
img[loading="lazy"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
img[loading="lazy"].loaded {
  animation: none;
  background: none;
}

/* ---- Admin Order Status Badges ---- */
.badge-pending {
  background: #f39c12;
  color: #fff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}
.badge-confirmed {
  background: #3498db;
  color: #fff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}
.badge-shipped {
  background: #9b59b6;
  color: #fff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}
.badge-delivered {
  background: #27ae60;
  color: #fff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}
.badge-cancelled {
  background: #e74c3c;
  color: #fff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

/* ----- Product Details Tabs Customization ----- */
.detail-item {
  background: #f8fafe;
  padding: 20px;
  border-radius: 10px;
  height: 100%;
  border: 1px solid #e1e8f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.detail-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.detail-title {
  color: #0e2b5c;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
  border-bottom: 2px solid #1d8f5c;
  padding-bottom: 5px;
  width: fit-content;
}
.detail-desc {
  color: #4a5568;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}
.product-description-content {
  line-height: 1.8;
  color: #4a5568;
  font-size: 15px;
}
.mt-50 {
  margin-top: 50px;
}
.mb-30 {
  margin-bottom: 30px;
}
