:root {
  --color-text-primary: #242332;
  --color-text-secondary: #8397a6;

  /* --color-border-accent: #e9d7c54a; */
  --color-border-accent: #c8b8a766;

  --color-background: #fefeff;

}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text-primary);
}

.disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button:disabled:hover {
  background-color: var(--color-border-accent);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.tiny-container {
  max-width: 600px;
  margin: 0 auto;
}

.navbar-wrapper {
  width: 100%;
  border-bottom: 1px solid var(--color-border-accent);
  background-color: var(--color-background);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-left, .navbar-center, .navbar-right {
  display: flex;
  align-items: center;
  flex: 1;
}

.navbar-center {
  justify-content: center;
}

.navbar-right {
  justify-content: flex-end;
}

.navbar-link {
  padding: 0 15px;
  text-transform: uppercase;
  font-size: 14px;
  text-decoration: none;
  color: var(--color-text-primary);
  position: relative;
}

.navbar-link::before {
  content: '';
  position: absolute;
  width: 100%;
  left: 0;
  height: 68px;
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  transition: all 0.15s ease;
}

.navbar-link:hover::before {
  background: var(--color-border-accent);
}


.navbar-link.active {
  font-weight: bold;
}

.search-button {
  display: flex;
  align-items: center;
}

.search-icon {
  margin-right: 5px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text-primary);
  max-height: 28px;
}

.logo img {
  max-height: 28px;
}

.logo-diamond {
  display: inline-block;
  transform: rotate(45deg);
  margin: 0 5px;
}

.account-icon, .cart-icon {
  margin-left: 20px;
  position: relative;
}

.cart-icon img {
  width: 25px;
  height: 25px;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: 5px;
  background-color: var(--color-text-primary);
  color: var(--color-background);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.product-container {
  display: flex;
}

.product-image {
  flex: 1;
  border-right: 1px solid var(--color-border-accent);
  padding: 10px;
}

.image-carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 800px;
  min-height: 600px;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
}

.dot {
  width: 10px;
  height: 10px;
  margin: 5px 0;
  background-color: var(--color-border-accent);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: var(--color-text-primary);
}

.product-details {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.product-title {
  text-align: center;
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.product-price {
  text-align: center;
  font-size: 14px;
  margin-bottom: 40px;
}

.product-description {
  text-align: center;
  margin-bottom: 30px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border-accent);
  padding-bottom: 30px;
}

.size-chart {
  margin: 20px 0;
  overflow-x: auto;
}

.size-chart table {
  width: 100%;
  border-collapse: collapse;
}

.size-chart th, .size-chart td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

.size-chart th {
  background-color: #f5f5f5;
}

.size-instructions {
  margin-top: 20px;
}

.size-instructions p {
  margin-bottom: 10px;
  font-weight: bold;
}

.size-instructions ul {
  padding-left: 20px;
}

.size-instructions li {
  margin-bottom: 5px;
  color: var(--color-text-secondary);
}

.size-selector {
  margin-bottom: 20px;
  position: relative;
}

.size-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

.product-description > div:nth-child(2) {
  display: grid;
  font-size: 12px;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  align-items: stretch;
  margin: 0 auto;
  max-width: calc(3 * 150px + 2 * 24px); 
}

.product-description-category {
  display: grid;
  font-size: 12px;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: stretch;
  margin-bottom: 20px;
}

.size-dropdown {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border-accent);
  border-radius: 5px;
  background-color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-arrow {
  border: solid black;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.3s;
}

.size-dropdown.active .dropdown-arrow {
  transform: rotate(-135deg);
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-border-accent);
  border-top: none;
  border-radius: 0 0 5px 5px;
  z-index: 10;
  display: none;
}

.dropdown-options.show {
  display: block;
}

.dropdown-option {
  padding: 10px;
  cursor: pointer;
}

.dropdown-option:hover {
  background-color: #f5f5f5;
}

.add-to-wishlist {
  background-color: white;
  color: black;
  background: var(--color-border-accent);
  padding: 10px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 2px;
  color: var(--color-text-primary);
  transition: all 0.15s ease;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
}

.add-to-wishlist:hover {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-background);
}

