/* =======================================
   COMMON STYLES - CLEANED VERSION
   ======================================= */

:root {
    --teal: #065ef5fd;
    --teal_hover: #043c9dfd;
    --copyright-bg-color: #033683;
    --copyright-text-color: #ffffff;
    --copyright-border-color: #343a40;
    --footer-logo-max-width: 120px;
    --developer-link-color: #ffffff;
}

/* Base Styles */
* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    /*margin: 0;*/
    padding: 0;
    margin-top:70px !important;
}

/* Container Styles */
.container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container {
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 0 !important;
}

/* Navigation Styles */
.navbar {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#nav-bar {
    margin: 0;
    padding: 10px 20px 25px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100px;
    z-index: 1030;
    border-bottom: 2px solid #d6f4ff;
    transition: width 0.3s ease-in-out;
}

#nav-bar .navbar-brand {
    position: relative;
    padding: 0 10px;
    color: #ff0303 !important;
    font-size: 18px;
}

#nav-bar .navbar-brand img {
    width: 120px !important;
    height: auto !important;
    margin: 0px 15px 0px 10px !important;
    display: block;
}

#nav-bar .navbar-nav {
    display: flex;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 0;
}

#nav-bar .nav-link {
    position: relative;
    padding: 0 10px;
    color: #ffffff;
    font-size: 18px;
}

#nav-bar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #0d4cf9;
    transition: width 0.3s ease-in-out;
}

#nav-bar .nav-link:hover::after {
    width: 100%;
}

#nav-bar .nav-link.active {
    color: #16151fcf !important;
    font-weight: bold;
}

/* Dropdown Menu Styles */
.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.btn-group .btn-outline-primary {
    background-color: transparent;
    color: inherit !important;
    border-color: #dee2e6;
    transition: all 0.3s ease;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-group .btn-outline-primary:hover {
    background-color: #0546f8;
    color: #fcfa84 !important;
    border-color: #adb5bd;
}

.btn-group .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.btn-group .dropdown-menu {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    float: left;
    min-width: 12rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529 !important;
    text-align: left;
    list-style: none;
    background-color: #e9f0ff;
    background-clip: padding-box;
    border: 1px solid #01203f;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn-group.show .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

.btn-group .dropdown-menu li {
    margin: 0;
    padding: 0;
    background-color: #eef1f8;
    color: #007bff !important;
    transition: all 0.3s ease;
}

.btn-group .dropdown-menu li:not(:last-child) {
    border-bottom: 1px solid #575757;
}

.btn-group .dropdown-menu li .dropdown-item {
    color: #333 !important;
    padding: 0.75rem 1.5rem;
    font-size: 14px;
    display: block;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    background: transparent;
    border: 0;
    width: 100%;
    text-align: left;
    clear: both;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
}

.btn-group .dropdown-menu li:hover {
    background-color: #0648fc !important;
    color: white !important;
}

.btn-group .dropdown-menu li .dropdown-item:hover {
    color: #1f1e1e !important;
    background-color: transparent;
    padding-left: 1.75rem;
}

.btn-group .dropdown-menu li .dropdown-item:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dropdown Icons */
.btn-group .dropdown-menu li:nth-child(1) .dropdown-item::before,
.btn-group .dropdown-menu li:nth-child(2) .dropdown-item::before,
.btn-group .dropdown-menu li:nth-child(3) .dropdown-item::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.btn-group .dropdown-menu li:nth-child(1) .dropdown-item::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

.btn-group .dropdown-menu li:nth-child(2) .dropdown-item::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z'/%3E%3C/svg%3E");
}

.btn-group .dropdown-menu li:nth-child(3) .dropdown-item::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z'/%3E%3C/svg%3E");
}

