/* Variables */
:root {
    --primarysecondary-color: #2033545e;
    --primarysecondaryhover-color: #2033544a;
    --secondary-color: #6c757d;
    --primary-color: #9fb5da;
    --primaryhover-color: #90a9d5;
    --redbut-color: #eb8e97; 
    --redbuthover-color: #e87d87; /* dc3545 c82333; 28a745 218838 */
    --greenbut-color: #94e5a7; 
    --greenbuthover-color: #84e199;
    --background-color: #f8f9fa;
    --text-color: #212529;
    --text-color: #333;
    --font-family: 'Segoe UI', sans-serif;
    --border-radius: 8px;
    --button-radius: 16px;
    --variation-bg-color: #f5f7fb;
  }
  
  /* Reset some default styles */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
  }
  
  /* Container for page content */
  .container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  }
  
  /* Navigation Bar */
  .navbar {
    background-color: var(--primary-color);
    color: black;
    padding: 10px 0;
  }
  
  .navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .navbar .logo {
    color: black;
    font-size: 1.6em;
    text-decoration: none;
    font-weight: bold;
  }
  
  .navbar .nav-links {
    list-style: none;
  }
  
  .navbar .nav-links li {
    display: inline;
    margin-left: 20px;
  }
  
  .navbar .nav-links a {
    color: black;
    text-decoration: none;
    font-size: 1em;
  }
  
  /* Flash messages */
  .flash-messages {
    padding: 10px;
    margin: 10px 0;
    background-color: var(--secondary-color);
    color: white;
    border-radius: var(--border-radius);
  }
  
  .flash-messages ul {
    list-style: none;
  }
  
  /* Buttons */
  .btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--button-radius);
    margin-top: 10px;
  }
  
  .btn:hover {
    background-color: var(--secondary-color);
  }
  
  .btn-small {
    padding: 4px 8px;
    font-size: 0.9em;
    margin-left: 10px;
  }
  
  /* Lists */
  .list-items {
    list-style: disc inside;
    margin: 10px 0;
  }
  
  h1, h2, h3, h4, h5 {
    margin-bottom: 10px;
  }
  
  /* Forms */
  form label {
    display: block;
    margin: 10px 0 5px;
    text-align: left;
  }
  
  form input, form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
  }
  
  /* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  background-color: var(--primary-color);
  color: white;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.9em;
}

th,
td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: left;
  white-space: nowrap;
}

th {
  background-color: #f2f2f2;
}
  
/* Storefront Styles */
.store-header {
  text-align: center;
  margin-bottom: 20px;
}
.store-header h1 a {
  color: inherit;
  text-decoration: none;
}
.store-cover {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

@media (min-width: 1024px) {
  .store-cover {
    /* width: auto;
    margin-left: 10%;
    margin-right: 10%; */
    padding: 0 20%;
  }
  /* .store-cover.vertical {
    clip-path: inset(20% 0 20% 0);
  } */
}
.store-logo {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  margin-top: -40px;
  border: 2px solid #fff;
  background: #fff;
}
.product-detail {
  background: #fff;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.product-detail img.product-img {
  max-width: 400px;
  height: auto;
  margin-bottom: 10px;
}

.social-links {
  text-align: center;
  margin: 10px 0;
}
.social-links a {
  margin: 0 8px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.8em;
}
.location {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.address-block {
  flex: 0 0 40%;
}
.map-block {
  flex: 0 0 58%;
}
.map-embed {
  width: 100%;
  height: 200px;
  border: 0;
  border-radius: var(--border-radius);
  margin-top: 8px;
}
.product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-item {
  display: flex;
  flex-direction: row;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 10px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.product-img-wrap {
  flex: 0 0 40%;
  position: relative;
}
.product-info {
  flex: 1;
  padding-left: 10px;
}
.product-title {
  margin: 0 0 4px 0;
  font-size: 1.3em;
  color: var(--primary-color);
}
.product-info a {
  color: inherit;
  text-decoration: none;
}
.product-description {
  margin-bottom: 6px;
}
.product-img-wrap .product-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--border-radius);
}
.thumb-row,
.thumb-gallery {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  justify-content: center;
  overflow-x: auto;
}
.product-thumb,
.gallery-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius);
  cursor: pointer;
  border: 1px solid #ddd;
}
.product-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.product-gallery .product-img {
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: contain;
  border-radius: var(--border-radius);
}
.variation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.variation-item {
  padding: 8px;
  border-radius: var(--border-radius);
  background: var(--variation-bg-color);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.variation-images {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.variation-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
}
.variation-item input[type="radio"] {
  margin-top: 4px;
}
.nav-btn {
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
}

.back-link {
  margin-top: 20px;
  text-align: center;
}
.back-link a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
}


