:root {
  --primary: #f26b21;
  --primary-hover: #d55a16;
  --bg-color: #f8f9fa;
  --text-color: #333333;
  --card-bg: #ffffff;
  --border-color: #e5e5e5;
  --nav-height: 70px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-family);
}

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

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.product-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.responsive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

@media (max-width: 640px) {
  .responsive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 133%;
  overflow: hidden;
  background-color: #f0f0f0;
}

.product-image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.05);
}

.product-details {
  padding: 16px;
}

.product-category {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 8px 0;
}

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

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

.nav-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.page-wrapper {
  padding-top: var(--nav-height);
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #1e1e1e 0%, #3a3a3a 100%);
  color: white;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 40px 20px;
}

.auth-card {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-family);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(242, 107, 33, 0.2);
}

.btn-full {
  width: 100%;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.admin-logo {
  padding: 0 20px 20px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.admin-nav-item {
  padding: 12px 20px;
  font-weight: 500;
  color: var(--text-color);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background-color: rgba(242, 107, 33, 0.1);
  color: var(--primary);
  border-right: 3px solid var(--primary);
}

.admin-main {
  flex: 1;
  background-color: var(--bg-color);
  padding: 30px;
  overflow-y: auto;
}

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

.table-wrapper {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

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

.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background-color: #d4edda; color: #155724; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2.5rem; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
}

/* Specific Asort Colors and Button Styling */
.btn-asort {
  background-color: #e56e4e;
  color: white;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 300px;
  text-align: center;
  display: block;
  margin-top: 20px;
}

.btn-asort:hover {
  background-color: #d15d3f;
}

.text-coral {
  color: #e56e4e;
}

.price-original {
  text-decoration: line-through;
  color: #888;
  margin-right: 10px;
}

.discount-badge {
  background-color: #ffe8e2;
  color: #e56e4e;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Product Page Grid */
.product-detail-grid {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.thumbnail-strip {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.thumbnail-strip img {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumbnail-strip img.active {
  border-color: #e56e4e;
}

.main-image-view img {
  width: 100%;
  border-radius: 8px;
}

.product-info-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Size Selection */
.size-selection {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.size-box {
  width: 45px;
  height: 45px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.size-box:hover, .size-box.active {
  border-color: #e56e4e;
  color: #e56e4e;
}

/* Side Drawer Cart */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background-color: white;
  z-index: 2000;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

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

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1999;
  display: none;
}

.cart-overlay.open {
  display: block;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

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

/* Split-view Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.modal-overlay.open {
  display: flex;
}

.split-modal {
  display: flex;
  width: 800px;
  max-width: 95%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.modal-left {
  flex: 1;
  background-color: #fcece8;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.modal-right {
  flex: 1;
  padding: 40px;
}

@media (max-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
  .thumbnail-strip {
    flex-direction: row;
    order: 2;
  }
  .cart-sidebar {
    width: 100%;
  }
  .split-modal {
    flex-direction: column;
  }
  .modal-left {
    display: none;
  }
}
