/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Currency selector styles */
.currency-selector {
    margin: 10px 0;
}

.currency-select {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background-color: transparent;
    color: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.currency-select:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.05);
}

.currency-select:focus {
    border-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Style for dropdown options */
.currency-select option {
    background-color: #2c2c2c;
    color: #ffffff;
    padding: 10px;
}

/* Footer specific styling for currency selector */
.footer .currency-selector {
    display: flex;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .currency-select {
        font-size: 13px;
        padding: 8px 12px;
        padding-right: 36px;
    }
}

body {
  font-family: Arial, sans-serif;
  background-color: white;
  color: rgb(37, 37, 37);
}

/* Responsive base font size */
html {
  font-size: 16px;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
}

/* Banner */
.banner {
  background-color: #aa0131;
  color: rgb(238 238 238);
  text-align: center;
  padding: 0.7rem 0;
  font-size: 0.85rem;
  width: 100%;
  font-family: 'Platypi';
  letter-spacing: .1rem;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: white;
  border-bottom: 1px solid #eee;
}

.store-name {
  font-size: 2rem;
  font-weight: bold;
  color: #252525;
  font-family: 'Trebuchet MS', 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: rgb(37, 37, 37);
  font-size: 1rem;
}

.category-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}

.category-link {
  color: rgb(37, 37, 37);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  padding: 0.25rem 0;
}

.category-link:hover {
  color: #aa0131;
}

.category-link:hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #aa0131;
}

.category-link.active {
  color: #aa0131;
  font-weight: 500;
}

.category-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #aa0131;
}

/* Mobile Category Navigation */
@media (max-width: 768px) {
  .category-nav {
    gap: 1rem;
    width: 100%;
    justify-content: flex-start;
    padding: 0.5rem 0;
  }
  
  .category-link {
    font-size: 0.9rem;
    padding: 0.2rem 0;
  }
}

@media (max-width: 480px) {
  .category-nav {
    gap: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }
  
  .category-link {
    font-size: 0.85rem;
    flex-shrink: 0;
  }
  
  /* Hide scrollbar but keep functionality */
  .category-nav::-webkit-scrollbar {
    height: 4px;
  }
  
  .category-nav::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .category-nav::-webkit-scrollbar-thumb {
    background: rgba(170, 1, 49, 0.3);
    border-radius: 2px;
  }
}

.cart-icon {
  width: 24px;
  height: 24px;
  background-color: rgb(37 37 37 / 75%);
  mask-image: url('images/cart.svg');
  -webkit-mask-image: url('images/cart.svg');
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: rgb(37 37 37 / 75%);
  margin: 5px 0;
  transition: 0.3s;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2rem;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    width: 100%;
  }
  
  .cart-icon {
    margin-top: 1rem;
    width: 28px;
    height: 28px;
  }
  
  .category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
  }
  
  .category-link {
    font-size: 1rem;
    padding: 0.5rem 0;
    width: 100%;
    display: block;
  }
  
  .category-link.active {
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  .nav-links {
    width: 85%;
    padding: 1.5rem;
  }
  
  .category-nav {
    gap: 0.4rem;
    padding: 0.75rem 0;
  }
  
  .category-link {
    font-size: 0.9rem;
    padding: 0.4rem 0;
  }
}

@media (max-width: 480px) {
  .nav-links {
    width: 85%;
    padding: 1.5rem;
  }
}

