/* Responsive CSS for Brazilian Direct website
   This file enhances site.css with responsive layout features
   for better mobile and tablet experience.
*/

/* ===== GLOBAL RESPONSIVE STYLES ===== */

html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* Ensure images are responsive by default */
img {
  max-width: 100%;
  height: auto;
}

/* ===== MOBILE HEADER IMPROVEMENTS ===== */

/* Clear floats for header */
.header-container:after {
  content: "";
  display: table;
  clear: both;
}

/* Mobile page title improvements */
@media (max-width: 767px) {
  #title {
    height: auto;
    min-height: 60px;
    padding: 10px 0;
  }
  
  .titleBG {
    padding: 15px 5px;
    height: auto;
    min-height: 40px;
    text-align: center;
  }
  
  .primary.mobile-responsive-title {
    font-size: 16px;
    line-height: 1.2;
    padding: 0 10px;
    display: block;
    word-wrap: break-word;
    hyphens: auto;
  }
}

@media (min-width: 768px) and (max-width: 989px) {
  #title {
    height: auto;
    min-height: 70px;
    padding: 8px 0;
  }
  
  .titleBG {
    padding: 20px 10px;
    height: auto;
    min-height: 45px;
  }
  
  .primary.mobile-responsive-title {
    font-size: 20px;
    line-height: 1.2;
    padding: 0 15px;
  }
}

@media (min-width: 990px) {
  .primary.mobile-responsive-title {
    font-size: 26px;
  }
}

/* ===== SOCIAL MEDIA ICONS ===== */

.social-media-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-block;
  transition: opacity 0.2s ease;
  text-decoration: none;
  border: none;
  outline: none;
}

.social-icon:hover {
  opacity: 0.8;
  text-decoration: none;
}

.social-icon img {
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ===== HEADER & NAVIGATION ===== */

/* Responsive nav styles will be added when refactoring the navigation */

/* ===== MAIN LAYOUT CONTAINERS ===== */

/* These styles only apply to mobile and tablet, desktop uses original site.css */
@media (max-width: 994px) {
  #contentInnerHome {
    width: 100%;
    padding-right: 0;
    float: none;
  }

  .featurebox {
    width: 100%;
    float: none;
    clear: both;
    margin: 10px 0;
  }

  /* ===== RESPONSIVE BANNER/SLIDER ===== */

  .banner {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .banner img {
    width: 100%;
    height: auto;
  }

  .banner-label {
    font-size: 12px;
    padding: 6px 10px;
    margin-top: -35px;
    margin-left: 8px;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    border-radius: 3px;
    max-width: 85%;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  }
}

/* Improve banner label contrast on all screen sizes */
.banner-label {
  background: rgba(0, 0, 0, 0.75) !important;
  color: #fff !important;
  border-radius: 4px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
  font-weight: 500;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */

/* Mobile typography adjustments only */
@media (max-width: 767px) {
  h1, h1.home {
    font-size: 22px;
    line-height: 1.3;
    word-wrap: break-word;
  }

  h2 {
    font-size: 18px;
    line-height: 1.3;
    word-wrap: break-word;
  }
  
  /* Responsive body text */
  body {
    font-size: 13px;
    line-height: 1.4;
  }
  
  #contentInnerHome p,
  #contentInnerWide p,
  #contentInner p {
    line-height: 1.5;
    word-wrap: break-word;
  }
}

/* ===== RESPONSIVE HOMEPAGE LAYOUT ===== */

/* Mobile and tablet homepage layout only - desktop uses original styles */
@media (max-width: 994px) {
  .featurebox h1 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.2;
  }

  .featurebox p {
    font-size: 14px;
    line-height: 1.4;
  }

  .featurebox img {
    max-width: 60px;
    height: auto;
    margin: 0 10px 10px 0;
  }

  /* Homepage testimonials and badges */
  .elfsight-app-25262beb-0eb9-4733-924e-563a9f4400dd {
    width: 100%;
    margin: 20px 0;
  }

  /* BBB and other badges */
  .featurebox table,
  .featurebox script + a {
    display: block;
    text-align: center;
    margin: 15px auto;
  }
}

/* ===== RESPONSIVE IMAGE GALLERIES ===== */

.imagelist {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0;
  margin: 0;
}

.imagelist li {
  width: 100%;
  margin: 0 0 20px 0;
  text-align: center;
}

.imagelist li img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px auto;
}

/* ===== MEDIA QUERIES ===== */

/* Tablet and small desktop */
@media (min-width: 768px) {
  #contentInnerHome {
    flex-basis: 65%;
    padding-right: 20px;
    width: 65%;
    float: left;
  }
  
  .featurebox {
    width: 30%;
    float: right;
    clear: right;
    margin: 0 0 15px 0;
  }
  
  .featurebox img {
    max-width: 68px;
  }
  
  .banner-label {
    font-size: 14px;
    margin-top: -45px;
    margin-left: 15px;
    padding: 6px 15px;
  }
  
  .imagelist li {
    width: 48%;
    margin: 0 0 30px 0;
  }
  
  h1, h1.home {
    font-size: 24px;
  }
}

