﻿/* Responsive overrides for Layana */

/* Base helpers */
img, video { max-width: 100%; height: auto; }

/* Mobile first tweaks - 320px and up */
@media (max-width: 480px) {
  /* Container adjustments for very small screens */
  .container { 
    padding-left: 12px; 
    padding-right: 12px;
    max-width: 100%;
  }
  
  /* Header mobile fixes */
  #header-regular { display: none !important; }
  #header-responsive { display: block !important; }
  
  .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
  }
  
  .header-left, .header-center, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
  }
  
  .header-center {
    justify-content: center;
  }
  
  .header-right {
    justify-content: flex-end;
    gap: 15px;
  }
  
  /* Logo mobile sizing */
  .logoimage {
    width: 150px !important;
    height: auto !important;
  }
  
  /* Mobile menu toggle - ensure visibility */
  .toggle-wrap {
    display: block !important;
    z-index: 10001;
  }
  
  #toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Mobile menu toggle */
  #toggle {
    width: 30px;
    height: 25px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    padding: 5px;
    z-index: 10000;
  }
  
  #toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 2px 0;
    transition: 0.3s;
    border-radius: 2px;
    display: block;
  }
  
  #toggle:hover .bar {
    background-color: #007bff;
  }
  
  /* Hamburger animation when menu is open */
  body.menu-open #toggle .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  body.menu-open #toggle .bar:nth-child(2) {
    opacity: 0;
  }
  
  body.menu-open #toggle .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Mobile navigation overlay */
  .navi-wrap-responsive {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
  }
  
  .navi-wrap-responsive.active {
    left: 0;
  }
  
  /* Mobile menu close button */
  .mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-close:hover {
    background: #e9ecef;
    transform: rotate(90deg);
  }
  
  .mobile-menu-close i {
    font-size: 14px;
    color: #6c757d;
  }
  
  .responsive-menu {
    padding: 20px;
    list-style: none;
    margin: 0;
  }
  
  .responsive-menu .menu-item {
    margin: 10px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
  }
  
  .responsive-menu .menu-item:last-child {
    border-bottom: none;
  }
  
  .responsive-menu .menu-item a {
    display: block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
  }
  
  /* Prevent horizontal scroll */
  body, html { 
    overflow-x: hidden; 
    -webkit-overflow-scrolling: touch;
  }
  
  /* Menu open state */
  body.menu-open {
    overflow: hidden;
  }
  
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
  }
}

/* Small mobile devices - 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
  .container { 
    padding-left: 16px; 
    padding-right: 16px; 
  }
  
  #header-regular { display: none !important; }
  #header-responsive { display: block !important; }
  
  .logoimage {
    width: 180px !important;
    height: auto !important;
  }
}

/* Tablet adjustments - 769px to 992px */
@media (min-width: 769px) and (max-width: 992px) {
  .container { 
    padding-left: 20px; 
    padding-right: 20px; 
  }
  
  #header-regular { display: block !important; }
  #header-responsive { display: none !important; }
  
  /* Adjust navigation for tablet */
  .primary-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .primary-menu > li {
    flex: 0 0 auto;
    margin: 0 5px;
  }
  
  .logoimage {
    width: 200px !important;
    height: auto !important;
  }
}

/* Desktop adjustments - 993px and up */
@media (min-width: 993px) {
  #header-regular { display: block !important; }
  #header-responsive { display: none !important; }
}

