/* Bootstrap 5 Compatibility Fixes */

/* Fix for white strip below footer - only reset body margin */
body {
    margin-bottom: 0 !important;
}

/* Ensure widget category links remain clickable above overlays */
.product-widget { position: relative; }
.product-widget .product-img { position: absolute; left: 0; top: 0; width: 60px; z-index: 1; }
.product-widget .product-body { position: relative; z-index: 2; }
.product-widget .product-body .product-category a { position: relative; z-index: 3; pointer-events: auto; }

/* In slick containers, make sure slides don't overlay inner links */
.products-widget-slick .slick-list { z-index: 1; }
.products-widget-slick .slick-slide { position: relative; z-index: 1; }

/* Modern pill pagination styling */
.pagination-nav { display: flex; align-items: center; }
.pagination-nav .pagination {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  gap: 2px;
}
.pagination-nav .page-item .page-link {
  color: #212529;
  background: transparent;
  border: 0;
  padding: 0.5rem 0.9rem;
}
.pagination-nav .page-item.disabled .page-link {
  color: #adb5bd;
  pointer-events: none;
}
.pagination-nav .page-item.active .page-link,
.pagination-nav .page-item .page-link.bg-danger {
  background-color: #9d101c !important; /* Smartware maroon */
  color: #fff !important;
  border-radius: 999px;
}
.pagination-nav .page-item .page-link:hover {
  background: rgba(157,16,28,0.08); /* subtle maroon tint */
  border-radius: 999px;
}
.pagination-nav .page-item.disabled .page-link:hover { background: transparent; }
.pagination-info { font-size: 0.95rem; }

/* Dropdown Menu Fixes */
.dropdown-menu {
    margin-top: 0.125rem;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    min-width: 10rem;
    padding: 0.5rem 0;
}

/* Grid System Fixes */
.row {
    --bs-gutter-x: 1.5rem;
    /* Do not force vertical gutters to 0; allow utilities like gy-* to work */
    /* --bs-gutter-y: 0; */
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(var(--bs-gutter-x) * -0.5);
    margin-left: calc(var(--bs-gutter-x) * -0.5);
}

/* Ensure Bootstrap's gy-* utilities win over the base .row rule in this file */
.gy-0 { --bs-gutter-y: 0 !important; }
.gy-1 { --bs-gutter-y: .25rem !important; }
.gy-2 { --bs-gutter-y: .5rem !important; }
.gy-3 { --bs-gutter-y: 1rem !important; }
.gy-4 { --bs-gutter-y: 1.5rem !important; }
.gy-5 { --bs-gutter-y: 3rem !important; }

.row > * {
    flex-shrink: 0;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
}

/* Navbar Toggler Focus */
.navbar-toggler:focus {
    outline: 2px solid #9d101c;
    outline-offset: 2px;
    box-shadow: none;
}

/* Card Focus */
.card:focus {
    outline: 2px solid #9d101c;
    outline-offset: 2px;
}

/* Button Focus */
.btn:focus {
    outline: 2px solid #9d101c;
    outline-offset: 2px;
    box-shadow: 0 0 0 .2rem rgba(157,16,28,.25);
}

/* Form Control Focus */
.form-control:focus {
    border-color: #9d101c;
    box-shadow: 0 0 0 .2rem rgba(157,16,28,.25);
}

/* Slick slider controls focus override (vendor CSS disables outlines) */
.slick-prev:focus,
.slick-next:focus,
.slick-dots li button:focus {
    outline: 2px solid #9d101c !important;
    outline-offset: 2px !important;
}