/* Landing page */
.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
}

.landing-wrap {
  max-width: 480px;
}

.landing-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 16px;
}

.landing-mascot {
  width: 120px;
  height: 120px;
  margin: 16px auto;
}

.landing-actions {
  margin-top: 16px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: var(--button-radius);
  margin-right: 8px;
}

.btn-outline {
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: 8px 16px;
  text-decoration: none;
  border-radius: var(--button-radius);
}

.auth-links {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.glass-btn {
  padding: 6px 12px;
  border-radius: var(--button-radius);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}
a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
}
.auth-wrapper{max-width:400px;margin:0 auto;text-align:center;}
.auth-wrapper form{margin-top:10px;}
.error{color:red;margin-top:10px;}

@media (max-width: 600px) {
  .auth-links { justify-content: center; }
  .product-item {
    padding: 8px;
  }
  .product-info {
    padding-left: 6px;
  }
  .product-description {
    font-size: 0.9em;
  }
}

.cart-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  cursor: pointer;
}
.cart-toggle span {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--redbut-color);
  color: #fff;
  border-radius: 50%;
  padding: 2px 5px;
  font-size: 0.8em;
}
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: #fff;
  border-left: 1px solid #ccc;
  box-shadow: -2px 0 6px rgba(0,0,0,0.1);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}
.cart-sidebar:not(.hidden) {
  transform: translateX(0);
}
.cart-close {
  background: none;
  border: none;
  font-size: 1.2em;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}
.cart-sidebar ul {
  list-style: none;
  padding: 0;
}
.hidden {display:none;}

/* product detail additions */
.total-line {
  margin: 5px 0;
}

.similar-products {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.similar-item {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
  flex: 0 0 160px;
}
.similar-img {
  width: 100%;
  max-width: 140px;
  height: auto;
  display: block;
  margin: 0 auto 5px;
}
.cart-table input[type="number"] {
  width: 60px;
}
.cart-table button.remove-item,
.cart-sidebar button.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--redbut-color);
  margin-left: 4px;
}

.cart-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-right: 6px;
}

.cart-table td:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-sidebar li {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.cart-sidebar input[type="number"] {
  width: 50px;
  margin: 0 4px;
}
.orders-section {
  margin-bottom: 20px;
}
.order-block {
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: var(--border-radius);
  background: #fff;
}
.order-block ul {
  margin: 0;
  padding-left: 20px;
}

.order-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-right: 6px;
}

.order-total {
  font-weight: bold;
  margin-top: 4px;
}

.out-of-stock {
  color: #c00;
  font-weight: bold;
}
.price { font-weight: bold; color: #006400; font-size: 1.1em; }
.stock { font-weight: bold; font-size: 1.1em; }

/* Category section styles */
.category-section {
  margin-bottom: 40px;
}
.category-title {
  font-size: 1.5em;
  color: var(--primary-color);
  text-align: center;
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 10px;
  padding-bottom: 4px;
}
.subcategory-title {
  font-size: 1.2em;
  color: var(--secondary-color);
  margin: 20px 0 10px;
}
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.product-grid .product-item {
  flex: 0 0 calc(33.333% - 16px);
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.product-grid .product-info {
  padding: 10px 0;
}
@media (max-width: 768px) {
  .product-grid .product-item {
    flex: 0 0 calc(50% - 16px);
  }
}
@media (max-width: 480px) {
  .product-grid .product-item {
    flex: 0 0 100%;
  }
}

.no-products {
  text-align: center;
  font-size: 1.2em;
  margin: 40px 0;
  color: var(--secondary-color);
}
