/* CSS Variables */
:root {
  --primary-color: #005a9e;
  --text-color: #333;
  --text-color-light: #666;
  --background-color: #f8f9fa;
  --surface-color: #fff;
  --border-color: #e0e0e0;
}

/* General Body Styles */
body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header - Professional E-commerce Style */
.header {
  background-color: #0f0404;
  padding: 15px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 80px;
  width: 100%;
}

/* Header inner container */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  flex-wrap: wrap;
  box-sizing: border-box;
}

/* Logo Container */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

/* Logo Image */
.logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Text Container */
.logo-detail-container {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

/* Main Title */
.logo-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

/* Subtitle */
.logo-title:last-child {
  font-size: 0.85rem;
  font-weight: 400;
  color: #ffffff;
  opacity: 0.9;
}

/* Search Bar Container */
.search-container {
  flex: 1;
  min-width: 150px;
  max-width: 600px;
  margin: 0 20px;
  box-sizing: border-box;
}

/* Search Bar */
.search-bar {
  position: relative;
  width: 100%;
}

.search-bar input {
  width: 100%;
  padding: 12px 20px 12px 45px;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  font-size: 0.95em;
  background-color: #f8f8f8;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-bar input:focus {
  background-color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 90, 158, 0.1);
  outline: none;
}

.search-bar:before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-color: #999;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
  mask-repeat: no-repeat;
  mask-position: center;
  pointer-events: none;
}

/* Search results dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 999;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  padding: 10px 0;
}

.search-results-dropdown.show {
  display: block;
}

.search-results-dropdown div {
  padding: 8px 20px;
  cursor: pointer;
  color: var(--text-color);
  transition: background-color 0.2s;
}

.search-results-dropdown div:hover,
.search-result-item:hover {
  background-color: #f0f0f0;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-result-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-result-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation Icons */
.nav-icons {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  /* Also add box-sizing here */
  box-sizing: border-box;
}

.nav-icons a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85em;
  transition: color 0.2s;
  position: relative;
}

.nav-icons a:hover {
  color: var(--primary-color);
}

.nav-icons svg {
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  fill: currentColor;
}

#cart-icon {
  position: relative;
}

#cart-icon .cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #e53935;
  color: white;
  border-radius: 50%;
  padding: 0;
  font-size: 0.7em;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  display: none;
  text-align: center;
  line-height: 18px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 15px;
    justify-content: center;
  }

  .logo {
    order: 1;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
    justify-content: center;
  }

  .search-container {
    order: 2;
    width: calc(100% - 30px);
    margin: 0 15px;
    max-width: none;
  }

  .nav-icons {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 15px;
    gap: 35px;
  }

  .logo img {
    height: 32px;
  }

  .logo-title {
    font-size: 1rem;
  }

  .logo-title:last-child {
    font-size: 0.75rem;
  }
}

/* Account dropdown styling */
.account-dropdown {
  position: relative;
  display: inline-block;
}

.account-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  z-index: 1;
  padding: 10px 0;
}

.account-dropdown:hover .account-dropdown-content {
  display: block;
}

