:root {
  --color-bg: #1a1a1a;
  --color-text: #e0e0e0;
  --color-accent: #ffd700;
  --color-primary-btn-bg: var(--color-accent);
  --color-primary-btn-text: #1a1a1a;
  --color-secondary-btn-bg: transparent;
  --color-secondary-btn-text: var(--color-accent);
  --color-border: #333;
  --color-card-bg: #2a2a2a;
  --color-darker-bg: #121212;
  --header-height: 70px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  color: var(--color-text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary-btn-bg);
  color: var(--color-primary-btn-text);
  border-color: var(--color-primary-btn-bg);
}

.btn-primary:hover {
  background-color: #e6c200;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
  background-color: var(--color-secondary-btn-bg);
  color: var(--color-secondary-btn-text);
  border-color: var(--color-secondary-btn-text);
}

.btn-secondary:hover {
  background-color: rgba(255, 215, 0, 0.1);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background-color: var(--color-accent);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.bg-darker {
  background-color: var(--color-darker-bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.sticky-header .logo h1 {
  margin: 0;
  font-size: 28px;
}

.sticky-header .logo a {
  color: var(--color-accent);
}

.sticky-header nav {
  display: flex;
  align-items: center;
}

.sticky-header .nav-links {
  list-style: none;
  display: flex;
  margin-right: 20px;
}

.sticky-header .nav-links li {
  margin-left: 30px;
}

.sticky-header .nav-links a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 17px;
  position: relative;
}

.sticky-header .nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  bottom: -5px;
  left: 0;
  transition: width 0.3s ease;
}

.sticky-header .nav-links a:hover::after {
  width: 100%;
}

.cart-icon-btn {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 24px;
  cursor: pointer;
  position: relative;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count {
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: #ff4d4d;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
  font-weight: bold;
}

.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('https://images.unsplash.com/photo-1580104332961-0f734493e83f?q=80&w=2670&auto=format&fit=crop') no-repeat center center/cover;
  height: 80vh;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  margin-top: var(--header-height);
}

.hero-section .hero-content {
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 56px;
  margin-bottom: 20px;
  color: white;
}

.hero-section p {
  font-size: 20px;
  margin-bottom: 40px;
  color: #ccc;
}

.hero-actions .btn {
  margin: 0 10px;
}

.shop-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.search-bar input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--color-border);
  background-color: var(--color-card-bg);
  color: var(--color-text);
  border-radius: 8px;
  font-size: 16px;
  min-height: 44px;
}

