/*-----------------------------------*\
  #SHOP PAGE STYLES
\*-----------------------------------*/

/* Shop Hero Section */
.shop-hero {
  padding: 120px 0 60px;
  background: #FEBA59;
  text-align: center;
  color: var(--white);
  margin-top: 0;
  position: relative;
  z-index: 1;
}

body .header:not(.active) {
  background: transparent;
}

@media (max-width: 768px) {
  /* No override for header background */
}

@media (max-width: 992px) {
  .shop-hero {
    padding-top: 180px !important;
  }
  body .header {
    background: #fff !important;
  }
}

/* Responsive navbar positioning for shop page */
@media (max-width: 992px) {
  .navbar {
    top: 105px;
    display: flex;
    flex-direction: column;
    z-index: 10; /* Ensure navbar is above product cards */
  }
  
  .navbar-list {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 85px;
    display: flex;
    flex-direction: column;
    z-index: 10; /* Ensure navbar is above product cards */
  }
  
  .navbar-list {
    flex: 1;
  }
  
  /* Ensure product cards don't overlap with navbar */
  .product-card {
    position: relative;
    z-index: 1;
  }
  
  .product-card .card-action-btn {
    z-index: 2; /* Keep button above card but below navbar */
  }
}

@media (max-width: 768px) {
  .shop-hero {
    padding-top: 130px !important;
  }
}

.shop-title {
  font-family: var(--ff-bangers);
  font-size: 4rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.shop-subtitle {
  font-size: 1.8rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Shop Filters Section */
.shop-filters {
  padding: 50px 0;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.shop-filters::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FEBA59, var(--theme-accent));
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 450px;
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  border: 2px solid transparent;
  border-radius: 30px;
  font-size: 1.5rem;
  background: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #FEBA59;
  box-shadow: 0 6px 20px rgba(254, 186, 89, 0.2);
  transform: translateY(-2px);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #FEBA59;
  transition: var(--transition-1);
}

.search-input:focus + .search-icon {
  color: var(--theme-accent);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--white);
  padding: 15px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.filter-btn {
  padding: 12px 24px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: var(--eerie-black);
  border-radius: 20px;
  font-weight: var(--fw-700);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--theme-accent);
  transition: left 0.3s ease;
  z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
  left: 0;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 186, 89, 0.3);
}

.sort-dropdown {
  min-width: 220px;
  position: center;
}

.sort-select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid transparent;
  border-radius: 15px;
  font-size: 1.4rem;
  background: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 45px;
}

.sort-select:focus {
  outline: none;
  border-color: #FEBA59;
  box-shadow: 0 6px 20px rgba(254, 186, 89, 0.2);
  transform: translateY(-2px);
}

.sort-select:hover {
  border-color: var(--theme-accent);
}

.stock-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--light-gray);
  color: var(--eerie-black);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.stock-filter-btn:hover,
.stock-filter-btn.active {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 186, 89, 0.3);
}

.stock-filter-btn ion-icon {
  font-size: 1.6rem;
}

/* Products Grid */
.products-grid {
  padding-top: 0px;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 30px;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, 242px);
  gap: 15px;
  margin-bottom: 50px;
  justify-content: center;
}

.product-card {
  background-color: var(--white);
  border-radius: var(--radius-10);
  box-shadow: var(--shadow-1);
  transition: var(--transition-2);
  overflow: hidden;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-card .card-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-10) var(--radius-10) 0 0;
}

.product-card .img-cover.default {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.product-card .img-cover {
  transition: var(--transition-2);
  background-color: var(--white);
}

.product-card .img-cover.hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.product-card:hover .img-cover.hover {
  opacity: 1;
}

.product-card:hover .img-cover.default {
  opacity: 0;
}

/* Ensure the card banner has proper positioning for absolute elements */
.product-card .card-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-10) var(--radius-10) 0 0;
}

.product-card .card-action-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--theme-accent);
  border: 1px solid var(--theme-accent);
  padding: 12px;
  border-radius: 50%;
  font-size: 1.8rem;
  color: var(--white);
  opacity: 1;
  transform: translateY(0);
  transition: var(--transition-2);
  display: block !important;
  z-index: 10;
}

/* Desktop hover behavior */
@media (min-width: 769px) {
  .product-card .card-action-btn {
    opacity: 0;
    transform: translateY(-10px);
    background-color: var(--white);
    border-color: var(--platinum);
    color: var(--eerie-black);
  }
  
  .product-card:hover .card-action-btn {
    opacity: 1;
    transform: translateY(0);
  }
  
  .product-card .card-action-btn:hover {
    background-color: var(--theme-accent);
    border-color: var(--theme-accent);
    color: var(--white);
  }
}



@media (max-width: 768px) {
  .product-card .card-action-btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background-color: var(--theme-accent) !important;
    color: var(--white) !important;
    border-color: var(--theme-accent) !important;
  }
  
  .product-card .card-action-btn:hover {
    background-color: var(--black) !important;
    color: var(--theme-accent) !important;
  }
}

/* Ensure buttons are visible on all mobile sizes */
@media (max-width: 480px) {
  .product-card .card-action-btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background-color: var(--theme-accent) !important;
    color: var(--white) !important;
    border-color: var(--theme-accent) !important;
    font-size: 2rem !important;
    padding: 15px !important;
  }
  
  .product-card .card-action-btn:hover {
    background-color: var(--black) !important;
    color: var(--theme-accent) !important;
  }
}