.product-tabs {
  margin: 20px 0;
  border-bottom: 1px solid #ccc;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid #ccc;
}

.tab-button {
  padding: 15px 20px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.tab-button.active {
  color: var(--color-text-primary);
  font-weight: bold;
}

.tab-content {
  padding: 20px;
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content p {
  font-size: 0.95em;
  margin-bottom: 10px;
  line-height: 1.5;
  color: var(--color-text-primary);
}

.tab-content ul {
  padding-left: 20px;
}

.tab-content li {
  margin-bottom: 10px;
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .product-container {
      flex-direction: column;
  }

  .navbar {
      padding: 15px 10px;
      flex-wrap: wrap;
  }

  .navbar-left, .navbar-right {
      width: 100%;
      justify-content: center;
      margin: 10px 0;
      flex: auto;
  }

  .navbar-right {
    width: min-content;
    position: absolute;
    top: 10px;
    right: 15px;
  }

  .navbar-center {
      order: -1;
      width: 100%;
      justify-content: center;
      margin-bottom: 10px;
      flex: auto;
  }

  .navbar-link {
      margin: 0 5px;
      font-size: 12px;
  }

  .logo {
      font-size: 20px;
  }

  .menu-toggle {
      display: block;
      position: absolute;
      top: 15px;
      right: 15px;
      font-size: 24px;
      cursor: pointer;
  }

  .product-image {
      border-right: none;
      border-bottom: 1px solid #ccc;
  }

  .image-carousel {
      height: 400px;
  }

  .carousel-container {
      flex-direction: row;
      scroll-snap-type: x mandatory;
      overflow-x: auto;
      overflow-y: hidden;
  }

  .carousel-slide {
      scroll-snap-align: start;
      scroll-snap-stop: always;
  }

  .carousel-dots {
      bottom: 10px;
      right: auto;
      left: 50%;
      transform: translateX(-50%);
      flex-direction: row;
  }

  .dot {
      margin: 0 5px;
  }

  .product-details {
      padding: 20px;
  }

  .tabs-header {
      flex-direction: column;
      border-bottom: none;
  }

  .tab-button {
      padding: 10px;
      border-bottom: 1px solid #ccc;
  }

  .tab-content {
      padding: 15px;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(100% / 2), 1fr));
  align-items: stretch;
}

@media only screen and (max-width: 754px) {
  .grid {
    grid-template-columns: 1fr;
    padding: 0.2em;
  }
}

.grid .full {
  grid-column: 1 / -1;
}

.grid .item {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  aspect-ratio: 5/6;
  cursor: pointer;
}

.item img {
  width: 100%;
  aspect-ratio: 5/6;
  object-fit: cover;
}

.item.inverse {
  aspect-ratio: 3/2 !important;
}

.item.inverse img {
  aspect-ratio: 3/2;
}

.item.inverse > .item-title {
  color: var(--color-background);
}

.item-title {
  position: absolute;
  bottom: 20px;
  left: 20px;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 1.5em;
  color: var(--color-text-primary);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  align-items: stretch;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.items-grid .item {
  box-sizing: border-box;
  padding: 0;
  width: 100%;
  height: 100%;
  position: relative;
  border: 1px solid #C8C8C8A8;
  aspect-ratio: 3/4;
}


.items-grid .item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 5/6;
  object-fit: cover;
}

.items-grid .item-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 5px;
  display: flex;
  font-size: 14px;
  font-weight: 500;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: var(--color-background);
  color: var(--color-text-primary);
  box-shadow: rgba(17, 17, 26, 0.1) 0px -1px 0px;
}

.items-grid .item-title span:nth-child(2) {
  font-size: 0.9em;
  color: var(--color-text-secondary);
}

