/*-----------------------------------*\
  #COLLECTIONS PAGE STYLES
\*-----------------------------------*/

/* (Revert) Do not globally zero out main/article spacing */

/* Collections Hero Section */
.collections-hero {
  /* Restore original hero padding */
  padding: 120px 0 60px;
  background: #FEBA59;
  text-align: center;
  color: var(--white);
  position: relative;
  margin: 0;
  margin-bottom: -30px !important; /* pull next section up to meet separator */
  z-index: 1;
}

/* Remove any spacing after hero */
/* Do not force-remove spacing after hero globally */

/* Do not globally zero out all sections to avoid breaking other pages */

/* Remove spacing from featured collections section specifically */
#featured-collections {
  margin: 0 !important;
  padding: 0 !important; 
}

/* Remove tiny white gap under hero separator */
#featured-collections { margin-top: -4px !important; }

#featured-collections.section {
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove any potential spacing from the first collection */
.collection-section:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Do not zero out spacing for all main children */

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

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

@media (max-width: 768px) {
  .collections-hero {
    padding: 80px 0 40px;
    margin: 0;
  }
}

/* Fading separation line */
.collections-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FEBA59, var(--theme-accent));
}

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

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

/* Loading Spinner */
.collections-loading {
  text-align: center;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--theme-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.collections-loading p {
  font-size: 1.8rem;
  color: var(--spanish-gray);
  font-weight: 500;
  margin: 0;
  background: white;
  padding: 30px 40px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  width: fit-content;
  max-width: 90%;
  text-align: center;
  display: inline-block;
}

/* Put spinner inside the card */
.collections-loading .loading-card {
  background: white;
  padding: 40px 50px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 90%;
}

.collections-loading .loading-card .loading-spinner {
  margin-bottom: 20px;
}

.collections-loading .loading-card p {
  background: transparent;
  padding: 0;
  box-shadow: none;
  border: none;
  margin: 0;
}

/* Featured Collections Container */
.collections-container {
  width: 100%;
  display: block !important;
  min-height: 200px;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 1;
  margin: 0 !important;
  padding: 0 !important;
}

/* Collection Section */
.collection-section {
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  width: 100%;
  min-height: 200px;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 1;
}

.collection-section:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.collection-section .container {
  padding: 80px 0;
  margin: 0 !important;
}

.collection-section:nth-child(odd) {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.collection-section:nth-child(even) {
  background: var(--white);
}

/* Collection Headers */
.collection-header,
.custom-header {
  text-align: center;
  margin-bottom: 50px;
}

.collection-title,
.custom-title {
  margin-bottom: 20px;
}

.collection-title .span,
.custom-title .span {
  color: var(--theme-accent);
}

.collection-description,
.custom-description {
  font-size: 1.6rem;
  color: var(--spanish-gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Collection Grid */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 242px);
  gap: 15px;
  margin-bottom: 50px;
  justify-content: center;
  min-height: 200px;
  visibility: visible !important;
  opacity: 1 !important;
}

.collection-card {
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.collection-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: var(--theme-accent);
}

.collection-card.featured {
  grid-column: span 1;
}

.collection-card .card-banner {
  position: relative;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  aspect-ratio: 1;
}

.collection-card .img-cover {
  transition: var(--transition-2);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background-color: var(--white);
}

.collection-card:hover .img-cover {
  transform: scale(1.05);
}

.collection-card .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: var(--transition-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.collection-card:hover .card-overlay {
  opacity: 1;
}

.collection-card .card-action-btn {
  background-color: var(--theme-accent);
  color: var(--white);
  border: none;
  padding: 16px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-1);
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.collection-card .card-action-btn ion-icon {
  font-size: inherit;
}

.collection-card:hover .card-action-btn {
  transform: scale(1);
}

.collection-card .card-action-btn:hover {
  background-color: var(--black);
  color: var(--theme-accent);
}

/* Loading state for add to cart button */
.collection-card .card-action-btn.loading {
  background-color: var(--spanish-gray);
  cursor: not-allowed;
  pointer-events: none;
}

.collection-card .card-action-btn.loading ion-icon {
  animation: spin 1s linear infinite;
}

.collection-card .card-action-btn.success {
  background-color: var(--black);
  color: var(--theme-accent);
}

/* Error and success message styles */
.message {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1000;
  max-width: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
}

.message-success {
  background: var(--theme-accent);
  color: white;
  border-left: 4px solid #28a745;
}

.message-error {
  background: #dc3545;
  color: white;
  border-left: 4px solid #c82333;
}

.message-info {
  background: #17a2b8;
  color: white;
  border-left: 4px solid #138496;
}

/* No collections/products states */
.no-collections,
.no-products {
  text-align: center;
  padding: 60px 0;
  color: var(--spanish-gray);
}

.no-collections h3,
.no-products h3 {
  margin-bottom: 15px;
  color: var(--eerie-black);
  font-size: 2rem;
}

.no-collections p,
.no-products p {
  font-size: 1.6rem;
  opacity: 0.8;
}

/* Enhanced card hover effects */
.collection-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.collection-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.collection-card:hover::before {
  left: 100%;
}

.collection-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: var(--theme-accent);
}

/* Enhanced button animations */
.card-action-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-action-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.card-action-btn.loading {
  transform: scale(0.9);
}

.card-action-btn.success {
  transform: scale(1.05);
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1.05); }
  50% { transform: scale(1.1); }
}