.account-dropdown-content a {
  color: #333;
  padding: 10px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.account-dropdown-content a:hover {
  background-color: #f5f5f5;
  color: var(--primary-color);
}
/* PDP Container */
.pdp-container {
  display: flex;
  flex-wrap: nowrap;
  max-width: 1100px;
  height: 600px;
  margin: 40px auto;
  background-color: var(--surface-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.viewer-column {
  flex: 1 1 60%;
  min-width: 400px;
  height: 100%;
  background-color: #fdfdfd;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}

.details-column {
  flex: 1 1 40%;
  padding: 30px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Product Details */
h1 {
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 0.2em;
  font-weight: 700;
  line-height: 1.2;
}

.price {
  font-size: 1.6em;
  color: var(--text-color);
  margin-bottom: 0.2em;
  font-weight: 700;
}

.stock-info {
  display: flex;
  align-items: center;
  margin-bottom: 0.5em;
}

.stock-status {
  color: #28a745;
  font-weight: bold;
  margin-right: 8px;
  font-size: 0.9em;
}

.average-stars {
  color: #f39c12;
  font-size: 0.9em;
  margin-right: 8px;
}

.ping-button {
  position: relative;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  padding: 0;
  margin-right: 8px;
  display: inline-block;
}

.ping-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #28a745;
  z-index: 2;
}

.ping-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 2px solid #90ee90;
  background-color: transparent;
  animation: ping 1.5s cubic-bezier(0.2, 0.2, 0.8, 0.8) infinite;
  z-index: 1;
}

@keyframes ping {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    border-width: 2px;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
    border-width: 0;
  }
}

.product-highlights {
  margin: 0.5em 0;
}

.product-highlights h3 {
  font-size: 0.9em;
  margin-bottom: 0.6em;
  font-weight: 700;
}

.product-highlights ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-highlights li {
  margin-bottom: 0.5em;
  padding-left: 18px;
  position: relative;
  font-size: 0.8em;
}

.product-highlights li::before {
  content: "\2713";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Action Buttons */
.action-buttons {
  margin-top: auto;
  padding-top: 2em;
  display: flex;
  gap: 15px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #fdfdfd;
}

.quantity-selector button {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--text-color-light);
  transition: color 0.2s;
}

.quantity-selector button:hover {
  color: var(--primary-color);
}

.quantity-selector input {
  width: 35px;
  text-align: center;
  border: none;
  font-size: 1em;
  font-weight: bold;
  background-color: transparent;
  color: var(--text-color);
}

.quantity-selector input:focus {
  outline: none;
}

.add-to-cart-btn {
  flex-grow: 1;
  border: none;
  padding: 15px 25px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s, transform 0.1s;
  background-color: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-to-cart-btn:hover {
  background-color: #004a83;
  transform: scale(1.02);
}

.add-to-cart-btn svg {
  fill: #fff;
}

.checkout-btn {
  width: 100%;
  padding: 15px 25px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: not-allowed;
  transition: background-color 0.3s, transform 0.1s;
  font-family: "Montserrat", sans-serif;
}

.checkout-btn:hover {
  background-color: #004a83;
  transform: scale(1.02);
}

.view-in-room-btn {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  border: 1px solid #ddd;
  padding: 12px 25px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  border-radius: 25px;
  transition: background-color 0.3s, transform 0.1s;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.view-in-room-btn:hover {
  background-color: #fff;
  transform: translateX(-50%) scale(1.05);
}

.view-in-room-btn svg {
  margin-right: 10px;
}

/* Model Viewer */
model-viewer {
  width: 100%;
  height: 100%;
  --progress-bar-color: var(--primary-color);
}

@media (max-width: 768px) {
  .pdp-container {
    flex-direction: column;
    height: auto;
    margin: 20px auto;
  }

  .viewer-column {
    min-width: auto;
    width: 100%;
    height: 300px; /* Fixed height for viewer on smaller screens */
    padding: 1rem;
  }

  .details-column {
    width: 100%;
    padding: 20px;
  }

  h1 {
    font-size: 1.2em;
  }

  .price {
    font-size: 1.4em;
  }

  .product-highlights li {
    font-size: 0.75em;
  }

  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .add-to-cart-btn {
    width: 100%;
  }

  .quantity-selector {
    width: 100%;
    justify-content: center;
  }
}

/* Product Info Tabs */
.product-info-tabs {
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto; /* Allow horizontal scrolling for tabs */
  -webkit-overflow-scrolling: touch;
}

.tab-nav-button {
  flex-shrink: 0; /* Prevent buttons from shrinking */
  padding: 15px 25px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1em;
  font-weight: bold;
  color: var(--text-color-light);
  position: relative;
  bottom: -2px;
  transition: color 0.3s, border-bottom 0.3s;
}

.tab-nav-button:hover {
  color: var(--primary-color);
}

.tab-nav-button.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

.tab-content {
  padding: 30px 0;
}

.tab-pane {
  display: none;
  line-height: 1.7;
  color: var(--text-color);
  font-size: 0.95em;
}

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

.spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.spec-table th,
.spec-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.spec-table th {
  background-color: #f5f7fa;
  width: 35%;
  font-weight: 600;
  color: var(--primary-color);
}

.spec-table tr:last-child td,
.spec-table tr:last-child th {
  border-bottom: none;
}

.review {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  margin-bottom: 10px;
}

.review:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

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

.review-header strong {
  font-size: 1em;
  color: var(--text-color);
}

.stars {
  color: #f39c12;
  font-size: 1em;
}

.review p {
  font-size: 0.9em;
  color: var(--text-color-light);
  margin: 0;
}

@media (max-width: 768px) {
  .product-info-tabs {
    padding: 0 10px;
  }

  .tab-nav-button {
    font-size: 0.9em;
    padding: 12px 18px;
  }

  .tab-pane {
    font-size: 0.85em;
  }

  .spec-table th,
  .spec-table td {
    padding: 10px 15px;
    display: block; /* Stack table headers and data */
    width: 100%;
    box-sizing: border-box;
  }

  .spec-table th {
    text-align: center;
    background-color: #eef2f7;
  }

  .spec-table tr {
    margin-bottom: 15px;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
  }

  .spec-table tr:last-child {
    margin-bottom: 0;
  }

  .review {
    padding: 15px 0;
  }

  .review-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-header strong {
    margin-bottom: 5px;
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-button {
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #000;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.5em;
}

.modal-content img {
  margin: 20px 0;
}

/* Cart Sidebar  */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -450px; /* Hidden by default, larger than max-width */
  width: 400px;
  max-width: 100%; /* Allow full width on small screens */
  height: 100%;
  background: #f9fafd;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.13);
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
  transition: right 0.4s ease-in-out;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 28px 28px 18px 28px;
  border-bottom: 1.5px solid #e5e8ef;
  background: #fff;
  border-top-left-radius: 18px;
  position: relative;
}

.cart-header h2 {
  margin: 0;
  font-size: 1.35em;
  font-weight: 700;
  color: #222;
  text-align: center;
}

#close-cart-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #777;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

#close-cart-btn:hover {
  color: #333;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px 28px;
  background: #f9fafd;
}

.cart-item {
  display: flex;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 16px 14px;
  transition: box-shadow 0.18s;
  position: relative;
}

.cart-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e8ef;
  margin-right: 15px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h4 {
  margin: 0 0 5px 0;
  font-size: 1.08em;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-info .price {
  font-size: 1.08em;
  font-weight: 600;
  color: #3c4fe0;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e8ef;
  border-radius: 8px;
  background: #f3f6fa;
}

.cart-item-quantity button {
  background: none;
  border: none;
  font-size: 1.2em;
  padding: 8px 12px;
  color: #3c4fe0;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 6px;
}

.cart-item-quantity button:hover {
  background: #eaf0ff;
  color: #222;
}

.cart-item-quantity input {
  width: 35px;
  text-align: center;
  border: none;
  font-size: 1em;
  font-weight: bold;
  background: transparent;
  color: #222;
}

.remove-item-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.15s;
}

.remove-item-btn:hover {
  color: #e74c3c;
}

.cart-footer {
  padding: 18px 28px 28px 28px;
  background: #fff;
  border-bottom-left-radius: 18px;
  border-top: 1.5px solid #e5e8ef;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15em;
  font-weight: 600;
  margin-bottom: 18px;
  color: #222;
}

#cart-total-amount {
  color: #3c4fe0;
}

.cart-empty-message {
  text-align: center;
  color: #bbb;
  font-size: 1.1em;
  margin-top: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
}