/* Desktop - matches original site.css breakpoint */
@media (min-width: 995px) {
  #contentInnerHome {
    width: 590px;
    float: left;
    padding-right: 20px;
  }
  
  .featurebox {
    width: 275px;
    float: right;
    clear: right;
  }
  
  .banner-label {
    padding: 4px 20px;
    font-size: 16px;
    margin-top: -50px;
    margin-left: 20px;
  }
  
  h1, h1.home {
    font-size: 28px;
  }
  
  h2 {
    font-size: 20px;
  }
}

/* ===== RESPONSIVE FORMS AND BUTTONS ===== */

/* Mobile form styling only - don't interfere with desktop */
@media (max-width: 767px) {
  form {
    width: 100%;
    margin: 0 auto;
  }

  select, input[type="text"], input[type="email"], textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  select {
    height: 48px; /* Touch-friendly height */
  }

  /* PayPal and Quote buttons - make them touch-friendly on mobile only */
  input[type="image"], 
  input[type="submit"], 
  button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
  }
}

/* Quote and Sample request buttons - mobile adjustments only */
@media (max-width: 767px) {
  .buttons {
    text-align: center;
    margin: 20px 0;
  }

  .buttons a {
    display: inline-block;
    margin: 10px 5px;
  }

  .buttons img {
    max-width: 200px;
    height: auto;
  }
}

/* Make quote/sample buttons stack on mobile */
@media (max-width: 575px) {
  .buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .buttons a {
    display: block;
    margin: 10px 0;
    width: 100%;
    max-width: 250px;
  }
  
  .buttons img {
    width: 100%;
    max-width: 200px;
  }
}

/* ===== RESPONSIVE FOOTER ===== */

/* Mobile footer layout only */
@media (max-width: 767px) {
  #footer ul {
    float: none;
    width: 100%;
    margin-bottom: 20px;
  }

  .logos {
    float: none;
    width: 100%;
    margin: 20px 0;
    text-align: center;
  }

  .logos img {
    display: inline-block;
    margin: 5px 10px;
  }

  .contact {
    float: none;
    width: 100%;
    margin: 20px 0;
  }
  
  /* Mobile social icons - stack vertically if needed */
  .social-media-icons {
    justify-content: flex-start;
    gap: 8px;
  }
  
  .social-icon img {
    width: 28px !important;
    height: 28px !important;
  }
}

/* Desktop */
@media (min-width: 768px) {
  #footer ul {
    float: left;
    width: 125px;
    margin-right: 30px;
  }
  
  .logos {
    float: left;
    width: 250px;
    margin: 0px 30px 0px 50px;
    text-align: left;
  }
  
  .contact {
    float: left;
    width: 275px;
  }
  
  /* Restore side-by-side buttons on larger screens */
  .buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .buttons a {
    flex: none;
    margin: 10px;
  }
}

/* ===== RESPONSIVE PRODUCT PAGES ===== */

/* Product page content layout */
#contentInnerProduct {
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Product specifications tables - mobile/tablet only */
@media (max-width: 994px) {
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
  }

  table td, table th {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
  }

  table th {
    background-color: #f5f5f5;
    font-weight: bold;
  }
}

/* Responsive tables - horizontal scroll on small screens */
@media (max-width: 575px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    min-width: 500px;
    font-size: 12px;
  }
  
  table td, table th {
    padding: 6px;
  }
}

/* ===== RESPONSIVE PHOTO GALLERIES ===== */

/* Gallery grid layout */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.photo-gallery img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.photo-gallery img:hover {
  transform: scale(1.05);
}

/* Mobile gallery adjustments */
@media (max-width: 575px) {
  .photo-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }
}

/* ===== RESPONSIVE TOOLS & CALCULATORS ===== */

/* Calculator and form layouts */
.calculator-container {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.calculator-form {
  display: grid;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
}

.form-group input,
.form-group select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.calculator-result {
  background: #e8f5e8;
  padding: 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #c3e6c3;
}

/* ===== RESPONSIVE CONTENT SECTIONS ===== */

/* Sidebar content that appears in product pages */
.sidebar {
  width: 100%;
  margin-top: 20px;
  background: #f8f8f8;
  padding: 15px;
  border-radius: 4px;
}

.sidebar h3 {
  color: #362e1d;
  font-size: 16px;
  margin-bottom: 10px;
}

.sidebar ul {
  list-style-type: disc;
  margin-left: 20px;
}

.sidebar li {
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Desktop sidebar layout - matches original site.css breakpoint */
@media (min-width: 995px) {
  .has-sidebar {
    display: flex;
    gap: 20px;
  }
  
  .main-content {
    flex: 1;
  }
  
  .sidebar {
    width: 250px;
    margin-top: 0;
  }
}

/* ===== RESPONSIVE BREADCRUMBS ===== */

ul#breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  margin-bottom: 20px;
}

ul#breadcrumbs li {
  display: flex;
  align-items: center;
}

ul#breadcrumbs li:after {
  content: ">";
  margin: 0 5px;
  color: #887653;
}

ul#breadcrumbs li:last-child:after {
  display: none;
}

/* ===== RESPONSIVE UTILITIES ===== */

/* Text alignment utilities for mobile */
@media (max-width: 575px) {
  .mobile-center {
    text-align: center !important;
  }
  
  .mobile-left {
    text-align: left !important;
  }
  
  .mobile-hide {
    display: none !important;
  }
  
  .mobile-full-width {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
} 