/* Footer responsive layout */
 #footer.footer-bs {
  background: #111827;
  color: #e5e7eb;
 }

 #footer.footer-bs ul {
  list-style-type: none;
  padding-left: 0;
  margin-left: 0;
 }

 #footer.footer-bs li {
  list-style-type: none;
 }

 #footer.footer-bs .container-fluid {
  display: block !important;
  padding-left: 24px;
  padding-right: 24px;
 }

 #footer.footer-bs .footer-top .row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -12px;
  margin-right: -12px;
 }

 #footer.footer-bs .footer-top .row > div {
  box-sizing: border-box;
  padding-left: 12px;
  padding-right: 12px;
  width: 25% !important;
  max-width: 25% !important;
  flex: 0 0 25% !important;
  text-align: left;
 }

 #footer.footer-bs .footer-top {
  background: transparent;
 }

 #footer.footer-bs .footer-top .row > div {
  text-align: left;
 }

 #footer.footer-bs .footer-bottom {
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
 }

 #footer.footer-bs .footer-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.4px;
 }

 #footer.footer-bs .footer-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  background: #f59e0b;
  margin-top: 10px;
  margin-left: 0;
  margin-right: 0;
 }

 #footer.footer-bs .footer-links li {
  margin: 10px 0;
 }

 #footer.footer-bs .footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
 }

 #footer.footer-bs .footer-links a:hover {
  color: #ffffff;
  transform: translateX(4px);
 }

 #footer.footer-bs .footer-links a i {
  font-size: 11px;
  opacity: 0.9;
 }

 #footer.footer-bs .footer-contact li {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  margin: 12px 0;
 }

 #footer.footer-bs .footer-contact i {
  margin-top: 3px;
  color: #f59e0b;
  width: 18px;
  text-align: center;
 }

 #footer.footer-bs .footer-contact a,
 #footer.footer-bs .footer-contact span {
  color: #cbd5e1;
  text-decoration: none;
  line-height: 1.4;
 }

 #footer.footer-bs .footer-contact a:hover {
  color: #ffffff;
 }

 #footer.footer-bs .footer-social .socialicons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
 }

 #footer.footer-bs .footer-bottom {
  text-align: left;
 }

 #footer.footer-bs .footer-bottom .container-fluid > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
 }

 #footer.footer-bs .footer-social .socialicons a {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
 }

 #footer.footer-bs .footer-social .socialicons a:hover {
  background: rgba(245, 158, 11, 0.25);
  transform: translateY(-2px);
 }

 #footer.footer-bs .footer-copy,
 #footer.footer-bs .footer-credit {
  color: #cbd5e1;
  font-size: 13px;
 }

 #footer.footer-bs .footer-credit a {
  color: #cbd5e1;
  text-decoration: none;
 }

 #footer.footer-bs .footer-credit a:hover {
  color: #ffffff;
  text-decoration: underline;
 }

/* Footer mobile - up to 768px */
@media (max-width: 768px) {
  #footer.footer-bs .footer-title::after {
    margin-left: 0;
  }

  #footer.footer-bs .footer-links a {
    transform: none;
  }

  #footer.footer-bs .footer-links a:hover {
    transform: none;
  }
}

/* Footer tablet - 769px to 992px */
@media (min-width: 769px) and (max-width: 992px) {
  #footer.footer-bs .footer-title {
    font-size: 15px;
  }
}

/* Auth pages */
.auth-page { padding: 80px 0; }
.auth-card { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 28px; box-shadow: 0 8px 24px rgba(0,0,0,0.05); }
.auth-card .page-title { text-align: center; margin-bottom: 20px; font-size: 24px; }

/* Contact page */
.contact-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; }
.contact-hero img { width: 100%; height: auto; border-radius: 8px; }
.contact-info { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 24px; }
@media (max-width: 992px) { .contact-hero { grid-template-columns: 1fr; } }

/* Product grid responsive fixes */
.woocommerce.columns-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
}

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce ul.products li.product {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Product grid mobile - up to 480px */
@media (max-width: 480px) {
  .woocommerce.columns-4,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .woocommerce ul.products li.product {
    padding: 12px;
  }
}

/* Product grid small mobile - 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
  .woocommerce.columns-4,
  .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

/* Product grid tablet - 769px to 992px */
@media (min-width: 769px) and (max-width: 992px) {
  .woocommerce.columns-4,
  .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* Product card mobile fixes */
@media (max-width: 768px) {
  .woocommerce ul.products li.product img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
  }
  
  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
    line-height: 1.4;
    margin: 10px 0 5px 0;
    min-height: 40px;
  }
  
  .woocommerce ul.products li.product .price {
    font-size: 16px;
    font-weight: 600;
    margin: 5px 0;
  }
  
  .woocommerce ul.products li.product .button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border-radius: 6px;
    margin-top: 10px;
  }
}