.items-grid .item:hover .item-title {
  z-index: 3;
}

@media only screen and (max-width: 545px) {
  .items-grid {
    grid-template-columns: 1fr;
    padding-left: 0.1em;
    padding-right: 0.1em;
  }

  .items-grid .item-title {
    z-index: 3;
  }
}
#cart, .cart {
  position: fixed;
  top: 0;
  height: 100%;
  width: 400px;
  padding-top: 100px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-left: 1px solid var(--color-border-accent);
  right: -150%;
  z-index: 10;
  background: var(--color-background);
  transition: right .3s;
}


#cart.open, #cart.open .cart {
  right: 0;
}

#cart h2 {
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  margin: 1em 0;
  padding: 0 1em;
  position: relative;
  cursor: pointer;
}

#cart h2::before {
  content: "\00D7";
  position: absolute;
  right: 1em;
  width: 1em;
  height: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 0.25em;
  border-radius: 50%;
  top: -0.25em;
  transition: all 0.05s ease;
  z-index: 1000;
}

#cart.open #cart-backdrop {
  opacity: 1;
  display: block; 
}

#cart-backdrop {
  position: fixed;
  background: rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
  cursor: pointer;
  height: 100%;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  display: none;
  border: none;
  padding: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#cart-hover~#cart.open {
  right: 0;
}

#cart-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cart-items li {
  display: flex;
  padding: 1em;
  box-shadow: rgba(17, 17, 26, 0.1) 0px -1px 0px;
  position: relative;
}

#cart-items li>div:first-child {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0.5em 0 1em;
}

#cart-items li>div:first-child img {
  width: 60px;
  height: 80px;
  object-fit: cover;
}

#cart-items li>div:last-child {
  flex: 2;
  display: flex;
  flex-direction: column;
}

.cart-remove {
  cursor: pointer;
  position: absolute;
  left: 1em;
  top: 0.85em;
  bottom: auto;
  transform: translateY(-50%);
  width: 22px !important;
  height: 22px;
  font-size: 16px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-text-primary) !important;
  background-color: var(--color-background) !important;
  border: 1px solid var(--color-border-accent) !important;
  font-weight: 400 important;
  padding: 0;
}

.cart-remove:hover {
  border: 1px solid var(--color-text-primary) !important;
  background-color: var(--color-text-primary) !important;
  color: var(--color-background) !important;
}

.cart-price {
  color: var(--color-text-secondary);
  font-weight: 300;
  font-size: 0.875em;
}

button, .button {
  width: 100%;
  border: none;
  padding: 1em 0;
  border: 1px solid var(--color-border-accent);
  background-color: var(--color-border-accent);
  color: var(--color-text-primary);
  cursor: pointer;
  font-size: 1em;
  text-transform: uppercase;
  font-weight: bold;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
  transition: all 0.15s ease;
}

button:hover, .button:hover {
  background-color: var(--color-text-primary);
  color: var(--color-background);
}

.center-logo {
  position: fixed;
  width: 20vw;
  min-width: 200px;
  max-width: 500px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1000;
}

.form-container {
  margin: 0 auto;
  padding: 50px 50px 10px 50px;
  border-bottom: 1px solid var(--color-border-accent);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(297px, 1fr));
  grid-gap: 24px;
  align-items: stretch;
  width: 397px;
}

.form-container button {
  padding: 10px;
  font-size: 12px;
  margin-top: 1em;
}

#add-image {
  padding: 10px;
  font-size: 12px;
}

