/*
Theme Name: Gadget99
Theme URI: https://gadget99.com.bd
Author: Salman Hossain
Author URI: https://wa.me/8801985121322
Description: A custom, ultra-fast, mobile-first WooCommerce theme developed specifically for Gadget99. Built without page builders for maximum performance.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gadget99
*/

/*
 * -----------------------------------------------------------------------------
 * Tailwind CSS Directives
 * -----------------------------------------------------------------------------
 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/*
 * -----------------------------------------------------------------------------
 * Custom Native CSS (Only for things Tailwind can't handle directly)
 * -----------------------------------------------------------------------------
 */
:root {
    --brand-primary: #0446DB; /* Gadget99 Blue */
    --brand-dark: #0335a6;    /* Gadget99 Dark Blue */
    --brand-accent: #0446DB;  /* E-commerce accent color */
}

/* Hide scrollbar for horizontal scrolling elements (like the Trust Badges) */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/*
 * -----------------------------------------------------------------------------
 * Logo Strict Sizing (Prevents large images from breaking the header)
 * -----------------------------------------------------------------------------
 */
.site-branding img.custom-logo {
    max-height: 55px !important; /* Locks the height perfectly to the header */
    width: auto !important;      /* Keeps your square ratio perfect */
    height: auto;
    object-fit: contain;
}

/* Make it slightly smaller on mobile phones for a better app-feel */
@media (max-width: 768px) {
    .site-branding img.custom-logo {
        max-height: 40px !important;
    }
}

/* Base resets for WooCommerce compatibility */
html, body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/*
 * -----------------------------------------------------------------------------
 * Desktop Navigation Dropdown Styles
 * -----------------------------------------------------------------------------
 */
.main-navigation > ul > li {
    padding: 0.875rem 0; /* Expands the hover area down to the dropdown box */
}

/* Top level link hover effect */
.main-navigation > ul > li > a {
    transition: color 0.2s ease;
}
.main-navigation > ul > li > a:hover {
    color: var(--brand-accent); 
}

.main-navigation li {
    position: relative;
}

/* Hide sub-menu by default, position it absolutely */
.main-navigation ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Soft floating shadow */
    min-width: 250px;
    z-index: 1000;
    border-radius: 8px; 
    padding: 0.75rem 0;
    margin-top: 2px;
}

/* Handle 3rd level dropdowns (sub-menu inside sub-menu) */
.main-navigation ul.sub-menu ul.sub-menu {
    top: -0.75rem;
    left: 100%;
    margin-top: 0;
    margin-left: 2px;
}

/* Show sub-menu on hover */
.main-navigation li:hover > ul.sub-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

/* Sub-menu link styling */
.main-navigation ul.sub-menu li a {
    display: block;
    position: relative; /* Needed for the + icon */
    padding: 10px 24px;
    color: #374151; /* Dark gray */
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
    white-space: normal;
}

/* Add the "+" icon automatically to items that have a sub-menu */
.main-navigation ul.sub-menu li.menu-item-has-children > a::after {
    content: "+";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 500; 
    color: #374151; 
    transition: color 0.2s ease;
}

/* Hover effect on sub-menu links */
.main-navigation ul.sub-menu li a:hover {
    background-color: #f9fafb; /* Very light gray hover background */
    color: var(--brand-accent); /* Brand text on hover */
    padding-left: 28px; /* Slight slide right effect */
}

/* Change + icon color on hover */
.main-navigation ul.sub-menu li.menu-item-has-children:hover > a::after {
    color: var(--brand-accent);
}

/* Simple fade-in animation for dropdowns */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/*
 * -----------------------------------------------------------------------------
 * Mobile Navigation Dropdown Styles (Off-Canvas Sidebar)
 * -----------------------------------------------------------------------------
 */
.mobile-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Spacing between main menu items */
.mobile-navigation > ul > li {
    margin-bottom: 1.25rem; 
}

/* Link styling: Flexbox pushes the + icon to the far right */
.mobile-navigation li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: #0f172a; 
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-navigation li a:hover {
    color: var(--brand-accent);
}

/* Add the "+" icon to mobile menu items that have sub-menus */
.mobile-navigation li.menu-item-has-children > a::after {
    content: "+";
    font-size: 22px;
    font-weight: 400;
    color: #0f172a; 
}

/* Hide sub-menus by default on mobile */
.mobile-navigation ul.sub-menu {
    display: none;
    padding-left: 1rem;
    margin-top: 1rem;
    border-left: 2px solid #f3f4f6;
}

.mobile-navigation ul.sub-menu li {
    margin-bottom: 1rem;
}

.mobile-navigation ul.sub-menu li:last-child {
    margin-bottom: 0;
}

.mobile-navigation ul.sub-menu li a {
    font-size: 15px;
    font-weight: 400;
    color: #4b5563; /* Lighter gray for sub-items */
}