/**
 * Shopify-Style Footer
 * 
 * Modern, clean footer design inspired by Shopify's footer
 */

/* ============================================
   Main Footer
   ============================================ */
.shopify-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================
   Newsletter Section
   ============================================ */
.footer-newsletter {
  padding: 3rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.footer-newsletter-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-newsletter-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.5rem;
  letter-spacing: -0.025em;
}

.footer-newsletter-subtitle {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.footer-newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.footer-newsletter-input-wrapper {
  display: flex;
  gap: 0;
  position: relative;
}

.footer-newsletter-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem 0 0 0.375rem;
  font-size: 0.9375rem;
  color: #111827;
  background: #ffffff;
  transition: all 0.2s;
}

.footer-newsletter-input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

.footer-newsletter-input::placeholder {
  color: #9ca3af;
}

.footer-newsletter-button {
  padding: 0.875rem 1.25rem;
  background: #111827;
  color: #ffffff;
  border: 1px solid #111827;
  border-radius: 0 0.375rem 0.375rem 0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -1px;
}

.footer-newsletter-button:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.footer-newsletter-button svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

/* ============================================
   Footer Columns
   ============================================ */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid #e5e7eb;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

.footer-column {
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}

.footer-column-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
}

/* ============================================
   Footer Links
   ============================================ */
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li {
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.9375rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
}

.footer-links a:hover {
  color: #111827;
}

/* ============================================
   Social Links
   ============================================ */
.footer-social-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.footer-social-links li {
  margin: 0;
  padding: 0;
}

.footer-social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s;
  justify-content: center;
}

.footer-social-link:hover {
  color: #111827;
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================
   Footer Bottom
   ============================================ */
.footer-bottom {
  padding: 2rem 0;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-bottom-content {
    flex-direction: row;
    gap: 2rem;
  }
}

.footer-copyright {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-copyright {
    text-align: left;
  }
}

/* ============================================
   Legal Links
   ============================================ */
.footer-legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.footer-legal-links li {
  margin: 0;
  padding: 0;
}

.footer-legal-links a {
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal-links a:hover {
  color: #111827;
  text-decoration: underline;
}

/* ============================================
   Payment Icons
   ============================================ */
.footer-payment-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-payment-icons {
    justify-content: flex-end;
  }
}

.payment-icon {
  height: 24px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.payment-icon:hover {
  opacity: 1;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 767px) {
  .shopify-footer {
    margin-top: 2rem;
  }

  .footer-newsletter {
    padding: 2rem 0;
  }

  .footer-newsletter-title {
    font-size: 1.25rem;
  }

  .footer-newsletter-subtitle {
    font-size: 0.875rem;
  }

  .footer-newsletter-input-wrapper {
    flex-direction: column;
  }

  .footer-newsletter-input {
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
  }

  .footer-newsletter-button {
    border-radius: 0.375rem;
    margin-left: 0;
    margin-top: 0.5rem;
    padding: 1rem;
    border: 1px solid #111827;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
    padding: 2rem 0;
  }

  .footer-column:nth-child(3) {
    grid-column: span 2;
  }

  .footer-bottom {
    padding: 1.5rem 0;
  }

  .footer-bottom-content {
    gap: 1rem;
  }

  .footer-legal-links {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .footer-column:nth-child(n+3) {
    grid-column: span 1;
  }

  .footer-payment-icons {
    gap: 0.375rem;
  }

  .payment-icon {
    height: 20px;
  }
}

/* ============================================
   Newsletter Form States
   ============================================ */
.footer-newsletter-form.submitted .footer-newsletter-input {
  border-color: #10b981;
}

.footer-newsletter-form.error .footer-newsletter-input {
  border-color: #ef4444;
}

.footer-newsletter-form .form-message {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
}

.footer-newsletter-form .form-message.success {
  color: #10b981;
}

.footer-newsletter-form .form-message.error {
  color: #ef4444;
}

/* ============================================
   Accessibility
   ============================================ */
.footer-newsletter-button:focus,
.footer-links a:focus,
.footer-social-link:focus,
.footer-legal-links a:focus {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* ============================================
   Dark Background Override (for white mode)
   ============================================ */
body .shopify-footer {
  background: #ffffff !important;
  color: #111827 !important;
}

body .shopify-footer * {
  color: inherit;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .footer-newsletter,
  .footer-social-links {
    display: none;
  }

  .shopify-footer {
    border-top: 1px solid #000;
    margin-top: 2rem;
    page-break-inside: avoid;
  }
}
