/**
 * AIZ Core CSS Framework
 * TygaShopping - Multi-tenant E-commerce Platform
 */

/* ================================
   CSS Variables
================================ */
:root {
    /* Primary Colors */
    --primary: #e62e04;
    --primary-rgb: 230, 46, 4;
    --primary-dark: #c72804;
    --hov-primary: #c72804;
    --soft-primary: rgba(230, 46, 4, 0.15);

    /* Secondary & Status Colors */
    --secondary: #919199;
    --success: #85b567;
    --info: #3490dc;
    --warning: #ffc700;
    --danger: #ff6262;

    /* Grayscale */
    --light: #f2f3f8;
    --dark: #292933;
    --gray: #6b7280;
    --gray-dark: #343a40;
    --gray-light: #d1d5db;

    /* UI Elements */
    --border-color: #e5e7eb;
    --border-radius: 8px;
    --card-bg: #ffffff;
}

/* ================================
   Base Styles
================================ */
* {
    outline: none;
}

body {
    font-family: 'Public Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    background-color: #f2f3f8;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hov-primary);
    text-decoration: none;
}

/* ================================
   Typography
================================ */
.fs-8 { font-size: 8px !important; }
.fs-9 { font-size: 9px !important; }
.fs-10 { font-size: 10px !important; }
.fs-11 { font-size: 11px !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-14 { font-size: 14px !important; }
.fs-15 { font-size: 15px !important; }
.fs-16 { font-size: 16px !important; }
.fs-17 { font-size: 17px !important; }
.fs-18 { font-size: 18px !important; }
.fs-19 { font-size: 19px !important; }
.fs-20 { font-size: 20px !important; }
.fs-22 { font-size: 22px !important; }
.fs-24 { font-size: 24px !important; }
.fs-26 { font-size: 26px !important; }
.fs-28 { font-size: 28px !important; }
.fs-30 { font-size: 30px !important; }
.fs-32 { font-size: 32px !important; }
.fs-36 { font-size: 36px !important; }
.fs-40 { font-size: 40px !important; }
.fs-48 { font-size: 48px !important; }

.fw-300 { font-weight: 300 !important; }
.fw-400 { font-weight: 400 !important; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

.lh-1 { line-height: 1 !important; }
.lh-1-2 { line-height: 1.2 !important; }
.lh-1-3 { line-height: 1.3 !important; }
.lh-1-4 { line-height: 1.4 !important; }
.lh-1-5 { line-height: 1.5 !important; }
.lh-1-6 { line-height: 1.6 !important; }
.lh-1-8 { line-height: 1.8 !important; }
.lh-2 { line-height: 2 !important; }

/* ================================
   Opacity
================================ */
.opacity-10 { opacity: 0.1 !important; }
.opacity-20 { opacity: 0.2 !important; }
.opacity-30 { opacity: 0.3 !important; }
.opacity-40 { opacity: 0.4 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-60 { opacity: 0.6 !important; }
.opacity-70 { opacity: 0.7 !important; }
.opacity-80 { opacity: 0.8 !important; }
.opacity-90 { opacity: 0.9 !important; }
.opacity-100 { opacity: 1 !important; }

/* ================================
   Sizing
================================ */
.w-25px { width: 25px !important; }
.w-30px { width: 30px !important; }
.w-35px { width: 35px !important; }
.w-40px { width: 40px !important; }
.w-45px { width: 45px !important; }
.w-50px { width: 50px !important; }
.w-60px { width: 60px !important; }
.w-70px { width: 70px !important; }
.w-80px { width: 80px !important; }
.w-100px { width: 100px !important; }
.w-120px { width: 120px !important; }
.w-140px { width: 140px !important; }
.w-160px { width: 160px !important; }
.w-200px { width: 200px !important; }
.w-250px { width: 250px !important; }
.w-300px { width: 300px !important; }

.h-25px { height: 25px !important; }
.h-30px { height: 30px !important; }
.h-35px { height: 35px !important; }
.h-40px { height: 40px !important; }
.h-45px { height: 45px !important; }
.h-50px { height: 50px !important; }
.h-60px { height: 60px !important; }
.h-70px { height: 70px !important; }
.h-80px { height: 80px !important; }
.h-100px { height: 100px !important; }
.h-120px { height: 120px !important; }
.h-140px { height: 140px !important; }
.h-160px { height: 160px !important; }
.h-200px { height: 200px !important; }
.h-210px { height: 210px !important; }
.h-250px { height: 250px !important; }
.h-300px { height: 300px !important; }

.size-15px { width: 15px; height: 15px; }
.size-20px { width: 20px; height: 20px; }
.size-25px { width: 25px; height: 25px; }
.size-30px { width: 30px; height: 30px; }
.size-35px { width: 35px; height: 35px; }
.size-40px { width: 40px; height: 40px; }
.size-45px { width: 45px; height: 45px; }
.size-50px { width: 50px; height: 50px; }
.size-60px { width: 60px; height: 60px; }
.size-64px { width: 64px; height: 64px; }
.size-70px { width: 70px; height: 70px; }
.size-80px { width: 80px; height: 80px; }
.size-100px { width: 100px; height: 100px; }
.size-120px { width: 120px; height: 120px; }
.size-150px { width: 150px; height: 150px; }

.min-h-300px { min-height: 300px; }
.max-w-100 { max-width: 100%; }
.max-h-100 { max-height: 100%; }

/* ================================
   Spacing (Gutters)
================================ */
.gutters-5 {
    margin-right: -2.5px;
    margin-left: -2.5px;
}
.gutters-5 > .col, .gutters-5 > [class*="col-"] {
    padding-right: 2.5px;
    padding-left: 2.5px;
}

.gutters-10 {
    margin-right: -5px;
    margin-left: -5px;
}
.gutters-10 > .col, .gutters-10 > [class*="col-"] {
    padding-right: 5px;
    padding-left: 5px;
}

.gutters-16 {
    margin-right: -8px;
    margin-left: -8px;
}
.gutters-16 > .col, .gutters-16 > [class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

.gutters-20 {
    margin-right: -10px;
    margin-left: -10px;
}
.gutters-20 > .col, .gutters-20 > [class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
}

/* ================================
   Position Helpers
================================ */
.absolute-top-left {
    position: absolute;
    top: 0;
    left: 0;
}

.absolute-top-right {
    position: absolute;
    top: 0;
    right: 0;
}

.absolute-bottom-left {
    position: absolute;
    bottom: 0;
    left: 0;
}

.absolute-bottom-right {
    position: absolute;
    bottom: 0;
    right: 0;
}

.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.absolute-center-y {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.absolute-center-x {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* ================================
   Z-Index
================================ */
.z-0 { z-index: 0; }
.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.z-3 { z-index: 3; }
.z-4 { z-index: 4; }
.z-5 { z-index: 5; }
.z-10 { z-index: 10; }
.z-1020 { z-index: 1020; }
.z-1030 { z-index: 1030; }
.z-1040 { z-index: 1040; }
.z-1050 { z-index: 1050; }

/* ================================
   Text Utilities
================================ */
.text-reset {
    color: inherit !important;
}

.text-reset:hover {
    color: var(--primary) !important;
}

.text-truncate-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-truncate-3 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.hov-text-primary:hover {
    color: var(--primary) !important;
}

/* ================================
   Colors
================================ */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-soft-primary { background-color: var(--soft-primary) !important; }

.bg-soft-secondary { background-color: rgba(145, 145, 153, 0.15) !important; }
.bg-soft-success { background-color: rgba(133, 181, 103, 0.15) !important; }
.bg-soft-info { background-color: rgba(52, 144, 220, 0.15) !important; }
.bg-soft-warning { background-color: rgba(255, 199, 0, 0.15) !important; }
.bg-soft-danger { background-color: rgba(255, 98, 98, 0.15) !important; }

/* Gradient Backgrounds */
.bg-grad-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-grad-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.bg-grad-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.bg-grad-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.bg-grad-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.bg-grad-6 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.bg-grad-7 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.bg-grad-8 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }

/* ================================
   Border & Radius
================================ */
.border-width-2 { border-width: 2px !important; }
.border-width-3 { border-width: 3px !important; }
.border-dashed { border-style: dashed !important; }

.rounded-sm { border-radius: 0.2rem !important; }
.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }

/* ================================
   Shadows
================================ */
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }
.shadow-md { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; }
.shadow-xl { box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.2) !important; }

.hov-shadow-sm:hover { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }
.hov-shadow-md:hover { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.hov-shadow-lg:hover { box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; }

/* ================================
   Transitions
================================ */
.has-transition {
    transition: all 0.3s ease;
}

.transition-none {
    transition: none !important;
}

/* ================================
   Buttons
================================ */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--hov-primary);
    border-color: var(--hov-primary);
}

.btn-soft-primary {
    color: var(--primary);
    background-color: var(--soft-primary);
    border: none;
}

.btn-soft-primary:hover {
    color: #fff;
    background-color: var(--primary);
}

.btn-soft-secondary {
    color: var(--secondary);
    background-color: rgba(145, 145, 153, 0.1);
    border: none;
}

.btn-soft-secondary:hover {
    color: #fff;
    background-color: var(--secondary);
}

.btn-soft-success {
    color: var(--success);
    background-color: rgba(133, 181, 103, 0.1);
    border: none;
}

.btn-soft-success:hover {
    color: #fff;
    background-color: var(--success);
}

.btn-soft-info {
    color: var(--info);
    background-color: rgba(52, 144, 220, 0.1);
    border: none;
}

.btn-soft-info:hover {
    color: #fff;
    background-color: var(--info);
}

.btn-soft-warning {
    color: var(--warning);
    background-color: rgba(255, 199, 0, 0.1);
    border: none;
}

.btn-soft-warning:hover {
    color: #212529;
    background-color: var(--warning);
}

.btn-soft-danger {
    color: var(--danger);
    background-color: rgba(255, 98, 98, 0.1);
    border: none;
}

.btn-soft-danger:hover {
    color: #fff;
    background-color: var(--danger);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

.btn-icon.btn-lg {
    width: 48px;
    height: 48px;
}

.btn-circle {
    border-radius: 50%;
}

/* ================================
   Cards
================================ */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1.25rem;
}

/* AIZ Card Box */
.aiz-card-box {
    background: #fff;
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem;
}

/* ================================
   Badges
================================ */
.badge-inline {
    display: inline-block;
    padding: 0.25em 0.6em;
}

.badge-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 0;
}

