/*
Theme Name: Rathi Electricals
Theme URI: https://github.com/iamyrm
Author: Phoenix Design
Author URI: https://github.com/iamyrm
Description: Custom theme for Rathi Electricals.
Version: 1.0.2
Requires at least: 5.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v3 or Later
License URI: https://www.gnu.org/licenses/gpl.html
Text Domain: rathielectricals

rathielectricals WordPress Theme 2011-2026
rathielectricals is distributed under the terms of the GNU GPL
*/


/*
WORDPRESS ADMIN BAR FIX

/* Desktop (screen > 782px) */
@media screen and (min-width: 783px) {
   body.admin-bar .nav {
      top: 32px;
   }

   body.admin-bar .dealers-page,
   body.admin-bar .product-listing-page,
   body.admin-bar .contact-page,
   body.admin-bar .about-page,
   body.admin-bar .faq-page,
   body.admin-bar .privacy-page,
   body.admin-bar .terms-page,
   body.admin-bar .error-page,
   body.admin-bar .add-dealer-page {
      padding-top: calc(72px + 32px) !important;
   }

   /* For any element with anchor links */
   body.admin-bar [id] {
      scroll-margin-top: calc(72px + 32px);
   }
}

/* Tablet (783px - 1024px) - WordPress uses 782px breakpoint */
@media screen and (min-width: 783px) and (max-width: 1024px) {
   body.admin-bar .nav {
      top: 32px;
   }

   body.admin-bar .dealers-page,
   body.admin-bar .product-listing-page,
   body.admin-bar .contact-page,
   body.admin-bar .about-page,
   body.admin-bar .faq-page,
   body.admin-bar .privacy-page,
   body.admin-bar .terms-page,
   body.admin-bar .error-page,
   body.admin-bar .add-dealer-page {
      padding-top: calc(72px + 32px) !important;
   }
}

/* Mobile (screen <= 782px) - WordPress admin bar becomes 46px */
@media screen and (max-width: 782px) {

   /* Keep admin bar visible */
   #wpadminbar {
      display: block !important;
      position: fixed !important;
   }

   body.admin-bar {
      margin-top: 0 !important;
   }

   body.admin-bar .nav {
      top: 46px;
   }

   body.admin-bar .dealers-page,
   body.admin-bar .product-listing-page,
   body.admin-bar .contact-page,
   body.admin-bar .about-page,
   body.admin-bar .faq-page,
   body.admin-bar .privacy-page,
   body.admin-bar .terms-page,
   body.admin-bar .error-page,
   body.admin-bar .add-dealer-page {
      padding-top: calc(72px + 46px) !important;
   }

   /* For any element with anchor links on mobile */
   body.admin-bar [id] {
      scroll-margin-top: calc(72px + 46px);
   }
}

/* Small Mobile (screen <= 480px) - Extra small devices */
@media screen and (max-width: 480px) {
   body.admin-bar .nav {
      top: 46px;
   }

   body.admin-bar .dealers-page,
   body.admin-bar .product-listing-page,
   body.admin-bar .contact-page,
   body.admin-bar .about-page,
   body.admin-bar .faq-page,
   body.admin-bar .privacy-page,
   body.admin-bar .terms-page,
   body.admin-bar .error-page,
   body.admin-bar .add-dealer-page {
      padding-top: calc(72px + 46px) !important;
   }

   /* Make admin bar text smaller on very small screens */
   #wpadminbar {
      font-size: 12px;
   }

   #wpadminbar .ab-item {
      padding: 0 8px;
   }
}

/* Fix for the admin bar when scrolled on mobile */
@media screen and (max-width: 782px) {

   /* Prevent admin bar from hiding on scroll */
   html {
      margin-top: 0 !important;
   }

   #wpadminbar {
      transform: translateY(0) !important;
      transition: none !important;
   }
}