/* 
 * Product Showcase Custom CSS
 * This file is separate from vasudev/assets/css/custom.css
 * Managed independently for Netlify deployment
 */

/* Base Mobile Responsive - Prevent Overflow */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.page-main {
  overflow-x: hidden;
  width: 100%;
}

/* Footer Products List - Reduced Padding */
.footer-products-list {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
}

.footer-products-list li {
  margin: 0 !important;
  padding: 0 !important;
}

.footer-products-list li + li {
  margin-top: 8px !important;
}

.footer-products-list li span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px !important;
  line-height: 1.4 !important;
  display: inline-block;
}

/* Mobile Responsive Footer */
@media (max-width: 767px) {
  .page-footer__inner > div,
  .page-footer__contacts {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
    max-width: 100%;
  }
  
  .page-footer__inner {
    gap: 0;
  }
  
  .page-footer__contacts {
    text-align: center;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .page-footer__contacts .contacts-list {
    display: inline-block;
    text-align: left;
    margin: 0 auto 12px auto;
  }
  
  .page-footer__contacts .contacts-list li {
    text-align: left;
    margin: 0 auto 8px auto;
    display: block;
  }
  
  .page-footer__contacts ul.social {
    justify-content: center !important;
    display: flex !important;
  }
  
  .page-footer__contacts {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  .page-footer__contacts > * {
    max-width: 95vw !important;
  }
  
  .page-footer__contacts .footer-logo,
  .page-footer__contacts .footer-logo img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .page-footer__contacts .contacts-list {
    width: 100% !important;
    display: block !important;
    margin: 6px auto 12px auto !important;
    text-align: center !important;
  }
  
  .page-footer__contacts .contacts-list li {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 auto 8px auto !important;
  }
  
  .page-footer__contacts ul.social {
    justify-content: center !important;
    display: flex !important;
  }
  
  .page-footer__contacts p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 95vw !important;
  }
  
  .page-footer__contacts .contacts-list li a {
    display: inline-block !important;
    text-align: center !important;
    line-height: 1.6;
  }
  
  .page-footer__contacts .contacts-list li a i {
    margin-right: 6px;
  }
  
  .page-footer__contacts .contacts-list li a span {
    display: inline-block !important;
    text-align: center !important;
  }
  
  /* Ensure footer map container doesn't overflow */
  .page-footer__news {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: hidden;
  }
  
  .page-footer__news h4 {
    margin-bottom: 15px !important;
    text-align: center;
  }
}

/* Google Map Responsive - Mobile Only */
.map-responsive-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.map-responsive-wrapper iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
}

/* Mobile Responsive Map */
@media (max-width: 767px) {
  .map-responsive-wrapper {
    position: relative;
    padding-bottom: 75%; /* 4:3 Aspect Ratio for mobile */
    height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .map-responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 300px;
    border-radius: 8px;
  }
}

/* Extra Small Devices - Adjust map height */
@media (max-width: 480px) {
  .map-responsive-wrapper {
    padding-bottom: 85%; /* Slightly taller aspect ratio for small phones */
    border-radius: 6px;
  }
  
  .map-responsive-wrapper iframe {
    min-height: 280px;
    border-radius: 6px;
  }
}

/* General Mobile Responsive Fixes */
@media (max-width: 767px) {
  /* Fix container overflow and padding */
  .uk-container,
  .uk-container-small,
  .uk-container-large,
  .uk-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* General Text Overflow Fix */
  p, span, div, h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }
  
  /* Fix UK Grid negative margins */
  [class*="uk-grid"] {
    margin-left: 0 !important;
  }
  
  [class*="uk-grid"] > * {
    padding-left: 15px !important;
  }
  
  /* Fix any horizontal scroll */
  body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  .page-main {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  /* Ensure all images are responsive */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Extra Small Devices */
@media (max-width: 480px) {
  .uk-container,
  .uk-section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* Prevent any element from causing horizontal scroll */
* {
  box-sizing: border-box !important;
}