.badge-sm {
    font-size: 10px;
    padding: 0.2em 0.4em;
}

/* ================================
   Tables
================================ */
.aiz-table {
    width: 100%;
    margin-bottom: 0;
}

.aiz-table th {
    font-weight: 600;
    color: #333;
    border-top: none;
    background: #f8f9fa;
    padding: 0.75rem;
}

.aiz-table td {
    vertical-align: middle;
    padding: 0.75rem;
}

.aiz-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ================================
   Forms
================================ */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--soft-primary);
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* AIZ Megabox (Selection) */
.aiz-megabox {
    display: inline-block;
    cursor: pointer;
}

.aiz-megabox input {
    position: absolute;
    opacity: 0;
}

.aiz-megabox-elem {
    border: 2px solid #e0e0e0;
    transition: all 0.2s;
}

.aiz-megabox input:checked ~ .aiz-megabox-elem {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--soft-primary);
}

/* Plus/Minus Input */
.aiz-plus-minus {
    display: inline-flex;
    align-items: center;
}

.aiz-plus-minus button {
    border: 1px solid #e0e0e0;
    background: #fff;
}

.aiz-plus-minus .input-number {
    text-align: center;
    font-weight: 600;
    border: 1px solid #e0e0e0;
}

/* ================================
   Rating Stars
================================ */
.rating {
    display: inline-flex;
    color: #e0e0e0;
}