/* Modal Dialog */
.modal-dialog {
    margin: 1.75rem auto;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

/* Dropdown Cart */
.cart-dropdown {
    position: absolute;
    width: 300px;
    background: #fff;
    padding: 15px;
    box-shadow: 0px 0px 0px 2px #e4e7ed;
    z-index: 99;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown.show .cart-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header Fixes */
.header-search form .input-select {
    margin-right: 0;
    border-radius: 0;
}

.header-search form .input {
    width: 100%;
    margin-right: 0;
}

.header-search form .search-btn {
    height: 40px;
    width: 100px;
    background: #d10024;
}

/* Navigation Fixes */
.navigation-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation-list li {
    margin-right: 15px;
}

/* Main Navigation Fixes */
.main-nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.main-nav > li {
    float: left;
    margin-right: 30px;
}

.main-nav > li > a {
    display: block;
    text-transform: uppercase;
    padding: 20px 0px;
}

.main-nav > li > a:hover,
.main-nav > li > a:focus,
.main-nav > li.active > a {
    color: #D10024;
    background-color: transparent;
}

.main-nav > li > a:after {
    content: "";
    display: block;
    width: 0%;
    height: 2px;
    background-color: #D10024;
    transition: 0.2s all;
}

.main-nav > li > a:hover:after,
.main-nav > li > a:focus:after,
.main-nav > li.active > a:after {
    width: 100%;
}

/* Responsive Navigation */
@media only screen and (max-width: 991px) {
    .main-nav {
        margin: 0px;
        border-top: 1px solid #E4E7ED;
        max-height: 0px;
        overflow: hidden;
        transition: max-height 0.3s;
        flex-direction: column;
        width: 100%;
    }
    
    .main-nav.show {
        max-height: 500px;
    }
    
    .main-nav > li {
        float: none;
        margin-right: 0;
    }
    
    .main-nav > li + li {
        margin-top: 5px;
    }
}

/* Product Card Fixes */
.product {
    position: relative;
    margin: 15px 0px;
    box-shadow: 0px 0px 0px 0px #e4e7ed, 0px 0px 0px 1px #e4e7ed;
    transition: box-shadow 0.2s ease-in-out;
    background-color: #FFF;
    display: block;
    width: 100%;
}

.product:hover {
    box-shadow: 0px 0px 6px 0px #e4e7ed, 0px 0px 0px 2px #d10024;
}

.product .product-img {
    position: relative;
    overflow: hidden;
}

.product .product-img > img {
    width: 100%;
    height: auto;
}

.product .product-body {
    position: relative;
    padding: 15px;
    background-color: #FFF;
    text-align: center;
    z-index: 20;
}

.product .product-body .product-category {
    text-transform: uppercase;
    font-size: 12px;
    color: #8D99AE;
}

.product .product-body .product-name {
    text-transform: uppercase;
    font-size: 14px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.product .product-body .product-name > a {
    font-weight: 700;
    color: #2B2D42;
    text-decoration: none;
}

.product .product-body .product-name > a:hover, 
.product .product-body .product-name > a:focus {
    color: #D10024;
}

.product .product-body .product-price {
    color: #D10024;
    font-size: 18px;
    margin-bottom: 10px;
}

.product .product-body .product-btns {
    margin-top: 15px;
}

.product .product-body .product-btns > button {
    position: relative;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: transparent;
    border: none;
    transition: 0.2s all;
    margin-right: 5px;
}

.product .product-body .product-btns > button:hover {
    background-color: #E4E7ED;
    color: #D10024;
    border-radius: 50%;
}

/* Newsletter Section Fixes */
.newsletter {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.newsletter form {
    display: flex;
    width: 100%;
    max-width: 600px;
}

.newsletter form .input {
    flex-grow: 1;
    margin-right: 0;
}

.newsletter form .newsletter-btn {
    height: 40px;
    width: auto;
    padding: 0 15px;
}

/* Social Media Icons Fixes */
.social-icons {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-icons li {
    margin-right: 10px;
}

/* Fix for header cart and wishlist */
.header-ctn {
    display: flex;
    align-items: center;
}

.header-ctn > div {
    display: inline-block;
    margin-right: 15px;
    position: relative;
}

.header-ctn > div > a {
    display: block;
    position: relative;
    width: 90px;
    text-align: center;
    color: #2B2D42;
}

.header-ctn > div > a > i {
    display: block;
    font-size: 18px;
}

.header-ctn > div > a > span {
    font-size: 12px;
}

.header-ctn > div > a > .qty {
    position: absolute;
    right: 15px;
    top: -10px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    font-size: 10px;
    color: #FFF;
    background-color: #D10024;
}

/* Fix for breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding-right: 0.5rem;
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Fix for product section */
.product-section {
    margin-top: 30px;
}

.product-section + .product-section {
    margin-top: 30px;
}

/* Fix for section title */
.section-title {
    position: relative;
    margin-bottom: 30px;
    margin-top: 15px;
}

.section-title h3 {
    font-size: 28px;
    text-transform: uppercase;
    margin: 0;
}

.section-title .section-nav {
    float: right;
}

/* Fix for slick slider */
.slick-prev, .slick-next {
    width: 40px;
    height: 40px;
    background: #d10024;
    z-index: 22;
    border-radius: 50%;
    opacity: 0.8;
}

.slick-prev:hover, .slick-next:hover {
    background: #d10024;
    opacity: 1;
}

/* Fix for store filter */
.store-filter {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Fix for main header */
.main-header {
    padding: 20px 0;
}

/* Fix for top header */
.top-header {
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #1E1F29;
}

/* Fix for main nav */
.main-nav > li > a {
    padding: 20px 0px;
    color: #2B2D42;
    font-weight: 500;
    transition: 0.2s all;
}

/* Fix for wishlist icon */
.wishlist-icon {
    display: inline-block;
    position: relative;
}

/* Fix for search form */
.header-search form {
    display: flex;
    width: 100%;
}

/* Fix for header search layout */
.header-search {
    padding: 15px 0;
}

.header-search form .input-select {
    width: 120px;
}

.header-search form .search-btn {
    background: #D10024;
    color: #FFF;
    font-weight: 700;
    border: none;
    border-radius: 0px 40px 40px 0px;
    display: inline-block;
}

/* Fix for product widget */
.product-widget {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #E4E7ED;
}

/* Fix for product widget image */
.product-widget .product-img {
    width: 60px;
    margin-right: 10px;
}

/* Fix for product widget body */
.product-widget .product-body {
    flex: 1;
    padding: 0;
    text-align: left;
}

/* ==========================
   Sales Dashboard UI Polish
   Scoped to #sales-dashboard-pane
   ========================== */
#sales-dashboard-pane {
  --sw-accent: #9d101c; /* Smartware maroon */
}

#sales-dashboard-pane .card {
  border-radius: 12px;
  border-color: #eceff4;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

#sales-dashboard-pane .card-header {
  background: #fff;
  border-bottom-color: #eef2f7;
}

#sales-dashboard-pane .nav-pills .nav-link,
#sales-dashboard-pane .nav-tabs .nav-link {
  border-radius: 999px;
  padding: .35rem .85rem;
}

#sales-dashboard-pane .nav-pills .nav-link.active,
#sales-dashboard-pane .nav-tabs .nav-link.active {
  background-color: var(--sw-accent);
  color: #fff;
}

#sales-dashboard-pane .progress {
  height: 8px;
  background: #f1f3f5;
  border-radius: 999px;
}

#sales-dashboard-pane .progress .progress-bar {
  background-color: var(--sw-accent);
  border-radius: 999px;
}

#sales-dashboard-pane .kpi-card .kpi-label {
  color: #6c757d;
  font-size: .85rem;
}

#sales-dashboard-pane .kpi-card .kpi-value {
  font-weight: 700;
  font-size: 1.1rem;
}

#sales-dashboard-pane table.table thead th {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #6c757d;
  border-bottom-color: #e9ecef;
}

#sales-dashboard-pane table.table tbody td {
  padding: .5rem .75rem;
  vertical-align: middle;
}

#sales-dashboard-pane .text-truncate { max-width: 100%; }

/* Chart container sizing */
#sales-dashboard-pane #topProductsTrendChart { min-height: 280px; }