/* Collection section transitions */
.collection-section {
  transition: all 0.6s ease-out;
  opacity: 0;
  transform: translateY(30px);
}

.collection-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced loading spinner */
.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--theme-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.collections-loading p {
  font-size: 1.8rem;
  color: var(--spanish-gray);
  font-weight: 500;
  margin-top: 20px;
}

/* Collection Card Content */
.collection-card .card-content {
  padding: 15px;
  text-align: center;
  background: linear-gradient(135deg, #fafafa, #f5f5f5);
}

.collection-card .card-title {
  font-size: 1.4rem;
  margin-bottom: 6px;
  transition: var(--transition-1);
  font-weight: var(--fw-700);
}

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

.collection-card .card-category {
  color: var(--spanish-gray);
  font-size: 1rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: var(--fw-700);
}

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

/* Collection CTA */
.collection-cta,
.custom-cta {
  text-align: center;
}

.collection-cta .btn,
.custom-cta .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);
  text-decoration: none;
  display: inline-block;
}

.collection-cta .btn:hover,
.custom-cta .btn:hover {
  background-color: var(--black);
  transform: translateY(-2px);
}

/* Social Contact Buttons */
.social-contact-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-contact-buttons .btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
}

.instagram-btn {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: var(--white);
}

.instagram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 39, 67, 0.3);
}

.whatsapp-btn {
  background: #25D366;
  color: var(--white);
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.social-contact-buttons .btn ion-icon {
  font-size: 1.2rem;
}

/* Custom Orders Section */
.custom-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 50px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.custom-info h3 {
  margin-bottom: 30px;
  color: var(--eerie-black);
  max-width: 400px;
}

.custom-steps {
  list-style: none;
  padding: 0;
}

.custom-steps li {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--platinum);
  border-radius: 10px;
  transition: var(--transition-1);
  max-width: 400px;
}

.custom-steps li:hover {
  background: var(--light-gray);
  transform: translateX(5px);
}

.custom-steps li ion-icon {
  font-size: 2.4rem;
  color: var(--theme-accent);
  flex-shrink: 0;
}

.custom-steps li span {
  font-size: 1.4rem;
  color: var(--eerie-black);
  font-weight: var(--fw-700);
  line-height: 1.4;
}

.custom-pricing {
  margin-top: 30px;
  padding: 20px;
  background: var(--theme-accent);
  color: var(--white);
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
}

.custom-pricing h4 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.custom-pricing p {
  font-size: 1.4rem;
  opacity: 0.9;
}

.custom-card {
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  max-width: 300px;
  opacity: 1;
  visibility: visible;
}

.custom-card[style*="display: none"] {
  opacity: 0;
  visibility: hidden;
}

.custom-card[style*="display: block"] {
  opacity: 1;
  visibility: visible;
}

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

.custom-card .card-banner {
  position: relative;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  aspect-ratio: 1;
}

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

.custom-card:hover .img-cover {
  transform: scale(1.05);
}

.custom-card .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: var(--transition-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-card:hover .card-overlay {
  opacity: 1;
}

.custom-card .card-action-btn {
  background-color: var(--theme-accent);
  color: var(--white);
  border: none;
  padding: 15px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-1);
  transform: scale(0.8);
}

.custom-card:hover .card-action-btn {
  transform: scale(1);
}

.custom-card .card-action-btn:hover {
  background-color: var(--black);
  color: var(--theme-accent);
}

