/* ============================================
   MOBILE STORE - RESPONSIVE CSS
   Full responsive design for all screen sizes
   ============================================ */

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

/* Fix horizontal overflow - white space issue */
html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  max-width: 100%;
}

/* Prevent any element from causing horizontal scroll */
*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

/* Fix header row overflow - only for header areas */
.header .row,
.header__top .row,
.header__middle .row,
.header-menu .row {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

/* Prevent row from causing overflow */
.container > .row {
  max-width: 100%;
}

/* Ensure header doesn't overflow */
header,
.header,
.header--1,
.header__top,
.header__top--style-1,
.header__middle,
.header__bottom {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Fix header top content */
.header__top-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header__top-content--left,
.header__top-content--right {
  max-width: 100%;
}

.contact_cms {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fix hero slider overflow */
.hero,
.hero-slider,
.hero---2,
.swiper-container,
.swiper-wrapper {
  max-width: 100%;
  overflow: hidden;
}

/* Fix swiper slides */
.swiper-slide {
  max-width: 100%;
}

.swiper-slide img {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ============================================
   PRODUCT CARD TEXT OVERFLOW FIX - ALL SIZES
   ============================================ */

/* Ensure product cards don't overflow */
.product__box,
.mobile-product-card,
.product-card {
  overflow: hidden;
  max-width: 100%;
}

/* Product titles - truncate to 2 lines */
.product__content h6,
.product-name,
.mobile-product-card .product-name,
.product__box h6 a,
.product__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-width: 100%;
}

/* Price text - don't wrap */
.product__price,
.mobile-product-card .product-price {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   HEADER MENU - FIX FOR ALL SCREEN SIZES
   ============================================ */

/* Fix header menu to show all items properly */
.header-menu {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.header-menu .container {
  max-width: 100%;
  padding: 0 10px;
}

.header-menu .row {
  margin: 0;
  padding: 0;
}

.header-menu .row.col-12 {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  flex: 0 0 100%;
}

.header-menu nav {
  width: 100%;
}

.header-menu .header__nav {
  display: flex !important;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0 5px;
  width: 100%;
  min-width: max-content;
}

.header-menu .header__nav-item {
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.header-menu .header__nav-link {
  display: block;
  padding: 12px 12px;
  font-size: 13px;
  white-space: nowrap;
}

/* ============================================
   HERO SLIDER TEXT POSITION FIX
   ============================================ */

/* Move slider text and button to bottom */
.hero-img--2 .hero__content {
  position: absolute !important;
  bottom: 60px !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
  text-align: center !important;
  padding: 0 20px !important;
}

.hero-img--2 .hero__content .row {
  justify-content: center !important;
}

.hero-img--2 .hero__content .col-9 {
  max-width: 800px !important;
  margin: 0 auto !important;
  flex: 0 0 auto !important;
  text-align: center !important;
}

/* Adjust text styles for bottom positioning */
.hero-img--2 .hero__content .title--thin {
  font-size: 2.5rem !important;
  margin-bottom: 10px !important;
  color: #fff !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
}

.hero-img--2 .hero__content .title--regular {
  font-size: 1.8rem !important;
  margin-bottom: 15px !important;
  color: #fff !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
}

.hero-img--2 .hero__content .title--description {
  font-size: 1.2rem !important;
  margin-bottom: 25px !important;
  color: #fff !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
}

.hero-img--2 .hero__content .btn {
  margin-top: 20px !important;
  padding: 15px 40px !important;
  font-size: 1.1rem !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 15px rgba(0,99,209,0.3) !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .hero-img--2 .hero__content {
    bottom: 40px !important;
    padding: 0 15px !important;
  }
  
  .hero-img--2 .hero__content .title--thin {
    font-size: 1.8rem !important;
  }
  
  .hero-img--2 .hero__content .title--regular {
    font-size: 1.4rem !important;
  }
  
  .hero-img--2 .hero__content .title--description {
    font-size: 1rem !important;
    margin-bottom: 20px !important;
  }
  
  .hero-img--2 .hero__content .btn {
    padding: 12px 30px !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 480px) {
  .hero-img--2 .hero__content {
    bottom: 30px !important;
    padding: 0 10px !important;
  }
  
  .hero-img--2 .hero__content .title--thin {
    font-size: 1.5rem !important;
  }
  
  .hero-img--2 .hero__content .title--regular {
    font-size: 1.2rem !important;
  }
  
  .hero-img--2 .hero__content .btn {
    padding: 10px 25px !important;
    font-size: 0.9rem !important;
  }
}

/* ============================================
   DASHBOARD SIDEBAR MOBILE FIX
   ============================================ */

/* Fix sidebar alignment on mobile */
@media (max-width: 767px) {
  .my-account-area {
    padding: 15px 0;
  }
  
  .my-account-area .row {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .my-account-menu {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .account-menu-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .account-menu-list li {
    flex: 1 1 calc(50% - 5px);
    min-width: 140px;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .account-menu-list li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 12px 8px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    text-transform: none !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
  }
  
  .account-menu-list li a:hover,
  .account-menu-list li a.active {
    background: #0063d1 !important;
    color: #fff !important;
    border-color: #0063d1 !important;
  }
  
  .account-menu-list li a i {
    margin-right: 5px !important;
    font-size: 14px !important;
  }
  
  /* Main content area */
  .my-account-tab {
    width: 100%;
  }
  
  .account-wrapper {
    padding: 20px 15px !important;
  }
  
  .account-title {
    font-size: 20px !important;
    margin-bottom: 15px !important;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
  .account-menu-list li {
    flex: 1 1 100%;
    min-width: auto;
  }
  
  .account-menu-list li a {
    padding: 15px 10px !important;
    font-size: 14px !important;
  }
}

/* ============================================
   EXTRA LARGE DEVICES (1400px and up)
   ============================================ */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .header-menu .header__nav-link {
    padding: 14px 18px;
    font-size: 14px;
  }
}

/* ============================================
   LARGE DEVICES (1200px to 1399px)
   ============================================ */
@media (min-width: 1200px) and (max-width: 1399px) {
  .header-menu .header__nav-link {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* ============================================
   LARGE DEVICES (992px to 1199px)
   ============================================ */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  /* Header menu - smaller padding for more items */
  .header-menu .header__nav-link {
    padding: 10px 10px;
    font-size: 12px;
  }
  
  /* Header adjustments */
  .header-menu__nav .menu-item {
    padding: 0 12px;
  }
  
  .header-menu__nav .menu-item a {
    font-size: 14px;
  }
  
  /* Product grid */
  .product__box {
    margin-bottom: 20px;
  }
}

/* ============================================
   MEDIUM-LARGE DEVICES (992px to 1099px)
   ============================================ */
@media (max-width: 1099px) and (min-width: 992px) {
  .header-menu .header__nav-link {
    padding: 10px 8px;
    font-size: 11px;
  }
}

/* ============================================
   MEDIUM DEVICES - TABLETS (768px to 991px)
   ============================================ */
@media (max-width: 991px) {
  .container {
    max-width: 720px;
  }
  
  /* Hide desktop menu, show mobile toggle */
  .header-menu__nav {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: block !important;
  }
  
  /* Header */
  .header-top {
    padding: 8px 0;
  }
  
  .header-top__left,
  .header-top__right {
    text-align: center;
    width: 100%;
  }
  
  .header-logo img {
    max-width: 150px;
  }
  
  /* Hero slider */
  .hero-slider .hero-content h1 {
    font-size: 28px;
  }
  
  .hero-slider .hero-content p {
    font-size: 14px;
  }
  
  /* Product cards */
  .product__box {
    margin-bottom: 25px;
  }
  
  .product__content h6 {
    font-size: 14px;
  }
  
  /* Footer */
  .footer-widget {
    margin-bottom: 30px;
  }
  
  /* Cart page */
  .cart-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  /* Login/Register */
  .login-register-wrapper {
    padding: 20px;
  }
  
  /* Sidebar */
  .sidebar {
    margin-top: 40px;
  }
}

/* ============================================
   SMALL DEVICES - LANDSCAPE PHONES (576px to 767px)
   ============================================ */
@media (max-width: 767px) {
  .container {
    max-width: 540px;
  }
  
  /* Typography */
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  h4 { font-size: 18px; }
  h5 { font-size: 16px; }
  h6 { font-size: 14px; }
  
  body {
    font-size: 14px;
  }
  
  /* Header */
  .header-top {
    display: none;
  }
  
  .header-bottom {
    padding: 10px 0;
  }
  
  .header-logo img {
    max-width: 120px;
  }
  
  .header-action__item {
    margin-left: 10px;
  }
  
  .header-action__item i {
    font-size: 18px;
  }
  
  /* Hero Slider */
  .hero-slider {
    min-height: 250px;
  }
  
  .hero-slider .hero-content {
    padding: 20px;
  }
  
  .hero-slider .hero-content h1 {
    font-size: 22px;
    margin-bottom: 10px;
  }
  
  .hero-slider .hero-content p {
    font-size: 13px;
    margin-bottom: 15px;
  }
  
  .hero-slider .btn {
    padding: 8px 20px;
    font-size: 12px;
  }
  
  /* Section titles */
  .section-title h2 {
    font-size: 22px;
  }
  
  .section-title p {
    font-size: 13px;
  }
  
  /* Product Grid */
  .product__box {
    margin-bottom: 20px;
  }
  
  .product__img-box {
    height: auto;
  }
  
  .product__content {
    padding: 12px;
  }
  
  .product__content h6 {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .product__price {
    font-size: 14px;
  }
  
  .product__price .product__price--old {
    font-size: 12px;
  }
  
  /* Product action buttons */
  .product__action {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .product__action a {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  /* Buttons */
  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .btn--small {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  /* Footer */
  .footer-widget {
    margin-bottom: 25px;
    text-align: center;
  }
  
  .footer-widget__title {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .footer-widget ul li {
    margin-bottom: 8px;
  }
  
  .footer-bottom {
    text-align: center;
  }
  
  .footer-bottom__nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Cart Page */
  .cart-table {
    font-size: 13px;
  }
  
  .cart-table th,
  .cart-table td {
    padding: 10px 8px;
  }
  
  .cart-table img {
    max-width: 60px;
  }
  
  .cart-summary {
    margin-top: 20px;
  }
  
  /* Checkout */
  .checkout-form input,
  .checkout-form select,
  .checkout-form textarea {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  /* Login/Register */
  .login-register-wrapper {
    padding: 15px;
    margin: 0 10px;
  }
  
  .login-register-tab-list a h4 {
    font-size: 14px;
  }
  
  .login-register-form input {
    font-size: 14px;
  }
  
  /* Breadcrumb */
  .page-breadcrumb {
    padding: 15px 0;
  }
  
  .page-breadcrumb__menu {
    font-size: 13px;
  }
  
  /* Single Product Page */
  .product-details__content {
    margin-top: 25px;
  }
  
  .product-details__content h2 {
    font-size: 20px;
  }
  
  .product-details__price {
    font-size: 22px;
  }
  
  /* My Account / Dashboard */
  .my-account-menu {
    margin-bottom: 25px;
  }
  
  .my-account-menu li a {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  /* Contact Page */
  .contact-info {
    margin-bottom: 25px;
  }
  
  /* Tables */
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Modal */
  .modal-dialog {
    margin: 10px;
  }
  
  .modal-content {
    border-radius: 10px;
  }
  
  .modal-body {
    padding: 20px;
  }
}

/* ============================================
   EXTRA SMALL DEVICES - PHONES (up to 575px)
   ============================================ */
@media (max-width: 575px) {
  .container {
    padding-right: 10px;
    padding-left: 10px;
  }
  
  /* Typography */
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }
  
  body {
    font-size: 13px;
  }
  
  /* Header */
  .header-bottom {
    padding: 8px 0;
  }
  
  .header-logo img {
    max-width: 100px;
  }
  
  .header-action {
    gap: 8px;
  }
  
  .header-action__item {
    margin-left: 5px;
  }
  
  .header-action__item i {
    font-size: 16px;
  }
  
  .header-action__item .count {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }
  
  /* Hero Slider */
  .hero-slider {
    min-height: 200px;
  }
  
  .hero-slider .hero-content h1 {
    font-size: 18px;
  }
  
  .hero-slider .hero-content p {
    font-size: 12px;
    display: none;
  }
  
  .hero-slider .btn {
    padding: 6px 15px;
    font-size: 11px;
  }
  
  /* Section spacing */
  section {
    padding: 30px 0;
  }
  
  .section-title {
    margin-bottom: 20px;
  }
  
  .section-title h2 {
    font-size: 18px;
  }
  
  /* Product Grid - 2 columns on mobile */
  .product__box {
    margin-bottom: 15px;
    overflow: hidden;
    max-width: 100%;
  }
  
  .product__content {
    padding: 10px;
    overflow: hidden;
    max-width: 100%;
  }
  
  .product__content h6,
  .product__content .product-name,
  .product__box h6,
  .mobile-product-card .product-name {
    font-size: 12px;
    line-height: 1.3;
    height: 32px;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 100%;
  }
  
  .product__price {
    font-size: 13px;
  }
  
  .product__price .product__price--old {
    font-size: 11px;
  }
  
  /* Mobile product card fixes */
  .mobile-product-card {
    overflow: hidden;
    max-width: 100%;
  }
  
  .mobile-product-card .product-price,
  .mobile-product-card .product-specs {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  
  /* Product action - stack vertically */
  .product__action {
    flex-direction: column;
  }
  
  .product__action a {
    width: 100%;
    text-align: center;
    padding: 8px;
    font-size: 11px;
  }
  
  /* Buttons */
  .btn {
    padding: 8px 16px;
    font-size: 12px;
    width: 100%;
  }
  
  .btn--small {
    padding: 6px 12px;
    font-size: 11px;
  }
  
  /* Footer */
  .footer-widget {
    margin-bottom: 20px;
  }
  
  .footer-widget__title {
    font-size: 15px;
  }
  
  .footer-social a {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  /* Cart Page - Mobile friendly */
  .cart-table-wrapper {
    overflow-x: auto;
  }
  
  .cart-table {
    min-width: 600px;
  }
  
  .cart-table img {
    max-width: 50px;
  }
  
  .cart-table th,
  .cart-table td {
    padding: 8px 5px;
    font-size: 12px;
  }
  
  .cart-summary {
    padding: 15px;
  }
  
  .cart-summary h4 {
    font-size: 16px;
  }
  
  /* Checkout */
  .checkout-form {
    padding: 15px;
  }
  
  .checkout-form input,
  .checkout-form select {
    font-size: 13px;
    padding: 8px 10px;
  }
  
  /* Login/Register */
  .login-register-area {
    padding: 20px 0;
  }
  
  .login-register-wrapper {
    padding: 15px 10px;
    border-radius: 10px;
  }
  
  .login-register-tab-list {
    flex-direction: row;
    gap: 10px;
  }
  
  .login-register-tab-list a {
    flex: 1;
    text-align: center;
  }
  
  .login-register-tab-list a h4 {
    font-size: 13px;
    margin: 0;
  }
  
  .login-register-form input {
    font-size: 13px;
    padding: 10px 12px;
    padding-left: 40px;
  }
  
  .input-with-icon .input-icon {
    left: 12px;
    font-size: 14px;
  }
  
  /* OTP Modal */
  #otpModal .modal-body {
    padding: 20px 15px;
  }
  
  #otpModal #otpInput {
    font-size: 18px;
    letter-spacing: 6px;
    padding: 12px;
  }
  
  /* Breadcrumb */
  .page-breadcrumb {
    padding: 10px 0;
  }
  
  .page-breadcrumb__menu li {
    font-size: 12px;
  }
  
  /* Single Product */
  .product-details__content {
    margin-top: 20px;
  }
  
  .product-details__content h2 {
    font-size: 18px;
  }
  
  .product-details__price {
    font-size: 20px;
  }
  
  .product-details__quantity {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .product-details__quantity .btn {
    width: 100%;
  }
  
  /* My Account */
  .my-account-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .my-account-menu li {
    flex: 1 1 45%;
  }
  
  .my-account-menu li a {
    padding: 8px 10px;
    font-size: 12px;
    text-align: center;
  }
  
  /* Order details */
  .order-table {
    font-size: 12px;
  }
  
  /* Contact */
  .contact-form input,
  .contact-form textarea {
    font-size: 13px;
  }
  
  /* Search page */
  .search-form input {
    font-size: 14px;
  }
  
  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pagination li a {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ============================================
   VERY SMALL DEVICES (up to 375px)
   ============================================ */
@media (max-width: 375px) {
  .container {
    padding-right: 8px;
    padding-left: 8px;
  }
  
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
  
  .header-logo img {
    max-width: 80px;
  }
  
  .hero-slider .hero-content h1 {
    font-size: 16px;
  }
  
  .section-title h2 {
    font-size: 16px;
  }
  
  .product__content h6 {
    font-size: 11px;
  }
  
  .product__price {
    font-size: 12px;
  }
  
  .login-register-tab-list a h4 {
    font-size: 12px;
  }
}

/* ============================================
   OFFCANVAS MOBILE MENU IMPROVEMENTS
   ============================================ */
.offcanvas {
  max-width: 300px;
  width: 85%;
}

.offcanvas-menu li a {
  padding: 12px 15px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.offcanvas-menu .sub-menu {
  padding-left: 15px;
}

.offcanvas-menu .sub-menu li a {
  font-size: 13px;
  padding: 10px 15px;
}

/* ============================================
   TOUCH-FRIENDLY IMPROVEMENTS
   ============================================ */
@media (max-width: 991px) {
  /* Larger touch targets */
  a, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  
  input, select, textarea {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Better spacing for touch */
  .product__action a {
    min-height: 40px;
  }
  
  /* Swiper navigation */
  .swiper-button-next,
  .swiper-button-prev {
    width: 35px;
    height: 35px;
  }
  
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 16px;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION FIXES
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-slider {
    min-height: 180px;
  }
  
  .modal-dialog {
    margin: 5px auto;
  }
  
  .modal-body {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header-top,
  .header-menu,
  .footer,
  .mobile-menu-toggle,
  .offcanvas,
  .material-scrolltop {
    display: none !important;
  }
  
  .container {
    max-width: 100%;
  }
  
  body {
    font-size: 12pt;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden-mobile {
  display: block;
}

.visible-mobile {
  display: none;
}

@media (max-width: 767px) {
  .hidden-mobile {
    display: none !important;
  }
  
  .visible-mobile {
    display: block !important;
  }
}

.text-center-mobile {
  text-align: inherit;
}

@media (max-width: 575px) {
  .text-center-mobile {
    text-align: center !important;
  }
}

/* Flex utilities for mobile */
@media (max-width: 575px) {
  .flex-column-mobile {
    flex-direction: column !important;
  }
  
  .w-100-mobile {
    width: 100% !important;
  }
}