.form-actions {
  margin-top: 50px;
  display: flex;
  padding: 10px;
  border-top: 1px solid var(--color-border-accent);
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.form-actions button {
  width: fit-content;
  margin: 0 auto;
  padding: 10px 4em;
  font-size: 12px;
  background: var(--color-text-primary);
  color: var(--color-background);
  border: 1px solid var(--color-text-primary);
}

.form-actions button:hover {
  background: var(--color-background);
  color: var(--color-text-primary);
}

th { font-size: 12px; }

th:nth-child(2) {
  width: 80px;
}

.dashboard-item td {
  padding: 8px 4px;
  border: 1px solid var(--color-border-accent);
  text-align: center;
  font-size: 10px;
  width: 50px;
  text-overflow: ellipsis;
}


.dashboard-item td:nth-child(2) { 
  padding: 0;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-size: 10px;
}

.dashboard-item td:nth-child(2) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-item td:nth-child(3) {
  text-align: left;
  width: auto;
}

.dashboard-item td:nth-child(4) {
  width: 70px;
}

.category-tbody > .dashboard-item td:nth-child(2) {
  width: auto;
  display: block;
}

.category-tbody > .dashboard-item td:nth-child(3) {
  width: 50px;
}

.dashboard-item svg {
  width: 18px;
  height: 18px;
}

table {
  border-collapse: collapse;
  width: 600px;
}

.dashboard-section {
  display: flex;
  margin-top: 40px;
  margin-bottom: 20px;
  padding: 12px 20px;
  box-sizing: border-box;
  width: 100%;
  background-color: var(--color-border-accent);
  display: flex;
  justify-content: center;
  align-items: center;
}

.dashboard-section a {
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-text-primary);
  cursor: pointer;
}

.dashboard-section a:hover {
  color: var(--color-text-primary);
  transform: scale(1.05);
}

.dashboard-section span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.out-of-stock {
  color: #b91c1c !important;
  position: relative;
}

.warn {
  font-weight: 800;
  text-transform: uppercase;
  color: #b91c1c;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--color-background);
  padding: 20px;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
  max-width: 500px;
  width: 100%;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}

.modal-content .button {
  width: fit-content;
  padding: 1em;
  text-decoration: none;
  font-size: 0.75em;
}

.subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding: 0 2em;
}

.subtotal span {
  font-weight: bold;
}

.toast {
  margin-bottom: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 5px;
  color: var(--color-background);
  font-family: sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  width: 250px;
  max-width: 250px;
  box-sizing: border-box;
}

.toast.notification { background-color: #4caf50; }
.toast.error { background-color: #f44336; }

#notifications {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  max-height: 80vh;
  overflow-y: hidden;
}

.form-group {
  margin-top: 20px;
}

.image-input {
  margin-bottom: 10px;
}

footer {
  background-color: var(--color-background);
  padding: 2em 0 3em 0;
  position: relative;
}

footer::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 1px;
  background-color: var(--color-border-accent);
}

.footer-container {
  color: var(--color-text-secondary);
  font-size: 12px;
  display: flex;
  justify-content: space-around;
}

.footer-container a:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.footer-container > * {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--color-text-secondary);
}

.footer-container > div a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.footer-container > div a:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-container > * {
    margin-bottom: 12px;
  } 
}

.terms-container a {
  text-decoration: none;
  color: var(--color-text-primary);
}

.terms-container h2 {
  font-size: 1.2em;
  margin-bottom: 0.65em;
  margin-top: 2em;
}

.terms-container > div:nth-child(2) p {
  /* justify text */
  text-align: justify;
}

.terms-container table {
  margin: 12px 0;
}

.terms-container thead {
  background-color: #c8c8c8A8;
}

.terms-container thead th {
  padding: 10px;
  border: 1px solid var(--color-border-accent);
  text-align: center;
  font-weight: bold;
}

.terms-container tbody td {
  padding: 10px;
  border: 1px solid var(--color-border-accent);
  text-align: center;

}

.terms-container tbody td:nth-child(1) {
  width: 20%;
}

.terms-container tbody td:nth-child(2) {
  width: 40%;
}

.terms-container tbody td:nth-child(3) {
  width: 40%;
}

.terms-container ul {
  padding-left: 30px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.terms-container:last-child {
  margin-bottom: 3em;
}