.custom-card .card-content {
  padding: 15px;
  text-align: center;
  background: linear-gradient(135deg, #fafafa, #f5f5f5);
}

.custom-card .card-title {
  font-size: 1.4rem;
  margin-bottom: 6px;
  transition: var(--transition-1);
  font-weight: var(--fw-700);
}

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

.custom-card .card-category {
  color: var(--spanish-gray);
  font-size: 1rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: var(--fw-700);
}

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

/* Loading state for custom product card */
.custom-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.custom-card.loading .card-title,
.custom-card.loading .card-price {
  color: var(--spanish-gray);
}

.custom-card.loading .img-cover {
  filter: grayscale(50%);
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
  body .header {
    background: #fff !important;
  }
  .collection-grid {
    grid-template-columns: repeat(auto-fill, 220px);
    justify-content: center;
  }
  
  .collection-card.featured {
    grid-column: span 1;
  }
  
  .custom-content {
    grid-template-columns: 1fr;
    gap: 30px;
    justify-items: center; /* center grid items under 992px */
  }
  .custom-info { text-align: center; }
  .custom-steps li { margin-left: auto; margin-right: auto; }
  .collections-hero {
    padding-top: 180px !important;
  }
}

/* Responsive navbar positioning for collections page */
@media (max-width: 992px) {
  .navbar {
    top: 105px;
    display: flex;
    flex-direction: column;
  }
  
  .navbar-list {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 85px;
    display: flex;
    flex-direction: column;
  }
  
  .navbar-list {
    flex: 1;
  }
}

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

/* Tablet-ish widths: add horizontal padding so cards don't touch edges */
@media (min-width: 481px) and (max-width: 600px) {
  .collection-grid {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 768px) {
  .collections-title {
    font-size: 3rem;
  }
  
  .collections-subtitle {
    font-size: 1.6rem;
  }
  
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    justify-content: center;
  }
  
  .collection-card.featured {
    grid-column: span 1;
  }
  
  .collection-card .card-content {
    padding: 15px;
  }
  
  .collection-card .card-title {
    font-size: 1.4rem;
  }
  
  .custom-steps li {
    padding: 12px;
  }
  
  .custom-steps li span {
    font-size: 1.4rem;
  }

  .social-contact-buttons {
    flex-direction: column;
    align-items: center;
  }

  .social-contact-buttons .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* Enlarge add-to-cart button and icon on mobile */
  .collection-card .card-action-btn {
    padding: 20px;
    font-size: 2.4rem;
    transform: none;
  }
  .collection-card .card-action-btn ion-icon {
    font-size: 2.4rem;
  }
}

@media (max-width: 480px) {
  .collections-hero {
    padding: 100px 0 40px;
  }
  
  .collections-title {
    font-size: 2.5rem;
  }
  
  .collection-section,
  .custom-orders {
    padding: 60px 0;
  }
  
  .collection-header,
  .custom-header {
    margin-bottom: 30px;
  }
  
  .collection-description,
  .custom-description {
    font-size: 1.4rem;
  }
  
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-content: center;
  }
  .collection-card .card-action-btn {
    padding: 22px;
    font-size: 2.6rem;
  }
  .collection-card .card-action-btn ion-icon {
    font-size: 2.6rem;
  }
  
  .custom-steps li {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .custom-steps li ion-icon {
    font-size: 2rem;
  }
  
  .custom-steps li span {
    font-size: 1.3rem;
  }
}

/* Animation for collection cards */
.collection-card {
  animation: fadeInUp 0.6s ease-out;
}

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

/* Stagger animation for cards */
.collection-card:nth-child(1) { animation-delay: 0.1s; }
.collection-card:nth-child(2) { animation-delay: 0.2s; }
.collection-card:nth-child(3) { animation-delay: 0.3s; } 

/* Responsive improvements */
@media (max-width: 768px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .collection-card {
    margin: 0 auto;
    max-width: 280px;
  }
  
  .message {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .collections-loading {
    padding: 60px 0;
    min-height: 300px;
  }
  
  .loading-spinner {
    width: 50px;
    height: 50px;
    border-width: 4px;
    margin-bottom: 20px;
  }
  
  .collections-loading p {
    font-size: 1.6rem;
    padding: 15px 30px;
  }
}

@media (max-width: 480px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-left: 12px;   /* horizontal padding so cards don't touch edges */
    padding-right: 12px;
  }
  
  .collection-card {
    max-width: 320px;
  }
  
  .collections-loading {
    padding: 40px 0;
    min-height: 250px;
  }
  
  .loading-spinner {
    width: 45px;
    height: 45px;
    border-width: 3px;
    margin-bottom: 15px;
  }
  
  .collections-loading p {
    font-size: 1.4rem;
    padding: 12px 25px;
  }
} 

/* -----------------------------------
   Loading card (bar) styles
----------------------------------- */
.collections-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 60px 0;
}

.loading-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
  text-align: center;
  margin: 0 auto;
}

.loading-bar {
  width: 200px;
  height: 8px;
  background: #eceff3;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 14px;
}

.loading-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--theme-accent), #fecc80);
  animation: loadSweep 1.2s ease-in-out infinite;
  border-radius: inherit;
}

@keyframes loadSweep {
  0% { width: 0; transform: translateX(0); }
  50% { width: 60%; transform: translateX(40%); }
  100% { width: 0; transform: translateX(100%); }
}

.collections-loading p {
  font-size: 1.5rem;
  color: var(--spanish-gray);
  margin: 0;
}

/* -----------------------------------
   Edge-to-edge featured sections
----------------------------------- */
/* Ensure featured collections section spans full width without side gaps */
#featured-collections {
  margin: 0;
  padding: 0;
}

/* Each dynamically inserted collection-section spans full width */
.collection-section {
  margin: 0;
  padding: 0;
}

/* Give inner content vertical padding only; keep sides flush edge-to-edge */
.collection-section > .container {
  padding: 80px 0; /* vertical only */
}

/* Alternate backgrounds remain edge-to-edge */
.collection-section:nth-child(odd) {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}
.collection-section:nth-child(even) {
  background: #ffffff;
}

/* -----------------------------------
   Do NOT alter hero/navbar spacing
----------------------------------- */
/* Revert any previous hard overrides that affected hero/navbar */
/* We intentionally avoid global main/section overrides now */ 