/* Button Styles */
.btn-custom {
    background: linear-gradient(120deg, #1279f6, #011d3f);
    border: none;
    color: #ece9ff;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-custom:hover {
    background: linear-gradient(90deg, #0e77f7, #90c1fd);
    color: #fdfdfd;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Form Styles */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 12px;
    font-size: 14px;
    color: #333 !important;
}

/* Cart Specific Styles */
.sticky-cart-header {
    position: sticky;
    top: 90px;
    left: 0;
    width: 100%;
    background-color: #fefefe;
    border-bottom: 1px solid #fdfdfd;
    padding: 10px 0;
    z-index: 1020;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

main.col-lg-9 {
    border-right: 1px solid #dee2e6;
    padding-right: 30px;
}

aside.col-lg-3 {
    padding-left: 30px;
}

.cart-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 40px;
}

.sticky-summary {
    position: sticky;
    top: 200px;
}

.cart-main-img-container {
    width: 100%;
    max-width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.cart-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-thumb-container {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.cart-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer Styles */
.footer-content {
    padding: 20px 40px;
}

.f-nav .nav-link {
    font-size: 13px;
    position: relative;
    text-decoration: none;
    color: rgb(255, 255, 255) !important;
    padding-bottom: 1px;
    display: inline-block;
    transition: color 0.3s ease;
}

.f-nav .nav-link:hover {
    color: #06a3fd !important;
}

.f-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #8d8d8d;
    transition: width 0.3s ease;
}

.f-nav .nav-link:hover::after {
    width: 100%;
}

.footer-section {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #c4c4c4 !important;
    line-height: 1.6;
}

.footer-section .navbar-brand {
    font-size: 22px;
    color: #fffefe !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0px !important;
}

.footer-section .navbar-brand:hover {
    color: #007bff;
}

.footer-section .custom-paragraph {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

.copyright-content {
    background-color: #021a32;
    color: #007bff !important;
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: last baseline;
}

.footer-text {
    margin-left: 2px;
    color: white !important;
    font-size: 10px;
    font-style: italic;
    font-family: 'Ubuntu', sans-serif;
}

.copyright-section {
    background-color: var(--copyright-bg-color);
    border-top: 1px solid var(--copyright-border-color);
    font-size: 0.875rem;
}

.copyright-text {
    color: var(--copyright-text-color) !important;
}

.footer-logo-link {
    display: inline-block;
    transition: opacity 0.2s ease-in-out;
}

.footer-logo-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.footer-logo {
    max-width: var(--footer-logo-max-width);
    height: auto;
}

.developer-credit {
    display: inline-block;
    color: var(--copyright-text-color);
    font-size: 0.75rem;
}

.developer-link {
    color: var(--developer-link-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.developer-link:hover {
    color: var(--developer-link-color);
    text-decoration: underline;
}

/* Special Styles */
#myAccountDropdown {
    color: white !important;
}

.ngc-logo-icon {
    width: 50px !important;
    height: 50px !important;
    transform: translateY(10px);
}

/* Utility Classes */
.text-decoration-none {
    text-decoration: none;
}

.shadow-none {
    box-shadow: none !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.position-relative {
    position: relative !important;
}

.position-absolute {
    position: absolute !important;
}

.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.text-center {
    text-align: center !important;
}

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.p-0 {
    padding: 0 !important;
}

.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.fs-4 {
    font-size: calc(.9rem + 0.3vw) !important;
}

.fs-5 {
    font-size: 1.25rem !important;
}

.fs-6 {
    font-size: 14px !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.bg-white {
    background-color: #fff !important;
}

.border {
    border: 1px solid #dee2e6 !important;
}

.rounded {
    border-radius: 0.25rem !important;
}

/* Dropdown Positioning Fixes */
.btn-group .dropdown-menu[x-placement^="bottom"] {
    top: 100%;
    transform: translateY(0);
}

.btn-group .dropdown-menu[x-placement^="top"] {
    bottom: 100%;
    top: auto;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Remove white space at top */
    html, body {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Fix navbar height and positioning */
    .navbar {
        min-height: auto !important;
        padding: 8px 0 !important;
    }
    
    #nav-bar {
        min-height: auto !important;
        padding: 8px 15px !important;
    }
    
    /* Reduce logo size on mobile */
    #nav-bar .navbar-brand img {
        width: 80px !important;
        height: auto !important;
        margin: 0 !important;
    }
    
    /* Fix search container */
    #global-search-container {
        margin: 5px 0 !important;
    }
    
    /* Reduce search input height */
    #global-search-box, #global-category-filter {
        height: 35px !important;
        font-size: 14px !important;
    }
    
    /* Fix carousel height on mobile */
    .background-carousel-wrapper {
        height: 200px !important;
        margin-top: 0 !important;
    }
    
    .background-carousel-wrapper .carousel-item img {
        height: 200px !important;
    }
    
    /* Adjust content positioning */
    .main-content-above-carousel {
        margin-top: 0 !important;
    }
    
    /* Fix dropdown menu on mobile */
    .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: auto !important;
        width: auto !important;
        max-width: 250px !important;
    }
    
    /* Prevent dropdown from going off-screen */
    .btn-group .dropdown-menu {
        right: 0;
        left: auto;
        max-width: 250px;
    }
    
    /* Ensure dropdown is visible when show class is added */
    .btn-group.show .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media (max-width: 575px) {
    #nav-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 50px;
        z-index: 1030;
    }

    #nav-bar .navbar-brand img {
        width: 80px !important;
        margin: 10px auto 0px auto !important;
    }

    #nav-bar .navbar-brand {
        margin-left: 10px;
    }

    #nav-bar .navbar-nav {
        flex-direction: column;
        gap: 10px;
    }

    #nav-bar .navbar-nav .nav-item {
        text-align: left;
        font-size: 12px !important;
    }

    /*.my-5 {*/
    /*    margin-top: 100px !important;*/
    /*    margin-bottom: 50px;*/
    /*}*/

    .h-font {
        font-size: .85rem;
    }
    
    .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.my-5 {
    margin-top: 11rem !important;
    margin-bottom: 3rem !important;
}

.container, .my-5 {
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 0 !important;
        margin-top: 11rem !important;
    margin-bottom: 3rem !important;
}


}

/* Header and Search Bar Fixes */
@media (max-width: 768px) {
    #nav-bar {
        padding: 10px 15px !important;
        min-height: auto !important;
    }
    
    #nav-bar .navbar-brand img {
        width: 100px !important;
        height: auto !important;
    }
    
    #global-search-container {
        margin: 10px 0 !important;
    }
    
    .input-group {
        display: flex;
        align-items: stretch;
        width: 100%;
    }
    
    .input-group-text {
        display: flex;
        align-items: center;
        padding: 0 10px;
        background-color: #fff;
        border: 1px solid #ced4da;
        border-right: 0;
    }
    
    .form-control {
        height: auto !important;
        padding: 8px 12px !important;
    }
    
    .form-select {
        height: auto !important;
        padding: 8px 12px !important;
    }
}

/* Category Filter Text Size */
#global-category-filter option {
    font-size: 14px;
}

@media (max-width: 768px) {
    #global-category-filter option {
        font-size: 12px;
    }
}


