/* shop page  CSS */
/* ================= BASE STYLES ================= */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #0f172a;
  --accent-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text-primary);
  background: var(--light-bg);
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ================= HEADER ================= */
.header {
  background: black;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1001;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.9;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

/* ================= SEARCH CONTAINER ================= */
/* Desktop Search - Default */
.search-container {
  flex: 1;
  max-width: 600px;
  margin: 0 2rem;
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  z-index: 1;
}

.search-container input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  transition: var(--transition);
  background: white;
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* DESKTOP: Search button inside input */
.search-btn {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.5rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  z-index: 2;
}

.search-btn:hover {
  background: var(--primary-dark);
}

/* Mobile search toggle button */
.mobile-search-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: var(--transition);
  z-index: 1001;
}

.mobile-search-toggle:hover {
  color: #cbd5e1;
}

/* Mobile close button */
.mobile-search-close {
  display: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.mobile-search-close:hover {
  background: #f1f5f9;
  color: var(--danger-color);
}

/* Button group for mobile search */
.button-group {
  display: none;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  z-index: 1001;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.action-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.action-item i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.action-text {
  font-size: 0.75rem;
  font-weight: 500;
}

.cart-container {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background: var(--danger-color);
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 50%;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

/* Breadcrumb */
.breadcrumb {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: white;
}

.separator {
  color: #94a3b8;
  margin: 0 0.5rem;
}

.current {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ================= PAGE HEADER ================= */
.page-header {
  background: white;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: black;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header h1 i {
  color: black;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.results-info span {
  font-weight: 500;
  color: var(--text-primary);
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-container label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.sort-container select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.sort-container select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* ================= SHOP LAYOUT ================= */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1rem;
  position: relative;
}

/* Filter Sidebar */
.filter-sidebar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 120px;
  box-shadow: var(--shadow-md);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.filter-header h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-filters {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.clear-filters:hover {
  background: var(--light-bg);
  text-decoration: underline;
}

.filter-section {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 1rem;
}

.filter-title h4 {
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-title i {
  transition: var(--transition);
  color: var(--text-secondary);
}

.filter-options {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  cursor: pointer;
  transition: var(--transition);
}

.filter-option:hover {
  background: var(--light-bg);
  padding-left: 0.5rem;
  border-radius: var(--radius-sm);
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  accent-color: var(--primary-color);
}

.filter-option span:not(.count) {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.count {
  color: var(--text-secondary);
  font-size: 0.75rem;
  background: var(--light-bg);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}

/* Price Range */
.price-slider-container {
  margin-top: 1rem;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.price-inputs input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.875rem;
}

.price-inputs input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.price-inputs span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.price-display {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.5rem;
  background: var(--light-bg);
  border-radius: var(--radius-sm);
}

/* Mobile Filter Toggle - Only visible on mobile */
.mobile-filter-toggle {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  z-index: 900;
  box-shadow: var(--shadow-lg);
  align-items: center;
  gap: 0.5rem;
}

.active-filter-count {
  background: white;
  color: var(--primary-color);
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 50%;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* ================= PRODUCTS GRID ================= */
.products-section {
  position: relative;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}

.product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--light-bg);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .product-actions {
  opacity: 1;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.action-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.product-info {
  padding: 1.25rem;
}

.product-brand {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  height: 2.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rating-stars {
  color: var(--warning-color);
  display: flex;
  gap: 0.1rem;
}

.rating-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rating-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.product-price {
  margin-bottom: 1rem;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.original-price {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.discount-badge {
  background: #dcfce7;
  color: var(--accent-color);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.product-features {
  list-style: none;
  margin-bottom: 1rem;
}

.product-features li {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.product-features li i {
  color: var(--accent-color);
  font-size: 0.6rem;
}

.product-warranty {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding: 4px 8px;
  background: #f0f9ff;
  border-radius: 4px;
  border-left: 3px solid var(--primary-color);
}

.product-warranty i {
  color: var(--primary-color);
  font-size: 14px;
}

.add-to-cart-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-to-cart-btn:hover {
  background: var(--primary-dark);
}

.add-to-cart-btn.added {
  background: var(--accent-color);
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}

.no-results i {
  color: var(--border-color);
  margin-bottom: 1rem;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.no-results p {
  margin-bottom: 1.5rem;
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* ================= PAGINATION / LOAD MORE ================= */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
}

.load-more-btn {
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 200px;
  justify-content: center;
}

.load-more-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.load-more-btn.loading i {
  animation: spin 1s linear infinite;
}

.page-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

.page-info span {
  font-weight: 600;
  color: var(--primary-color);
}

/* ================= LOADING STATES ================= */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.loading-content .spinner {
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
}

/* Products loaded animation */
.product-card {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for product cards */
.products-grid .product-card:nth-child(odd) {
  animation-delay: 0.1s;
}

.products-grid .product-card:nth-child(even) {
  animation-delay: 0.2s;
}

/* ================= FOOTER ================= */
.footer {
  background: black;
  color: white;
  margin-top: 3rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 1rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.link-column h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: white;
}

.link-column a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.link-column a:hover {
  color: white;
  transform: translateX(4px);
}

.footer-contact h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: white;
}

.footer-contact p {
  color: #cbd5e1;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
  color: #94a3b8;
  font-size: 0.875rem;
}

.copyright p:first-child {
  margin-bottom: 0.25rem;
}

.payment-methods {
  display: flex;
  gap: 1rem;
  font-size: 1.5rem;
  color: #94a3b8;
}

/* ================= MODAL ================= */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--danger-color);
}

/* Quick View Styles */
.quick-view-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.quick-view-image img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.quick-view-details h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.product-specs h4 {
  margin: 1rem 0 0.5rem 0;
  color: var(--text-primary);
}

.product-specs ul {
  list-style: none;
  padding-left: 0;
}

.product-specs li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-specs li i {
  color: var(--accent-color);
  font-size: 0.75rem;
}

.product-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.highlight {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--light-bg);
  border-radius: var(--radius-md);
}

.highlight i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.highlight strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.highlight span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.quick-view-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.best-deal {
  background: var(--danger-color) !important;
}

/* Scroll to Top */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 1024px) {
  .shop-layout {
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-links {
    grid-column: span 2;
  }
  
  .quick-view-content {
    grid-template-columns: 1fr;
  }
  
  .quick-view-image img {
    height: 300px;
  }
}

@media (max-width: 768px) {
  /* Header adjustments for mobile */
  .header-container {
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0.75rem 1rem;
  }
  
  /* Show mobile search toggle */
  .mobile-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    margin-right: 1rem;
  }
  
  /* Hide desktop search container by default */
  .search-container {
    display: none;
  }
  
  /* Mobile search container when active */
  .search-container.mobile-open {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: white;
    z-index: 1100;
    margin: 0;
    padding: 1rem;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    align-items: center;
    gap: 0.5rem;
    animation: slideInDown 0.3s ease-out forwards;
  }
  
  /* Search wrapper */
  .search-container.mobile-open .search-wrapper {
    flex: 1;
    position: relative;
  }
  
  /* Search input in mobile mode */
  .search-container.mobile-open input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    font-size: 16px;
    height: 48px;
  }
  
  /* Mobile search icon */
  .search-container.mobile-open .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    z-index: 1;
  }
  
  /* Show mobile close button */
  .search-container.mobile-open .mobile-search-close {
    display: flex;
  }
  
  /* Hide desktop search button in mobile */
  .search-container.mobile-open .search-btn {
    display: none;
  }
  
  /* Show button group for mobile */
  .search-container.mobile-open .button-group {
    display: flex;
    align-items: center;
    margin-left: auto;
  }
  
  /* Mobile search button in right corner */
  .search-container.mobile-open .button-group .search-btn {
    display: flex;
    position: static;
    transform: none;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    height: 48px;
    white-space: nowrap;
  }
  
  .search-container.mobile-open .button-group .search-btn:hover {
    background: var(--primary-dark);
  }
  
  /* Hide header actions when search is open */
  .search-container.mobile-open ~ .header-actions {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  /* Hide logo when search is open */
  .search-container.mobile-open ~ .logo {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  /* Hide mobile search toggle when search is open */
  .search-container.mobile-open ~ .mobile-search-toggle {
    opacity: 0;
    visibility: hidden;
  }
  
  /* Shop layout */
  .shop-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .filter-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    border-radius: 0;
    overflow-y: auto;
  }
  
  .filter-sidebar.active {
    display: block;
  }
  
  .mobile-filter-toggle {
    display: flex;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  /* Header actions */
  .header-actions {
    position: static;
    display: flex;
    gap: 1rem;
  }
  
  .action-text {
    display: none;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    grid-column: 1;
  }
  
  .quick-view-actions {
    flex-direction: column;
  }
  
  .product-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .modal-content {
    width: 95%;
    padding: 1rem;
  }
  
  /* Mobile search adjustments */
  .search-container.mobile-open {
    padding: 0.75rem;
    height: 65px;
  }
  
  .search-container.mobile-open input {
    height: 44px;
    font-size: 14px;
    padding: 0.5rem 1rem 0.5rem 2.75rem;
  }
  
  .search-container.mobile-open .button-group .search-btn {
    padding: 0.5rem 1rem;
    height: 44px;
    font-size: 14px;
  }
  
  .search-container.mobile-open .search-icon {
    left: 0.75rem;
    font-size: 1rem;
  }
  
  .search-container.mobile-open .mobile-search-close {
    right: 0.75rem;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .mobile-search-toggle {
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
  }
  
  .logo img {
    height: 36px;
  }
}

/* ================= MOBILE SEARCH ANIMATIONS ================= */
@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Search overlay */
.search-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100% - 70px);
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  display: none;
}

.search-overlay.active {
  display: block;
  animation: fadeIn 0.3s ease-out forwards;
}

.search-overlay.closing {
  animation: fadeOut 0.3s ease-out forwards;
}

/* Closing animation for mobile search */
.search-container.mobile-closing {
  animation: slideOutUp 0.3s ease-out forwards;
}

/* Very small screens */
@media (max-width: 360px) {
  .search-container.mobile-open .button-group .search-btn {
    padding: 0.5rem 0.75rem;
    font-size: 13px;
  }
  
  .search-container.mobile-open input {
    padding-right: 8.5rem;
  }
  
  .logo img {
    height: 32px;
  }
}