/* Cart table mobile fixes */
@media (max-width: 768px) {
  .shop_table.shop_table_responsive {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .shop_table.shop_table_responsive thead {
    display: none;
  }
  
  .shop_table.shop_table_responsive tbody,
  .shop_table.shop_table_responsive tr {
    display: block;
    width: 100%;
  }
  
  .shop_table.shop_table_responsive td {
    display: block;
    text-align: right;
    position: relative;
    padding: 10px 15px 10px 50%;
    border-bottom: 1px solid #eee;
  }
  
  .shop_table.shop_table_responsive td:before {
    content: attr(data-title);
    position: absolute;
    left: 15px;
    width: 45%;
    padding-right: 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
  }
  
  .shop_table.shop_table_responsive td.product-remove,
  .shop_table.shop_table_responsive td.product-thumbnail {
    text-align: center;
    padding: 10px;
  }
  
  .shop_table.shop_table_responsive td.product-remove:before,
  .shop_table.shop_table_responsive td.product-thumbnail:before {
    display: none;
  }
}

/* Cart mobile quantity and buttons */
@media (max-width: 480px) {
  .quantity input[type="number"] {
    width: 60px;
    height: 40px;
    font-size: 16px;
    text-align: center;
  }
  
  .wc-proceed-to-checkout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }
  
  .wc-proceed-to-checkout .button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    text-align: center;
  }
  
  .cart_totals {
    margin-top: 30px;
  }
  
  .cart_totals h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }
}

/* Checkout form mobile fixes */
@media (max-width: 768px) {
  .woocommerce-billing-fields,
  .woocommerce-shipping-fields {
    margin-bottom: 30px;
  }
  
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .form-row {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .form-row-first,
  .form-row-last {
    width: 100%;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
  }
  
  .woocommerce-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-top: 20px;
  }
}

/* Product sorting mobile fixes */
@media (max-width: 768px) {
  .woocommerce-ordering {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .product-categories-combobox,
  .orderby {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
  }
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
  /* Page titles mobile */
  .page-title {
    font-size: 24px;
    margin: 20px 0;
    text-align: center;
  }
  
  /* Button mobile fixes */
  .button, .btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 6px;
    touch-action: manipulation;
  }
  
  /* Form inputs mobile */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
  }
  
  /* Table mobile */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
  }
  
  /* Images mobile */
  img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
  }
  
  /* Spacing mobile */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Hide desktop elements */
  .desktop-only {
    display: none !important;
  }
  
  /* Show mobile elements */
  .mobile-only {
    display: block !important;
  }
}

/* Desktop optimizations */
@media (min-width: 769px) {
  .desktop-only {
    display: block !important;
  }
  
  .mobile-only {
    display: none !important;
  }
}

/* Footer contact icons styling */
.footer-sidebar .social_wrap .menu li {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.footer-sidebar .social_wrap .menu li i {
    margin-right: 10px;
    font-size: 14px;
    color: #666;
    min-width: 16px;
}

.footer-sidebar .social_wrap .menu li a {
    color: inherit;
    text-decoration: none;
}

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: #25D366;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  font-weight: 700;
}

.wa-float:hover {
  filter: brightness(0.95);
}

.wa-float__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.15);
  font-size: 18px;
}

.wa-float__text {
  line-height: 1;
}

@media (max-width: 576px) {
  .wa-float {
    right: 14px;
    bottom: 14px;
    padding: 12px;
  }

  .wa-float__text {
    display: none;
  }
}

.footer-sidebar .social_wrap .menu li a:hover {
    text-decoration: underline;
}

