/* Responsive Font and Image Auto-Resize for All Pages */

/* Base responsive font sizing on html element */
html {
  font-size: clamp(14px, 1.6vw, 16px);
}

/* Responsive Images - Auto resize to container */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Images in various contexts */
picture img,
figure img,
.product-image img,
.product-main-image,
.slide-item img,
.product-thumbnail img,
.category-image img,
.banner img,
.promo-banner img,
.ec-productRole__img img,
.ec-productRole__image img,
.ec-sliderItemRole img,
.item_visual img,
.slideThumb img,
.related-product-item img,
.product-logo-img,
.feature-image img,
.news-image img,
.campaign-image img,
.header-logo img,
.footer-logo img {
  max-width: 100%;
  height: auto;
}

/* Responsive SVG images */
svg {
  max-width: 100%;
  height: auto;
}

/* Responsive base font sizes with clamp */
body {
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
}

/* Responsive Headings */
h1, .h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
}

h2, .h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.3;
}

h3, .h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.4;
}

h4, .h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  line-height: 1.4;
}

h5, .h5 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.5;
}

h6, .h6 {
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  line-height: 1.5;
}

/* Responsive Paragraph and Text */
p {
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
}

/* Responsive Button Text */
button,
.btn,
.action-button,
.ec-inlineBtn,
.ec-btn {
  font-size: clamp(14px, 1.6vw, 16px);
}

/* Responsive Link Text */
a {
  font-size: clamp(14px, 1.6vw, 16px);
}

/* Responsive Input and Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
textarea,
select {
  font-size: clamp(14px, 1.6vw, 16px);
}

/* Responsive Navigation */
nav,
.nav,
.navbar,
.ev-header__nav,
.ev-footer__nav {
  font-size: clamp(13px, 1.5vw, 15px);
}

/* Responsive Product Names */
.product-name,
.product-title,
.ec-productRole__title,
.product-code {
  font-size: clamp(14px, 1.8vw, 18px);
}

/* Responsive Prices */
.product-price,
.ec-price,
.price,
.current-price,
.regular-price {
  font-size: clamp(16px, 2vw, 20px);
}

/* Responsive Labels */
label,
.ec-label,
.form-label {
  font-size: clamp(13px, 1.5vw, 15px);
}

/* Responsive Small Text */
small,
.small,
.copyright,
.ec-text-muted {
  font-size: clamp(12px, 1.4vw, 14px);
}

/* Responsive Table Text */
table,
.table,
.ec-table {
  font-size: clamp(13px, 1.5vw, 15px);
}

/* Responsive Footer Text */
footer,
.footer,
.ev-footer,
.ev-footer-mobile {
  font-size: clamp(12px, 1.4vw, 14px);
}

/* Responsive Breadcrumb */
.breadcrumb,
.ec-breadcrumbRole {
  font-size: clamp(12px, 1.4vw, 14px);
}

/* Responsive Modal Text */
.modal,
.ec-modal {
  font-size: clamp(14px, 1.6vw, 16px);
}

.modal-title,
.ec-modal-header {
  font-size: clamp(18px, 2.2vw, 22px);
}

/* Responsive Card Text */
.card,
.ec-card {
  font-size: clamp(14px, 1.6vw, 16px);
}

.card-title {
  font-size: clamp(16px, 2vw, 20px);
}

/* Responsive Badge and Tag Text */
.badge,
.tag,
.product-tag-pill {
  font-size: clamp(11px, 1.3vw, 13px);
}

/* Responsive Alert Text */
.alert,
.ec-alert {
  font-size: clamp(13px, 1.5vw, 15px);
}

/* Responsive List Items */
li,
.list-item {
  font-size: clamp(14px, 1.6vw, 16px);
}

/* Responsive Icon Sizes */
.icon,
.fa,
.fas,
.far,
.fab {
  font-size: clamp(14px, 1.6vw, 16px);
}

/* Additional responsive adjustments for specific screen sizes */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  html {
    font-size: 14px;
  }
  
  body {
    font-size: 14px;
  }
  
  h1, .h1 {
    font-size: 1.75rem;
  }
  
  h2, .h2 {
    font-size: 1.5rem;
  }
  
  h3, .h3 {
    font-size: 1.25rem;
  }
  
  img {
    max-width: 100%;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  html {
    font-size: 15px;
  }
  
  body {
    font-size: 15px;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  html {
    font-size: 15.5px;
  }
  
  body {
    font-size: 15.5px;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  html {
    font-size: 16px;
  }
  
  body {
    font-size: 16px;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  html {
    font-size: 16px;
  }
  
  body {
    font-size: 16px;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
  html {
    font-size: clamp(12px, 1.4vw, 15px);
  }
  
  body {
    font-size: clamp(12px, 1.4vw, 15px);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Media */
@media print {
  html {
    font-size: 12pt;
  }
  
  body {
    font-size: 12pt;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* Hero Section - Desktop and Mobile Image Visibility */
/* Show desktop items above 900px, hide mobile items */
@media (min-width: 901px) {
  .ec-sliderRole .main_visual .item-desktop {
    display: flex !important;
  }
  
  .ec-sliderRole .main_visual .item-mobile {
    display: none !important;
  }
}

/* Hide desktop items at 900px and below, show mobile items */
@media (max-width: 900px) {
  .ec-sliderRole .main_visual .item-desktop {
    display: none !important;
  }
  
  .ec-sliderRole .main_visual .item-mobile {
    display: flex !important;
  }
}