/* Force visibility on any screen smaller than desktop */
@media (max-width: 1200px) {
  .product-card .card-action-btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background-color: var(--theme-accent) !important;
    color: var(--white) !important;
    border-color: var(--theme-accent) !important;
  }
  
  .product-card .card-action-btn:hover {
    background-color: var(--black) !important;
    color: var(--theme-accent) !important;
  }
}

.product-card .card-content {
  padding: 20px;
  text-align: center;
}

.product-card .wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  color: var(--silver-chalice);
  font-size: var(--fs-7);
  margin-bottom: 8px;
}

.product-card .rating-wrapper {
  display: flex;
  color: var(--amber);
  gap: 2px;
}

.product-card .card-title {
  font-size: 1.6rem;
  margin-bottom: 5px;
  transition: var(--transition-1);
}

.product-card .card-title:hover {
  color: var(--theme-accent);
}

.product-card .card-category {
  color: var(--spanish-gray);
  font-size: 1.2rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card .card-price {
  color: var(--theme-accent);
  font-size: 1.8rem;
  font-weight: var(--fw-700);
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 40px;
}

.load-more-btn {
  padding: 15px 40px;
  font-size: 1.6rem;
  background-color: var(--theme-accent);
  color: var(--white);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-1);
}

.load-more-btn:hover {
  background-color: var(--black);
  transform: translateY(-2px);
}

/* Active navbar link for shop page */
.navbar-link.active {
  color: var(--theme-accent) !important;
  font-weight: var(--fw-700);
}

/* Hover effect for navbar links on shop page */
.navbar-link:is(:hover, :focus) {
  color: var(--theme-accent) !important;
}

/* Hidden products for load more functionality */
.product-card.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .shop-title {
    font-size: 3rem;
  }
  
  .shop-subtitle {
    font-size: 1.6rem;
  }
  
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  
  .search-box {
    max-width: 100%;
  }
  
  .filter-buttons {
    justify-content: center;
    padding: 12px;
  }
  
  .filter-btn {
    font-size: 1.2rem;
    padding: 10px 20px;
  }
  
  .products-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .shop-hero {
    padding: 100px 0 40px;
  }
  
  .shop-title {
    font-size: 2.5rem;
  }
  
  .products-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-content: center;
  }
  
  .filter-buttons {
    display: none; /* Hide bulky buttons on very small screens */
  }
  
  .filter-btn {
    width: 100%;
    text-align: center;
  }
}

/* Mobile filter dropdown */
.mobile-filter-select {
  display: none;
}

@media (max-width: 480px) {
  .mobile-filter-select {
    display: block;
    width: 100%;
  }
  .mobile-filter-select select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: 15px;
    font-size: 1.4rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 45px;
  }
  .mobile-filter-select select:focus {
    outline: none;
    border-color: #FEBA59;
    box-shadow: 0 6px 20px rgba(254, 186, 89, 0.2);
    transform: translateY(-2px);
  }
}

/* Animation for filtered products */
.product-card.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.product-card.fade-out {
  animation: fadeOut 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* No results message */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--spanish-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  width: 100%;
  grid-column: 1 / -1;
  justify-self: center;
}

.no-results h3 {
  font-size: 2.4rem;
  margin-bottom: 15px;
  color: var(--eerie-black);
}

.no-results p {
  font-size: 1.6rem;
  margin-bottom: 25px;
}

.no-results .btn {
  display: inline-block;
}

/* Keep clear button text white on hover in no-results state */
.no-results .btn:hover,
.no-results .btn:focus {
  color: var(--white) !important;
}

/* Shop Loading Section */
.loading-section {
  text-align: center;
  padding: 60px 0;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-loading {
  text-align: center;
  padding: 60px 40px;
  background: var(--white);
  border-radius: var(--radius-10);
  box-shadow: var(--shadow-1);
  min-height: 200px;
  max-width: 500px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shop-loading .loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--theme-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite !important;
  margin: 0 auto 30px;
  display: block;
  position: relative;
}

.shop-loading p {
  color: var(--spanish-gray);
  font-size: 2.4rem;
  margin: 0;
  white-space: nowrap;
  font-weight: 600;
} 

/* Shop page add to cart button loading states */
.product-card .card-action-btn.loading {
  pointer-events: none;
  background-color: var(--theme-accent) !important;
  color: var(--white) !important;
  border-color: var(--theme-accent) !important;
}

.product-card .card-action-btn.loading ion-icon {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Ensure shop page buttons are always visible */
.product-card .card-action-btn {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

/*-----------------------------------*\
  #FILTER NOT FOUND MESSAGE
\*-----------------------------------*/

.filter-not-found-message {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--radius-10);
  padding: 10px 14px;
  margin: 10px 0 10px auto;
  display: block;
  align-items: center;
  justify-content: flex-start;
  box-shadow: var(--shadow-1);
  width: fit-content;
  max-width: 100%;
}

.filter-not-found-message .message-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
}

.filter-not-found-message ion-icon {
  font-size: 2rem;
  color: #856404;
}

.filter-not-found-message span {
  color: #856404;
  font-size: 1.4rem;
  font-weight: 500;
  white-space: nowrap;
}

.filter-not-found-message .close-btn {
  background: none;
  border: none;
  color: #856404;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-1);
}

.filter-not-found-message .close-btn:hover {
  background: rgba(133, 100, 4, 0.1);
}

.filter-not-found-message .close-btn ion-icon {
  font-size: 1.6rem;
} 