/* TOS Webcommerce Styles */

/* Import GlideJS styles */
@import url('glide.core.min.css');
@import url('glide.theme.min.css');

/* Global variables that will be set from settings */
:root {
  --webcommerce-primary: #007bff;
  --webcommerce-secondary: #6c757d;
  --webcommerce-success: #28a745;
  --webcommerce-danger: #dc3545;
  --webcommerce-warning: #ffc107;
  --webcommerce-info: #17a2b8;
  --webcommerce-light: #f8f9fa;
  --webcommerce-dark: #343a40;

  /* Alias for footer and navbar consistency */
  --primary-color: var(--webcommerce-primary);
  --secondary-color: var(--webcommerce-secondary);
}

/* Banner Carousel Customizations */
.webcommerce-shop .glide {
  position: relative;
}

.webcommerce-shop .banner-slide {
  position: relative;
  overflow: hidden;
}

.webcommerce-shop .banner-content {
  background: rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

.webcommerce-shop .banner-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.webcommerce-shop .banner-subtitle {
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Glide arrow customizations */
.glide__arrow {
  background: rgba(0, 0, 0, 0.6) !important;
  border: none !important;
  color: white !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  transition: all 0.3s ease !important;
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  font-weight: bold !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.glide__arrow--left {
  left: 20px !important;
}

.glide__arrow--right {
  right: 20px !important;
}

.glide__arrow:hover {
  background: rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
}

.glide__arrow:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
}

.glide__arrow:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Glide bullets customizations */
.glide__bullets {
  bottom: 20px !important;
}

.glide__bullet {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.5) !important;
  border: none !important;
  margin: 0 4px;
  transition: all 0.3s ease;
}

.glide__bullet:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  transform: scale(1.2);
}

.glide__bullet--active {
  background: white !important;
  transform: scale(1.3);
}

/* Product Cards */
.product-card .card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-card .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1) !important;
}

.product-image {
  border-radius: 12px 12px 0 0;
  transition: transform 0.3s ease;
}

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

.product-image-placeholder {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.product-name a {
  font-weight: 600;
  transition: color 0.3s ease;
}

.stock-badge {
  z-index: 2;
}

.product-actions .btn {
  transition: all 0.3s ease;
  font-weight: 500;
}

.product-actions .btn:hover {
  transform: translateY(-2px);
}

.add-to-cart-btn.btn-primary {
  background-color: var(--webcommerce-primary, #007bff) !important;
  border-color: var(--webcommerce-primary, #007bff) !important;
}

.add-to-cart-btn.btn-primary:hover,
.add-to-cart-btn.btn-primary:focus,
.add-to-cart-btn.btn-primary:active {
  background-color: var(--webcommerce-primary, #007bff) !important;
  border-color: var(--webcommerce-primary, #007bff) !important;
  filter: brightness(0.9);
}

.product-brand {
  height: 1.2rem;
  line-height: 1.2rem;
}

.product-name {
  height: 2.5rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-rating {
  height: 1.5rem;
  display: flex;
  align-items: center;
}

.flash-sale-banner {
  background: linear-gradient(135deg, #dc3545, #fd7e14) !important;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(220, 53, 69, 0.3);
}

.countdown-timer .countdown-item {
  margin: 0 1rem;
}

.countdown-number {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  font-family: 'Courier New', monospace;
  backdrop-filter: blur(5px);
}

/* Modern Filter Sidebar Styling */
.filters-sidebar {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 20px;
}

.filter-section {
  margin-bottom: 2rem;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f8f9fa;
}

.filter-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Search Input Styling */
.search-form {
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  padding-right: 3rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.search-input:focus {
  outline: none;
  border-color: var(--webcommerce-primary, #007bff);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-btn {
  background: linear-gradient(45deg, var(--webcommerce-primary, #007bff), #0056b3);
  border: 2px solid var(--webcommerce-primary, #007bff);
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: linear-gradient(45deg, #0056b3, #004085);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Category List Styling */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: #6c757d;
  background: #f8f9fa;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.category-item:hover {
  color: var(--webcommerce-primary, #007bff);
  background: rgba(0, 123, 255, 0.05);
  border-color: rgba(0, 123, 255, 0.1);
  transform: translateX(4px);
  text-decoration: none;
}

.category-item.active {
  background: linear-gradient(45deg, var(--webcommerce-primary, #007bff), #0056b3);
  color: white;
  border-color: var(--webcommerce-primary, #007bff);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.category-item.active .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.category-name {
  flex: 1;
}

.category-count {
  background: #e9ecef;
  color: #6c757d;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.filters-sidebar .list-group-item {
  border: none;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.filters-sidebar .list-group-item:hover {
  background-color: var(--webcommerce-light);
  transform: translateX(5px);
}

.filters-sidebar .list-group-item.active {
  background-color: var(--webcommerce-primary);
  border-color: var(--webcommerce-primary);
}

.about-hero {
  background: linear-gradient(135deg, var(--webcommerce-light), #ffffff);
}

.about-card {
  border-radius: 12px;
  transition: all 0.3s ease;
}

.about-card:hover {
  border-color: var(--webcommerce-primary) !important;
}

.about-icon {
  width: 60px;
  height: 60px;
  background: var(--webcommerce-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item {
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-10px);
}

.feature-icon {
  transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
  transform: scale(1.1);
}

.stats-section {
  border-radius: 15px;
  background: linear-gradient(135deg, var(--webcommerce-primary), var(--webcommerce-secondary)) !important;
}

.stat-item {
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .banner-title {
    font-size: 1.8rem !important;
  }

  .banner-subtitle {
    font-size: 1rem !important;
  }

  .banner-content {
    padding: 1rem !important;
  }

  .countdown-timer .countdown-item {
    margin: 0 0.5rem;
  }

  .countdown-number {
    font-size: 1.5rem !important;
    padding: 0.3rem 0.6rem;
  }

  .product-card .card:hover {
    transform: none;
  }

  .about-card:hover,
  .feature-item:hover,
  .stat-item:hover {
    transform: none;
  }

  .filters-sidebar {
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .filter-section {
    margin-bottom: 1.5rem;
  }

  .search-input, .search-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .category-item {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .filter-title {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .glide__arrow {
    width: 36px !important;
    height: 36px !important;
  }

  .banner-content {
    left: 1rem !important;
    right: 1rem !important;
    transform: translateY(-50%) !important;
  }
}

@media (prefers-color-scheme: dark) {
  .product-card .card {
    background-color: #2d3748;
    color: white;
  }

  .about-card {
    background-color: #2d3748 !important;
    color: white;
  }

  .filters-sidebar .list-group-item {
    background-color: #2d3748;
    color: white;
  }
}

/* Custom button styles */
.btn-webcommerce-primary {
  background-color: var(--webcommerce-primary);
  border-color: var(--webcommerce-primary);
  color: white;
}

.btn-webcommerce-primary:hover {
  background-color: var(--webcommerce-primary);
  border-color: var(--webcommerce-primary);
  opacity: 0.9;
  transform: translateY(-2px);
}

.webcommerce-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bg-webcommerce-primary { background-color: var(--webcommerce-primary) !important; }
.bg-webcommerce-secondary { background-color: var(--webcommerce-secondary) !important; }
.text-webcommerce-primary { color: var(--webcommerce-primary) !important; }
.text-webcommerce-secondary { color: var(--webcommerce-secondary) !important; }

.alert-webcommerce {
  border-radius: 8px;
  border: none;
  font-weight: 500;
}

.form-control:focus {
  border-color: var(--webcommerce-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}