/* Hero Banner */
.hero {
  position: relative;
  min-height: 50rem;
  background-image: url('images/optimized/hero2-lg.webp');
  background-size: cover;
  background-position: center;
  background-color: #333; /* Fallback dark background */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

/* Responsive hero images */
@media (max-width: 1200px) {
  .hero {
    background-image: url('images/optimized/hero2-md.webp');
  }
}

@media (max-width: 768px) {
  .hero {
    background-image: url('images/optimized/hero2-sm.webp');
    min-height: 30rem;
  }
}

@media (max-width: 480px) {
  .hero {
    background-image: url('images/optimized/hero2-sm.webp');
    min-height: 20rem;
  }
}

.hero-content {
  /* background-color: rgba(255, 255, 255, 0.1); */
  padding: 2rem;
  border-radius: 8px;
  /* backdrop-filter: blur(10px); */
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.hero .instagram {
  font-size: 1.2rem;
}

.hero .instagram a {
  color: white;
  text-decoration: none;
}

/* Mobile Header and Hero Styles */
@media (max-width: 768px) {
  .banner {
    padding: 0.5rem 0;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
  }
  
  .header {
    padding: 1rem;
  }
  
  .store-name {
    font-size: 1.5rem;
  }
  
  .nav-links {
    gap: 0.75rem;
  }
  
  .nav-links a {
    font-size: 0.9rem;
  }
  
  .cart-icon {
    width: 20px;
    height: 20px;
  }
  
  .hero {
    min-height: 30rem;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .instagram {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.75rem 1rem;
  }
  
  .store-name {
    font-size: 1.25rem;
  }
  
  .hero {
    min-height: 20rem;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero .instagram {
    font-size: 0.9rem;
  }
}

/* Products Section */
.products-section {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sorting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  color: rgb(37 37 37 / 75%);
}

.sort-select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
}

.item-count {
  font-size: 1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.product {
  text-align: center;
  cursor: pointer;
}

.product img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.product-name {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: rgb(37 37 37 / 75%);
}

.product-price {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgb(37 37 37 / 75%);
}

/* Mobile Products Section */
@media (max-width: 768px) {
  .products-section {
    padding: 1.5rem;
  }
  
  .sorting {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .product img {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .products-section {
    padding: 1rem;
  }
  
  .sorting {
    margin-bottom: 1rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .product img {
    height: 200px;
  }
  
  .product-name {
    font-size: 1rem;
  }
  
  .product-price {
    font-size: 0.85rem;
  }
}

/* Footer */
.footer {
  background-color: rgb(37 37 37 / 75%);
  color: white;
  padding: 2rem;
  text-align: center;
}

.footer a {
  color: white;
  text-decoration: none;
}

.footer-section {
  margin-bottom: 1rem;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Mobile Footer */
@media (max-width: 768px) {
  .footer {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 1rem;
  }
}
/* Product Page */
.product-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 2rem;
}

.gallery {
  flex: 1;
}

.main-image {
  width: 100%;
  height: clamp(420px, 70vh, 800px); /* fill more of the viewport while keeping a sensible min/max */
  object-fit: cover;                 /* fill the frame with no grey gaps; may crop edges but keeps aspect ratio */
  object-position: center center;    /* center the image in the frame */
  background-color: transparent;     /* remove grey background banding */
  border: 1px solid #eee;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: block;                    /* avoid inline-image baseline gap */
}

.thumbnails {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.thumbnail {
  width: 100px;
  height: 100px;
  object-fit: cover;
  cursor: pointer;
}

.details {
  flex: 1;
}

.product-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: rgb(37 37 37 / 75%);
}

.buy-button {
  padding: 1rem 2rem;
  background-color: #aa0131;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.product-description {
  color: rgb(37 37 37 / 75%);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* Mobile Product Page */
@media (max-width: 768px) {
  .product-page {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  /* Admin Page Responsive Styles */
  @media (max-width: 768px) {
    .admin-container {
      padding: 1.5rem !important;
      max-width: 100% !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
      padding: 0.6rem !important;
    }
    
    .product-item {
      padding: 0.75rem !important;
    }
    
    .product-images {
      gap: 0.25rem !important;
    }
    
    .product-images img {
      width: 40px !important;
      height: 40px !important;
    }
    
    .edit-image-item {
      padding: 4px !important;
    }
    
    .edit-image-item img {
      width: 50px !important;
      height: 50px !important;
    }
  }
  
  @media (max-width: 480px) {
    .admin-container {
      padding: 1rem !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
      padding: 0.5rem !important;
      font-size: 0.9rem;
    }
    
    .btn {
      padding: 0.6rem 1rem !important;
      font-size: 0.9rem !important;
    }
    
    .product-item h4 {
      font-size: 1.1rem;
    }
    
    .product-item p {
      font-size: 0.9rem;
    }
    
    .product-images {
      flex-wrap: wrap !important;
    }
    
    .edit-image-list {
      gap: 4px !important;
    }
    
    .edit-image-item {
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 4px !important;
    }
    
    .edit-image-item img {
      width: 100% !important;
      height: auto !important;
      max-width: 60px !important;
    }
  }
  
  .main-image {
    height: clamp(300px, 50vh, 500px);
  }
  
  .thumbnails {
    gap: 0.75rem;
  }
  
  .thumbnail {
    width: 80px;
    height: 80px;
  }
  
  .product-title {
    font-size: 2.5rem;
  }
  
  .product-price {
    font-size: 1.2rem;
  }
  
  .buy-button {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .product-page {
    padding: 1rem;
    gap: 1rem;
  }
  
  .main-image {
    height: clamp(250px, 40vh, 400px);
  }
  
  .thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .product-title {
    font-size: 2rem;
  }
  
  .product-price {
    font-size: 1rem;
  }
  
  .product-description {
    font-size: 1rem;
    line-height: 1.6;
  }
}