/* ============================================================================
   GiftCorp Styles
   ============================================================================ */

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

:root {
  --primary-color: #1a8a5c;
  --secondary-color: #ff6b35;
  --success-color: #4caf50;
  --danger-color: #f44336;
  --warning-color: #ff9800;
  --info-color: #2196f3;
  --light-bg: #f8f9fa;
  --border-color: #e0e0e0;
  --text-color: #333;
  --text-light: #666;
  --text-lighter: #999;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-color);
  background-color: #fff;
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0f5a3f;
}

button {
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-1px);
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */

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

.top-bar {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  font-size: 0.9rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.top-bar-left {
  display: flex;
  gap: 2rem;
}

.top-bar-right {
  display: flex;
  gap: 1.5rem;
}

.top-bar a {
  color: var(--text-light);
}

.top-bar a:hover {
  color: var(--primary-color);
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

.header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.8rem;
}

.logo span {
  color: var(--secondary-color);
}

.search-bar {
  flex: 1;
  display: flex;
  max-width: 500px;
  background: var(--light-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.search-bar input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--primary-color);
}

.search-bar button {
  background: var(--primary-color);
  border: none;
  color: white;
  padding: 0 1rem;
  font-size: 1.1rem;
}

.search-bar button:hover {
  background: #0f5a3f;
}

.header-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.header-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  position: relative;
  padding: 0.5rem 0;
}

.header-action i {
  font-size: 1.3rem;
  display: block;
}

.header-action span {
  font-size: 0.9rem;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav {
  border-top: 1px solid var(--border-color);
}

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

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  width: 100%;
}

.nav-item {
  position: relative;
  flex: 1;
}

.nav-item > a {
  display: block;
  padding: 1rem;
  color: var(--text-color);
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-item.active > a {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.nav-item:hover > a {
  background: var(--light-bg);
  color: var(--primary-color);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.nav-item:hover .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.nav-dropdown a:last-child {
  border-bottom: none;
}

.nav-dropdown a:hover {
  background: var(--light-bg);
  color: var(--primary-color);
  padding-left: 1.5rem;
}

/* ============================================================================
   PAGE HEADER
   ============================================================================ */

.page-header {
  background: linear-gradient(135deg, var(--primary-color), #0f5a3f);
  color: white;
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.page-header .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.6);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
}

/* ============================================================================
   SHOP LAYOUT
   ============================================================================ */

.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.filter-group {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.filter-group h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.filter-option input {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.filter-option .count {
  margin-left: auto;
  color: var(--text-lighter);
  font-size: 0.85rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-range input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* ============================================================================
   PRODUCTS GRID
   ============================================================================ */

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--light-bg);
  border-radius: 8px;
}

.shop-results {
  font-size: 0.9rem;
  color: var(--text-light);
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.shop-sort select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.product-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--light-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.product-label {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.product-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-rating {
  font-size: 0.8rem;
  color: #ff6b35;
  margin-bottom: 0.5rem;
}

.product-info h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-model {
  font-size: 0.75rem;
  color: var(--text-lighter);
  margin-bottom: 0.5rem;
}

.product-colors {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  display: inline-block;
}

.color-more {
  color: var(--text-lighter);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

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

.product-actions {
  display: flex;
  gap: 0.5rem;
}

.product-actions button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.product-actions button:hover {
  border-color: var(--primary-color);
  background: var(--light-bg);
}

.product-actions .wishlist-btn.active {
  background: #ffe6e6;
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: white;
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.page-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #0f5a3f;
  box-shadow: 0 4px 12px rgba(26, 138, 92, 0.3);
}

.btn-secondary {
  background: white;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background: var(--light-bg);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #e53935;
}

/* ============================================================================
   MODAL
   ============================================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.modal {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--light-bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  background: var(--border-color);
}

.modal-body {
  padding: 2rem;
}

/* ============================================================================
   CART DRAWER
   ============================================================================ */

.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
}

.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 400px;
  background: white;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  z-index: 1000;
}

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

.cart-drawer-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

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

.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ============================================================================
   NEWSLETTER
   ============================================================================ */

.newsletter {
  background: linear-gradient(135deg, var(--primary-color), #0f5a3f);
  color: white;
  padding: 4rem 0;
  margin: 4rem 0;
}

.newsletter-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.newsletter-content h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.newsletter-content p {
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: 8px;
  flex: 1;
  max-width: 400px;
}

.newsletter-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem;
  color: white;
  font-family: 'Inter', sans-serif;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-form button {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.newsletter-form button:hover {
  background: #e65a25;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 1rem;
  font-size: 1.3rem;
}

.footer-column h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

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

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: #ccc;
  font-size: 0.9rem;
}

.footer-column a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-payments {
  display: flex;
  gap: 1rem;
}

.payment-icon {
  background: #333;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================================================
   BACK TO TOP
   ============================================================================ */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(26, 138, 92, 0.3);
  z-index: 100;
}

.back-to-top:hover {
  background: #0f5a3f;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes slideIn {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100px);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .top-bar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .top-bar-left,
  .top-bar-right {
    width: 100%;
    justify-content: center;
  }

  .header-main {
    flex-wrap: wrap;
  }

  .search-bar {
    max-width: 100%;
    order: 3;
    flex-basis: 100%;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
  }

  .nav-item {
    width: 100%;
    flex: none;
  }

  .nav {
    display: none;
  }

  .nav.active {
    display: block;
  }

  .nav-item > a {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--primary-color);
    border-radius: 0;
  }

  .nav-item:hover .nav-dropdown {
    display: none;
  }

  .nav-dropdown.active {
    display: block;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .newsletter-inner {
    flex-direction: column;
  }

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

  .cart-drawer {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-payments {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .header-actions {
    gap: 1rem;
  }

  .header-action span {
    display: none;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    border-radius: 4px;
  }

  .modal {
    max-height: 100vh;
    border-radius: 0;
  }

  .newsletter-content h3 {
    font-size: 1.3rem;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    bottom: 1rem;
    right: 1rem;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-primary {
  background: var(--primary-color);
  color: white;
}

.badge-secondary {
  background: var(--secondary-color);
  color: white;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