.filter-sort-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 720px) {
  .filter-sort-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-filters button {
  background-color: var(--color-card-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  font-size: 16px;
}

.category-filters button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.category-filters button.active {
  background-color: var(--color-accent);
  color: var(--color-primary-btn-text);
  border-color: var(--color-accent);
}

.sort-dropdown select {
  padding: 10px 15px;
  border: 1px solid var(--color-border);
  background-color: var(--color-card-bg);
  color: var(--color-text);
  border-radius: 8px;
  font-size: 16px;
  min-height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffd700%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.3%203.2-15.8%208.1-3.5%204.9-3.9%2011.6-1%2016.9l131.9%20150.9c3.2%203.7%207.1%205.8%2011.2%205.8h.4c4.1%200%208-2.1%2011.2-5.8L287%2086.3c3-%205.3%202.6-12-.9-16.9z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 30px;
}

.product-count {
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background-color: var(--color-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.product-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--color-accent);
}

.product-card .price {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 15px;
}

.product-card .product-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card .btn {
  width: 100%;
}

.empty-state {
  text-align: center;
  font-size: 24px;
  color: #888;
  padding: 50px 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.review-card {
  background-color: var(--color-card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

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

.review-rating .fas {
  color: var(--color-accent);
  margin-right: 2px;
}

.review-author {
  font-weight: 600;
  color: var(--color-accent);
}

.review-text {
  font-size: 16px;
  color: #ccc;
}

.trust-score {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent);
}

.footer-section {
  background-color: var(--color-darker-bg);
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.footer-col p, .footer-col ul {
  font-size: 15px;
  color: #aaa;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #aaa;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--color-accent);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-form input {
  padding: 12px 15px;
  border: 1px solid var(--color-border);
  background-color: var(--color-card-bg);
  color: var(--color-text);
  border-radius: 8px;
  font-size: 16px;
  min-height: 44px;
}

.newsletter-form button {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  color: #888;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: var(--color-card-bg);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.4s ease-out;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-header h2 {
  margin: 0;
  font-size: 24px;
  color: var(--color-accent);
}

.cart-drawer .close-btn {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
}

.cart-drawer-body {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background-color: var(--color-bg);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-details h4 {
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--color-accent);
}

.cart-item-details .price {
  font-size: 15px;
  color: #ccc;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-actions input {
  width: 48px;
  padding: 6px;
  border: 1px solid var(--color-border);
  background-color: var(--color-darker-bg);
  color: var(--color-text);
  border-radius: 4px;
  font-size: 15px;
  text-align: center;
  min-height: 40px;
}

.cart-item-actions .remove-btn {
  background: none;
  border: none;
  color: #ff4d4d;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
}

.cart-empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #888;
}

.cart-empty-state p {
  margin-bottom: 20px;
  font-size: 18px;
}

.cart-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--color-border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.cart-total .total-label {
  color: var(--color-text);
}

.cart-total .total-amount {
  color: var(--color-accent);
}

.cart-drawer-footer .btn {
  width: 100%;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--color-card-bg);
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-content .close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
}

.product-detail-content {
  max-width: 850px;
}

.product-detail-name {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--color-accent);
}

.product-detail-body {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.product-detail-image {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  border-radius: 8px;
  background-color: #121212;
}

.product-detail-info {
  flex-grow: 1;
}

.product-detail-description {
  font-size: 15px;
  color: #ccc;
  margin-bottom: 20px;
}

.product-detail-specs h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--color-text);
}

.product-detail-specs ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.product-detail-specs li {
  margin-bottom: 6px;
  font-size: 14px;
  color: #bbb;
}

.product-detail-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 20px;
}

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

/* Checkout Modal Styles */
.checkout-content {
  max-width: 540px;
  width: 100%;
}

.checkout-content h2 {
  text-align: center;
  margin-bottom: 8px;
  color: var(--color-accent);
}

.checkout-subtitle {
  text-align: center;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
}

.checkout-summary-box {
  background-color: var(--color-darker-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.checkout-summary-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
}

.checkout-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.checkout-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: bold;
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

.form-group input, .payment-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  background-color: var(--color-darker-bg);
  color: var(--color-text);
  border-radius: 8px;
  font-size: 15px;
  min-height: 44px;
}

.form-group input:focus, .payment-select:focus {
  outline: 2px solid var(--color-accent);
  border-color: transparent;
}

.checkout-content .btn {
  width: 100%;
  margin-top: 10px;
}

.success-icon {
  font-size: 50px;
  color: #10b981;
  text-align: center;
  margin-bottom: 10px;
}

#checkout-success h3 {
  text-align: center;
  font-size: 24px;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.order-ref {
  text-align: center;
  font-size: 16px;
  margin-bottom: 20px;
}

.receipt-box {
  background-color: var(--color-darker-bg);
  border: 1px dashed var(--color-accent);
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  margin-bottom: 20px;
}

.receipt-box p {
  margin-bottom: 6px;
}

.receipt-items {
  margin: 12px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.receipt-total {
  font-size: 16px;
  margin-top: 8px;
}

.success-note {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
}

@media (min-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .product-detail-body {
    flex-direction: row;
  }
  .product-detail-image {
    width: 45%;
  }
  .product-detail-info {
    width: 55%;
    padding-left: 20px;
  }
  .hero-section h1 {
    font-size: 64px;
  }
  .hero-section p {
    font-size: 22px;
  }
}

@media (min-width: 1000px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .sticky-header .nav-links {
    display: none;
  }
  .hero-section {
    height: 60vh;
  }
  .hero-section h1 {
    font-size: 40px;
  }
  .hero-section p {
    font-size: 16px;
  }
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  .section-title {
    font-size: 28px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .product-card img {
    height: 160px;
  }
  .product-card h3 {
    font-size: 16px;
  }
  .product-card-content {
    padding: 12px;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .product-detail-body {
    flex-direction: column;
  }
  .modal-content {
    padding: 20px;
  }
}