/* =========================================
   GlobalMart Custom Styles
   ========================================= */

/* ---------- Scroll to Top Button ---------- */
#myBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    border: none;
    outline: none;
    background: var(--primary, #e62d04);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}
#myBtn:hover {
    background: var(--hov-primary, #c52907);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* ---------- General Improvements ---------- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

* {
    scroll-behavior: smooth;
}

/* ---------- Buttons ---------- */
.btn-primary {
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-secondary {
    transition: all 0.3s ease;
    border-radius: 6px;
}
.btn-secondary:hover {
    transform: translateY(-1px);
}
.btn-danger {
    border-radius: 6px;
    transition: all 0.3s ease;
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ---------- Cards & Shadows ---------- */
.aiz-card-box {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}
.aiz-card-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
}
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* ---------- Product Card Improvements ---------- */
.product-box .aiz-card-box:hover .img-fluid,
.product-box .aiz-card-box:hover img {
    transform: scale(1.05);
}
.product-box img {
    transition: transform 0.4s ease;
}

/* ---------- Navigation & Header ---------- */
.top-navbar {
    font-size: 13px;
}
.top-navbar a {
    transition: color 0.2s ease;
}
.top-navbar a:hover {
    color: var(--primary, #e62d04) !important;
}

header {
    transition: box-shadow 0.3s ease;
}

/* Search bar styling */
#search {
    border-radius: 8px 0 0 8px !important;
    padding: 10px 16px;
    font-size: 14px;
}
#search:focus {
    box-shadow: none;
    outline: none;
}
.input-group-append .btn {
    border-radius: 0 8px 8px 0;
    padding: 10px 20px;
}

/* Header menu styling */
.border-top.border-gray-200 ul li a {
    position: relative;
    transition: all 0.2s ease;
}
.border-top.border-gray-200 ul li a:hover {
    color: var(--primary, #e62d04) !important;
}

/* ---------- Footer Improvements ---------- */
footer.bg-black {
    background: #1a1a2e !important;
}

.footer-widget {
    background: #16213e !important;
}

.footer-widget a {
    transition: all 0.2s ease;
}
.footer-widget a:hover {
    color: var(--primary, #e62d04) !important;
}

.footer-widget h4 {
    font-size: 15px;
    letter-spacing: 0.5px;
}

.social li a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    font-size: 16px;
}
.social li a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.social.colored li a.facebook:hover { background: #3b5998; color: #fff; }
.social.colored li a.twitter:hover { background: #1da1f2; color: #fff; }
.social.colored li a.instagram:hover { background: #e4405f; color: #fff; }
.social.colored li a.youtube:hover { background: #ff0000; color: #fff; }
.social.colored li a.linkedin:hover { background: #0077b5; color: #fff; }

/* ---------- Mobile Bottom Navigation ---------- */
.aiz-mobile-bottom-nav {
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
}
.aiz-mobile-bottom-nav .col-auto a span.align-items-center {
    transition: all 0.3s ease;
}
.aiz-mobile-bottom-nav .col a:hover {
    color: var(--primary, #e62d04) !important;
}

/* ---------- Flash Sale Section ---------- */
.bg-soft-primary {
    background: var(--soft-primary) !important;
}

/* ---------- Category Menu ---------- */
.category-menu-icon-box .dropdown-toggle {
    transition: all 0.2s ease;
}
.category-menu-icon-box .dropdown-toggle:hover {
    background: var(--primary, #e62d04) !important;
    color: #fff !important;
}

/* ---------- Product Listing & Search ---------- */
.typed-search-box {
    border-radius: 0 0 10px 10px;
    max-height: 450px;
    overflow-y: auto;
}

/* ---------- Cookie Alert ---------- */
.aiz-cookie-alert {
    animation: slideUp 0.5s ease;
}
@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---------- Modals ---------- */
.modal-content {
    border-radius: 12px;
    border: none;
}
.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 24px;
}
.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 16px 24px;
}

/* ---------- Form Inputs ---------- */
.form-control {
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}
.form-control:focus {
    border-color: var(--primary, #e62d04);
    box-shadow: 0 0 0 3px var(--soft-primary);
}

/* ---------- Badge Improvements ---------- */
.badge-primary {
    background: var(--primary, #e62d04) !important;
}

/* ---------- Rating Stars ---------- */
.rating .star {
    color: #ffc107;
}

/* ---------- Table Styling ---------- */
.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

/* ---------- Card Header ---------- */
.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 20px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.has-transition {
    transition: all 0.3s ease;
}

/* ---------- Homepage Section Headers ---------- */
.border-bottom.border-primary {
    border-width: 2px !important;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    #myBtn {
        bottom: 80px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
    .footer-widget .col-lg-5,
    .footer-widget .col-lg-3,
    .footer-widget .col-lg-2 {
        margin-bottom: 2rem;
    }
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ---------- Selection Color ---------- */
::selection {
    background: var(--primary, #e62d04);
    color: #fff;
}

/* ---------- Loading Spinner ---------- */
.c-preloader .la-spin {
    color: var(--primary, #e62d04);
}

/* ---------- Newsletter Form ---------- */
.footer-widget .form-group .form-control {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 8px 0 0 8px;
}
.footer-widget .form-group .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}
.footer-widget .form-group .form-control:focus {
    border-color: var(--primary, #e62d04);
    box-shadow: none;
}
.footer-widget .btn-primary {
    border-radius: 0 8px 8px 0;
}

/* ---------- App Store Badges ---------- */
.mx-100.h-40px {
    transition: opacity 0.2s ease;
}
.mx-100.h-40px:hover {
    opacity: 0.8;
}

/* =========================================
   POS System Styles
   ========================================= */

/* ---------- POS Product Card ---------- */
.pos-product-card {
    transition: all 0.2s ease;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}
.pos-product-card:hover {
    border-color: var(--primary, #e62d04);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}
.pos-product-card.border-danger {
    border-color: #dc3545;
    opacity: 0.7;
}
.pos-product-img {
    overflow: hidden;
    background: #f8f9fa;
}
.pos-product-img img {
    transition: transform 0.3s ease;
}
.pos-product-card:hover .pos-product-img img {
    transform: scale(1.05);
}

/* ---------- POS Cart ---------- */
.pos-cart-items {
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}
.pos-cart-items::-webkit-scrollbar {
    width: 4px;
}
.pos-cart-items::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}
.pos-cart-item {
    transition: background 0.2s ease;
}
.pos-cart-item:hover {
    background: #f8f9fa;
}

/* ---------- POS Search ---------- */
#pos-search {
    border-radius: 8px;
    font-size: 14px;
    padding: 10px 15px;
}
#pos-search:focus {
    border-color: var(--primary, #e62d04);
    box-shadow: 0 0 0 3px var(--soft-primary);
}

/* ---------- POS Wrapper ---------- */
.pos-wrapper {
    min-height: calc(100vh - 200px);
}

/* ---------- POS Quantity Input ---------- */
.pos-cart-item .input-group {
    width: 110px;
}
.pos-cart-item .form-control {
    font-weight: 600;
    font-size: 13px;
}
.pos-cart-item .btn-sm {
    padding: 2px 8px;
    font-size: 11px;
}

/* ---------- POS Summary ---------- */
#pos-cart-summary .form-control-sm {
    font-size: 12px;
    padding: 2px 8px;
}

/* ---------- POS Print Styles ---------- */
@media print {
    .aiz-sidebar-wrap,
    .aiz-topbar,
    .aiz-mobile-bottom-nav,
    #pos-product-grid,
    .btn,
    .card-header {
        display: none !important;
    }
    .pos-wrapper .col-lg-8 {
        display: none !important;
    }
    .pos-wrapper .col-lg-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}