.rating i {
    margin-right: 1px;
}

.rating i.active,
.rating .active {
    color: #ffc107;
}

.rating-sm i {
    font-size: 12px;
}

.rating-lg i {
    font-size: 20px;
}

/* ================================
   Dropdown
================================ */
.dropdown-menu {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-menu-md {
    width: 280px;
}

.dropdown-menu-lg {
    width: 340px;
}

.dropdown-header {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary);
}

/* ================================
   Tabs
================================ */
.aiz-nav-tabs {
    display: flex;
    flex-wrap: wrap;
}

.aiz-nav-tabs a {
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.aiz-nav-tabs a:hover,
.aiz-nav-tabs a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ================================
   Image Utilities
================================ */
.img-fit {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.img-cover {
    object-fit: cover;
}

/* Lazyload placeholder */
.lazyload {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazyloaded {
    opacity: 1;
}

/* ================================
   Hover Effects
================================ */
.hov-opacity-80:hover {
    opacity: 0.8;
}

.hov-opacity-100:hover {
    opacity: 1;
}

.hov-scale:hover {
    transform: scale(1.05);
}

.hov-translate-y:hover {
    transform: translateY(-5px);
}

/* ================================
   Overflow
================================ */
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-auto { overflow: auto !important; }
.overflow-x-hidden { overflow-x: hidden !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* ================================
   Cursor
================================ */
.c-pointer { cursor: pointer !important; }
.c-default { cursor: default !important; }
.c-not-allowed { cursor: not-allowed !important; }

/* ================================
   Sidebar Layout
================================ */
.aiz-main-wrapper {
    display: flex;
    min-height: 100vh;
}

.aiz-sidebar {
    width: 240px;
    background-color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1020;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.aiz-sidebar-wrap {
    padding: 0;
}

.aiz-content-wrapper {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.aiz-main-content {
    padding: 1.5rem;
}

/* Sidebar Collapsed */
.aiz-sidebar-collapsed .aiz-sidebar {
    width: 70px;
}

.aiz-sidebar-collapsed .aiz-content-wrapper {
    margin-left: 70px;
}

/* Mobile Sidebar */
@media (max-width: 991.98px) {
    .aiz-sidebar {
        transform: translateX(-100%);
        z-index: 1040;
    }

    .aiz-sidebar.open {
        transform: translateX(0);
    }

    .aiz-content-wrapper {
        margin-left: 0;
    }

    .aiz-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1039;
        display: none;
    }

    .aiz-sidebar-overlay.open {
        display: block;
    }
}

/* ================================
   Side Navigation
================================ */
.aiz-side-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aiz-side-nav-list > li {
    margin-bottom: 2px;
}

.aiz-side-nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

.aiz-side-nav-list > li > a:hover,
.aiz-side-nav-list > li > a.active {
    color: var(--primary);
    background-color: var(--soft-primary);
}

.aiz-side-nav-list > li > a i,
.aiz-side-nav-list > li > a .aiz-side-nav-icon {
    font-size: 1.25rem;
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
}

.aiz-side-nav-text {
    flex: 1;
}

.aiz-side-nav-arrow {
    margin-left: auto;
    transition: transform 0.2s;
}

.aiz-side-nav-list > li.mm-active > a .aiz-side-nav-arrow {
    transform: rotate(90deg);
}

/* Submenu */
.aiz-side-nav-list .level-2 {
    list-style: none;
    padding: 0;
    display: none;
    background: #f8f9fa;
}

.aiz-side-nav-list .level-2 > li > a {
    display: block;
    padding: 0.5rem 1.25rem 0.5rem 3rem;
    color: #6b7280;
    font-size: 0.8125rem;
}

.aiz-side-nav-list .level-2 > li > a:hover,
.aiz-side-nav-list .level-2 > li > a.active {
    color: var(--primary);
}

.aiz-side-nav-list > li.mm-active > .level-2 {
    display: block;
}

/* ================================
   Topbar
================================ */
.aiz-topbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1010;
}

/* ================================
   Titlebar
================================ */
.aiz-titlebar {
    padding: 1rem 0;
}

.aiz-titlebar h1 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

/* ================================
   Pagination
================================ */
.aiz-pagination .page-item .page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
    border: none;
    color: #6b7280;
}

.aiz-pagination .page-item.active .page-link {
    background-color: var(--primary);
    color: #fff;
}

.aiz-pagination .page-item:hover .page-link {
    background-color: var(--soft-primary);
    color: var(--primary);
}

/* ================================
   Responsive Helpers
================================ */
@media (max-width: 767.98px) {
    .h-md-210px { height: 140px !important; }
}

@media (min-width: 768px) {
    .h-md-210px { height: 210px !important; }
}

/* ================================
   Mobile Breakpoints
================================ */
@media (max-width: 576px) {
    .aiz-sidebar {
        width: 85vw;
        max-width: 280px;
    }

    .dropdown-menu-md,
    .dropdown-menu-lg {
        width: calc(100vw - 2rem);
        max-width: 340px;
    }

    .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }

    .btn-icon.btn-sm {
        min-width: 44px;
        min-height: 44px;
    }

    .aiz-main-content {
        padding: 0.75rem;
    }

    .card-body {
        padding: 0.875rem;
    }

    .card-header {
        padding: 0.75rem;
    }

    .aiz-table th,
    .aiz-table td {
        padding: 0.5rem;
        font-size: 0.8125rem;
    }

    .fs-24, .fs-26, .fs-28, .fs-30, .fs-32, .fs-36, .fs-40, .fs-48 {
        font-size: 1.25rem !important;
    }

    .fs-20, .fs-22 {
        font-size: 1.125rem !important;
    }

    .aiz-side-nav-list > li > a {
        min-height: 44px;
    }

    .aiz-side-nav-list .level-2 > li > a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 375px) {
    .aiz-sidebar {
        max-width: 260px;
    }

    .dropdown-menu-md,
    .dropdown-menu-lg {
        width: calc(100vw - 1rem);
    }

    .aiz-main-content {
        padding: 0.5rem;
    }

    .card-body {
        padding: 0.75rem;
    }
}

/* ================================
   Print Styles
================================ */
@media print {
    .no-print {
        display: none !important;
    }
}
