/* M MarketWeb Template Styles - AP TOOL PUMP Theme */
:root {
    --ap-red: #e11d48;
    /* rose-600 */
    --ap-red-700: #be123c;
    --ap-red-50: #fff1f2;
    --ap-white: #ffffff;
}

/* Global Link Styles - Force all links to use site theme color */
a {
    color: var(--ap-red) !important;
    text-decoration: none;
}

a:hover {
    color: var(--ap-red-700) !important;
    text-decoration: underline;
}

a:visited {
    color: var(--ap-red) !important;
}

a:focus {
    color: var(--ap-red) !important;
    outline: 2px solid var(--ap-red);
    outline-offset: 2px;
}

a:active {
    color: var(--ap-red-700) !important;
}

/* Force override all possible link styles with maximum specificity */
a, a:link, a:visited, a:hover, a:focus, a:active,
.nav-link, .nav-link:hover, .nav-link:focus,
.dropdown-item, .dropdown-item:hover, .dropdown-item:focus,
.btn-link, .btn-link:hover, .btn-link:focus,
.pagination .page-link, .pagination .page-link:hover, .pagination .page-link:focus,
.breadcrumb-item a, .breadcrumb-item a:hover, .breadcrumb-item a:focus,
.list-group-item-action, .list-group-item-action:hover, .list-group-item-action:focus,
.alert a, .alert a:hover, .alert a:focus,
.card a, .card a:hover, .card a:focus,
.table a, .table a:hover, .table a:focus {
    color: var(--ap-red) !important;
    transition: color 0.2s ease-in-out !important;
}

/* Exceptions for Bootstrap color utilities */
a.text-success, a.text-success:hover, a.text-success:focus,
a.text-primary, a.text-primary:hover, a.text-primary:focus,
a.text-danger, a.text-danger:hover, a.text-danger:focus,
a.text-warning, a.text-warning:hover, a.text-warning:focus,
a.text-info, a.text-info:hover, a.text-info:focus,
a.text-secondary, a.text-secondary:hover, a.text-secondary:focus,
a.text-dark, a.text-dark:hover, a.text-dark:focus,
a.text-light, a.text-light:hover, a.text-light:focus {
    color: inherit !important;
}

a:hover, a:focus, a:active,
.nav-link:hover, .nav-link:focus,
.dropdown-item:hover, .dropdown-item:focus,
.btn-link:hover, .btn-link:focus,
.pagination .page-link:hover, .pagination .page-link:focus,
.breadcrumb-item a:hover, .breadcrumb-item a:focus,
.list-group-item-action:hover, .list-group-item-action:focus,
.alert a:hover, .alert a:focus,
.card a:hover, .card a:focus,
.table a:hover, .table a:focus {
    color: var(--ap-red-700) !important;
}

/* Exception: Links inside dark backgrounds should be white for better visibility */
.btn-primary a, .btn-primary a:link, .btn-primary a:visited,
.btn-danger a, .btn-danger a:link, .btn-danger a:visited,
.btn-secondary a, .btn-secondary a:link, .btn-secondary a:visited,
.btn-dark a, .btn-dark a:link, .btn-dark a:visited,
.bg-primary a, .bg-primary a:link, .bg-primary a:visited,
.bg-danger a, .bg-danger a:link, .bg-danger a:visited,
.bg-secondary a, .bg-secondary a:link, .bg-secondary a:visited,
.bg-dark a, .bg-dark a:link, .bg-dark a:visited,
.alert-danger a, .alert-danger a:link, .alert-danger a:visited,
.badge a, .badge a:link, .badge a:visited,
a.btn-primary, a.btn-primary:link, a.btn-primary:visited,
[style*="background-color: #e11d48"] a,
[style*="background-color: #be123c"] a,
[style*="background-color: #dc3545"] a,
[style*="background: #e11d48"] a,
[style*="background: #be123c"] a,
[style*="background: #dc3545"] a {
    color: white !important;
}

.btn-primary a:hover, .btn-primary a:focus, .btn-primary a:active,
.btn-danger a:hover, .btn-danger a:focus, .btn-danger a:active,
.btn-secondary a:hover, .btn-secondary a:focus, .btn-secondary a:active,
.btn-dark a:hover, .btn-dark a:focus, .btn-dark a:active,
.bg-primary a:hover, .bg-primary a:focus, .bg-primary a:active,
.bg-danger a:hover, .bg-danger a:focus, .bg-danger a:active,
.bg-secondary a:hover, .bg-secondary a:focus, .bg-secondary a:active,
.bg-dark a:hover, .bg-dark a:focus, .bg-dark a:active,
.alert-danger a:hover, .alert-danger a:focus, .alert-danger a:active,
.badge a:hover, .badge a:focus, .badge a:active,
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active,
a.btn-outline-primary:hover, a.btn-outline-primary:focus, a.btn-outline-primary:active,
a.btn-outline-secondary:hover, a.btn-outline-secondary:focus, a.btn-outline-secondary:active,
a.btn-outline-danger:hover, a.btn-outline-danger:focus, a.btn-outline-danger:active,
[style*="background-color: #e11d48"] a:hover,
[style*="background-color: #be123c"] a:hover,
[style*="background-color: #dc3545"] a:hover,
[style*="background: #e11d48"] a:hover,
[style*="background: #be123c"] a:hover,
[style*="background: #dc3545"] a:hover {
    color: #f8f9fa !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Global Button Primary Styles - Force all primary buttons to use site theme color */
.btn-primary {
    background-color: var(--ap-red) !important;
    border-color: var(--ap-red) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--ap-red-700) !important;
    border-color: var(--ap-red-700) !important;
    color: white !important;
}

.btn-primary:focus,
.btn-primary.focus {
    background-color: var(--ap-red-700) !important;
    border-color: var(--ap-red-700) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.5) !important;
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background-color: var(--ap-red-700) !important;
    border-color: var(--ap-red-700) !important;
    color: white !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--ap-red) !important;
    border-color: var(--ap-red) !important;
    opacity: 0.65;
}

/* Global Text Primary Styles - Force all text-primary to use site theme color */
.text-primary {
    color: var(--ap-red) !important;
}

/* Top Bar */
.top-bar {
    font-size: 0.85rem;
    background: var(--ap-red) !important;
}

/* Header */
.header-main {
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1040;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.header-main .logo img {
    width: 48px;
}

.logo h3 {
    color: var(--ap-red) !important;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Mobile Logo in Navigation */
.mobile-logo {
    flex-shrink: 0;
}

.mobile-logo a {
    text-decoration: none !important;
}

.mobile-logo h5 {
    font-size: 1.2rem;
    color: var(--ap-red) !important;
    letter-spacing: 0.5px;
}

.search-box .form-control {
    border-radius: 12px 0 0 12px;
    border: 1px solid #e11d48;
    border-right: none;
    padding: 0.75rem 1rem;
    background: var(--ap-red-50);
}

.search-box .form-control:focus {
    border-color: var(--ap-red);
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.25);
    background: var(--ap-red-50);
}

.search-box .btn {
    border-radius: 0 12px 12px 0;
    border: 1px solid var(--ap-red);
    border-left: none;
    padding: 0.75rem 1.5rem;
    background: var(--ap-red);
}

/* Mobile Search Box Adjustments */
@media (max-width: 991.98px) {
    .search-box .form-control {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    .search-box .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .search-box .form-control {
        padding: 0.5rem 0.8rem;
        font-size: 0.875rem;
    }

    .search-box .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Mobile Language Selector & User Actions */
@media (max-width: 991.98px) {
    .header-main .language-selector a,
    .header-main .user-actions a,
    .header-main .language-selector .btn,
    .header-main .user-actions .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.6rem;
        border-radius: 0.375rem;
    }

    .header-main .language-selector {
        gap: 0.25rem !important;
    }

    .header-main .user-actions {
        gap: 0.25rem !important;
    }
}

@media (max-width: 576px) {
    .header-main .language-selector a,
    .header-main .user-actions a,
    .header-main .language-selector .btn,
    .header-main .user-actions .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .mobile-logo img {
        height: 28px !important;
    }

    .mobile-logo .fw-bold {
        font-size: 0.95rem;
    }
}

.user-actions .btn-dark {
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Navigation */
.main-nav {
    border-top: 1px solid rgb(255, 228, 230) !important;
}

.main-nav .navbar-nav-wrapper {
    display: flex;
    align-items: center;
}

.main-nav .mod-menu {
    flex-direction: row;
    margin-bottom: 0;
}

.main-nav .mod-menu>li {
    margin-right: 1.5rem;
}

.main-nav .mod-menu>li:last-child {
    margin-right: 0;
}

.main-nav .mod-menu>li>a {
    color: #000000 !important;
    text-decoration: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.main-nav .mod-menu>li>a:hover {
    color: var(--ap-red) !important;
    background-color: var(--ap-red-50);
}

/* Right Menu Alignment */
.main-nav .navbar-nav-wrapper.ms-lg-auto {
    margin-left: auto;
}

.main-nav .navbar-nav-wrapper.ms-lg-auto .mod-menu {
    justify-content: flex-end;
}

/* Mobile Hamburger Menu */
.navbar-toggler {
    border: 2px solid var(--ap-red);
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background-color: var(--ap-red);
}

.navbar-toggler:hover .navbar-toggler-icon i {
    color: white;
}

.navbar-toggler-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.navbar-toggler-icon i {
    font-size: 1.25rem;
    color: var(--ap-red);
    transition: color 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(225, 29, 72, 0.25);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon i {
    transform: rotate(90deg);
    color: var(--ap-red);
}

/* Mobile Navigation Styles */
@media (max-width: 991.98px) {
    .main-nav .navbar-collapse {
        background: white;
        border: 1px solid var(--ap-red-50);
        border-radius: 0.75rem;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .main-nav .navbar-nav-wrapper {
        width: 100%;
        margin-bottom: 1rem;
    }

    .main-nav .navbar-nav-wrapper:last-child {
        margin-bottom: 0;
    }

    /* Add separator between left and right menu */
    .main-nav .navbar-nav-wrapper.ms-lg-auto {
        border-top: 1px solid var(--ap-red-50);
        padding-top: 1rem;
        margin-top: 1rem;
        margin-left: 0;
    }

    .main-nav .mod-menu {
        flex-direction: column;
        width: 100%;
    }

    .main-nav .mod-menu>li {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .main-nav .mod-menu>li:last-child {
        margin-bottom: 0;
    }

    .main-nav .mod-menu>li>a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        border: 1px solid transparent;
        transition: all 0.3s ease;
        width: 100%;
        text-align: left;
    }

    .main-nav .mod-menu>li>a:hover,
    .main-nav .mod-menu>li.current>a,
    .main-nav .mod-menu>li.active>a {
        background-color: var(--ap-red);
        color: white !important;
        border-color: var(--ap-red);
        transform: translateX(4px);
    }

    /* Submenu Styles for Mobile */
    .main-nav .mod-menu__sub {
        background: var(--ap-red-50);
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        margin-left: 1rem;
        padding: 0.5rem;
    }

    .main-nav .mod-menu__sub li a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        color: var(--ap-red-700) !important;
        border-radius: 0.375rem;
    }

    .main-nav .mod-menu__sub li a:hover {
        background-color: var(--ap-red);
        color: white !important;
    }

    /* Default navbar-nav links for fallback menu */
    .main-nav .navbar-nav .nav-link {
        color: #000000 !important;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.875rem;
        line-height: 1.25rem;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        border: 1px solid transparent;
        transition: all 0.3s ease;
        width: 100%;
        text-align: left;
    }

    .main-nav .navbar-nav .nav-link:hover {
        background-color: var(--ap-red);
        color: white !important;
        border-color: var(--ap-red);
        transform: translateX(4px);
    }
}

/* Categories Bar */
.categories-bar {
    border-bottom: 1px solid #f3f4f6 !important;
}

.categories-slider {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-slider::-webkit-scrollbar {
    display: none;
}

.categories-slider .category-chip:hover > a {
    color: #fff !important;
    text-decoration: underline !important;
}

.categories-slider .category-chip > a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.category-chip {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: var(--ap-red-50);
    color: var(--ap-red-700);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #fecaca;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-chip:hover {
    background: var(--ap-red);
    color: white;
    transform: translateY(-1px);
}

.category-chip a {
    text-decoration: none;
    color: inherit;
}

/* Banner */
.main-banner img {
    object-fit: cover;
    max-height: 350px;
}

/* Market Products */
.market-products h3 {
    color: #374151;
    font-weight: 700;
}

.products-slider {
    scrollbar-width: thin;
    scrollbar-color: var(--ap-red) #f1f5f9;
}

.products-slider::-webkit-scrollbar {
    height: 6px;
}

.products-slider::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.products-slider::-webkit-scrollbar-thumb {
    background: var(--ap-red);
    border-radius: 10px;
}

.product-image {
    background: var(--ap-red-50) !important;
    color: #d1d5db;
}

/* Categories */
.categories {
    background: #f8fafc !important;
}

.categories h3 {
    color: #374151;
    font-weight: 700;
}

.category-item {
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f3f4f6 !important;
}

.category-item:hover {
    background: var(--ap-red) !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(225, 29, 72, 0.3);
}

.category-item a:hover, .category-item:hover a {
    text-decoration: none;
    color: white !important;
}

/* Brands */
.brands h3 {
    color: #374151;
    font-weight: 700;
}

.brand-item {
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f3f4f6 !important;
}

.brand-item:hover {
    background: var(--ap-red) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(225, 29, 72, 0.2);
}

/* Articles */
.articles h3 {
    color: #374151;
    font-weight: 700;
}

.article-card {
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6 !important;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.article-image {
    background: var(--ap-red-50) !important;
}

.article-card h5 {
    color: #374151;
    line-height: 1.3;
}

/* Videos */
.videos {
    background: #f8fafc !important;
}

.videos h3 {
    color: #374151;
    font-weight: 700;
}

.video-card {
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6 !important;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.video-placeholder {
    background: #6b7280 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-placeholder:hover {
    background: var(--ap-red) !important;
}

.video-placeholder i {
    transition: transform 0.3s ease;
}

.video-placeholder:hover i {
    transform: scale(1.1);
}

/* Contact Section */
.contact-section h3 {
    color: #374151;
    font-weight: 700;
}

.contact-card {
    border: 1px solid #f3f4f6 !important;
}

.contact-form .form-control {
    background: var(--ap-red-50) !important;
    border: none !important;
}

.contact-form .form-control:focus {
    background: white !important;
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.25);
}

.contact-form .btn-danger {
    background: var(--ap-red);
    border-color: var(--ap-red);
}

/* Categories */
.categories {
    background-color: #f8f9fa !important;
}

.categories h3 {
    font-weight: 600;
    margin-bottom: 2rem;
}

.category-item {
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.category-item img {
    object-fit: cover;
    margin-bottom: 1rem;
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #dc3545;
    color: #fff !important;
}

.category-item:hover i {
    color: #fff !important;
}

.category-item:hover p {
    color: #fff !important;
}

.category-link {
    color: inherit;
}

.category-link:hover {
    text-decoration: none;
}

/* Brands */
.brands h3 {
    font-weight: 600;
    margin-bottom: 2rem;
}

.brand-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-item:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.brand-item span {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    min-height: 300px;
}

/* Footer */
.footer {
    background: white !important;
    border-top: 2px solid;
    border-image: repeating-linear-gradient(90deg, var(--ap-red), var(--ap-red) 5px, rgba(225, 17, 72, 0) 20px, rgba(225, 17, 72, 0) 30px) 1;
    opacity: 0.9;
}

.footer .fw-bold {
    color: #374151;
}

.footer .text-muted {
    color: #6b7280 !important;
}

/* Back to Top */
.back-to-top-link {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #dc3545;
    color: #fff;
    padding: 15px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top-link:hover {
    background: #c82333;
    transform: translateY(-3px);
    color: #fff;
}

/* Desktop Navigation Alignment */
@media (min-width: 992px) {
    .main-nav .navbar-toggler {
        display: none !important;
    }
    
    .main-nav .navbar-collapse {
        display: flex !important;
    }

    .main-nav .navbar-nav {
        flex-direction: row;
        align-items: center;
    }

    .main-nav .navbar-nav .nav-item {
        margin-right: 1.5rem;
    }

    .main-nav .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        color: #000000 !important;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.875rem;
        line-height: 1.25rem;
        border-radius: 0.375rem;
        transition: all 0.3s ease;
        width: auto;
        text-align: center;
        border: 1px solid transparent;
    }

    .main-nav .navbar-nav .nav-link:hover {
        color: var(--ap-red) !important;
        background-color: var(--ap-red-50);
        transform: none;
    }

    /* Ensure right menu wrapper stays on the right */
    .main-nav .navbar-nav-wrapper.ms-lg-auto {
        margin-left: auto !important;
    }

    .main-nav .navbar-nav-wrapper.ms-lg-auto .mod-menu {
        justify-content: flex-end !important;
    }
    }
}

/* Mobile Header Adjustments */
@media (max-width: 991.98px) {
    .header-main {
        padding-bottom: 0;
    }

    /* Mobile header layout improvements */
    .header-main .search-box {
        margin-bottom: 0.5rem;
    }

    .header-main .language-selector {
        font-size: 0.85rem;
    }

    .header-main .user-actions {
        font-size: 0.85rem;
    }

    /* Mobile navigation adjustments */
    .main-nav {
        padding: 0.75rem 1rem;
        border-top: 1px solid #f3f4f6;
    }
    
    .mobile-logo {
        flex: 1;
    }

    .mobile-logo h5 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .navbar-toggler {
        padding: 0.375rem 0.5rem;
        border-width: 1px;
        font-size: 1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        font-size: 0.75rem;
        padding: 0.5rem 0;
    }

    .header-main .search-box {
        margin-bottom: 0.75rem;
    }

    .mobile-logo h5 {
        font-size: 1rem;
    }

    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 0.9rem;
    }

    .categories-slider .d-flex {
        gap: 1rem !important;
        padding-bottom: 1rem;
    }

    .category-chip {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .products-slider .d-flex {
        gap: 1rem !important;
    }

    .product-card {
        min-width: 200px !important;
    }

    .category-item,
    .brand-item {
        min-height: 60px;
        font-size: 0.85rem;
    }

    .article-card h5 {
        font-size: 1.1rem;
    }

    .contact-form .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .main-banner {
        margin-bottom: 2rem;
    }

    .market-products h3,
    .categories h3,
    .brands h3,
    .articles h3,
    .videos h3,
    .contact-section h3 {
        font-size: 1.5rem;
    }

    .product-card h6 {
        font-size: 0.9rem;
    }

    .footer {
        text-align: center;
    }

    .footer .d-flex {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem !important;
    }
}

/* Additional Utility Classes */
.bg-gradient-danger {
    background: linear-gradient(135deg, var(--ap-red) 0%, var(--ap-red-700) 100%);
}

.text-shadow {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.rounded-3 {
    border-radius: 1rem !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Divider Lines */
.divider {
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--ap-red), var(--ap-red) 5px, rgba(225, 29, 72, 0) 20px, rgba(225, 29, 72, 0) 30px);
    opacity: 0.3;
    border-radius: 9999px;
    margin: 1rem 0;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.navbar-collapse.collapsing {
    transition: all 0.35s ease;
}

.navbar-collapse.show {
    animation: slideDown 0.35s ease-out;
}

/* Hamburger Menu Animation */
.navbar-toggler-icon i {
    transition: all 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon i {
    transform: rotate(90deg);
}

/* Mobile Menu Items Animation */
@media (max-width: 991.98px) {
    .main-nav .mod-menu>li {
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInFromLeft 0.3s ease forwards;
    }

    .main-nav .mod-menu>li:nth-child(1) { animation-delay: 0.1s; }
    .main-nav .mod-menu>li:nth-child(2) { animation-delay: 0.15s; }
    .main-nav .mod-menu>li:nth-child(3) { animation-delay: 0.2s; }
    .main-nav .mod-menu>li:nth-child(4) { animation-delay: 0.25s; }
    .main-nav .mod-menu>li:nth-child(5) { animation-delay: 0.3s; }
    .main-nav .mod-menu>li:nth-child(n+6) { animation-delay: 0.35s; }
}

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.25);
}

/* Bootstrap 5 Compatibility */
.text-xs {
    font-size: 0.75rem;
}

.object-fit-cover {
    object-fit: cover;
}

/* Product Detail Layout */
.product-detail-row {
    margin-bottom: 2rem;
}

.product-images-section {
    padding-right: 1rem;
}

.product-info-section {
    padding-left: 1rem;
}

/* Product Images */
.product-images-section .lightbox {
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.product-images-section .lightbox img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: white;
    transition: transform 0.3s ease;
}

.product-images-section .lightbox:hover img {
    transform: scale(1.05);
}

.product-images-section .text_zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-images-section .text_zoom i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.product-images-section .text_zoom span {
    vertical-align: middle;
    font-weight: 500;
}

.product-images-section .lightbox:hover .text_zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

/* Product Thumbnails */
.product-thumbnails .img-thumbnail {
    border: 2px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 80px;
    object-fit: contain;
    background: white;
}

.product-thumbnails .img-thumbnail:hover,
.product-thumbnails .img-thumbnail.active {
    border-color: var(--ap-red);
    transform: scale(1.05);
}

/* Product Title */
.product-title-section .product-title {
    color: #374151;
    line-height: 1.4;
    font-weight: 600;
}

/* Product Price Section */
.product-price-section .old-price {
    font-size: 1rem;
    text-decoration: line-through;
}

.product-price-section .current-price .price-value {
    color: var(--ap-red) !important;
    font-size: 2rem;
    font-weight: 700;
}

/* Product List Price Styles */
.product .old_price {
    margin-bottom: 0.5rem;
}

.product .old_price span {
    color: #6c757d;
    font-size: 0.875rem;
    text-decoration: line-through;
}

.product .default_price {
    margin-bottom: 0.75rem;
}

.product .default_price .text-danger {
    color: var(--ap-red) !important;
}

/* Delivery Info Card */
.delivery-info-section .card {
    border: 1px solid #e5e7eb;
}

.delivery-info-section .card-body {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

/* Product Attributes */
.product-attributes-section .attribute-group-name {
    color: var(--ap-red);
    border-bottom: 1px solid var(--ap-red-50);
    padding-bottom: 0.25rem;
}

.product-attributes-section .form-select {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.product-attributes-section .form-select:focus {
    border-color: var(--ap-red);
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.25);
}

/* Buy Section */
.buy-section {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.buy-section .stock-info {
    background: var(--ap-red-50);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.buy-section .availability-status .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Quantity Selector */
.quantity-section .input-group .btn {
    border-color: #d1d5db;
    color: #6b7280;
    font-weight: 600;
}

.quantity-section .input-group .btn:hover {
    background-color: var(--ap-red);
    border-color: var(--ap-red);
    color: white;
}

.quantity-section .form-control {
    border-color: #d1d5db;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons .btn-danger {
    background: var(--ap-red);
    border-color: var(--ap-red);
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
    transition: all 0.3s ease;
}

.action-buttons .btn-danger:hover {
    background: var(--ap-red-700);
    border-color: var(--ap-red-700);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.4);
}

.action-buttons .btn-outline-danger {
    border-color: var(--ap-red);
    color: var(--ap-red);
    font-weight: 600;
    border-radius: 0.75rem;
}

.action-buttons .btn-outline-secondary {
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* Product Details Tabs */
.product-details-tabs {
    margin-top: 3rem;
}

.product-details-tabs .nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.product-details-tabs .nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.product-details-tabs .nav-tabs .nav-link:hover {
    color: var(--ap-red);
    border-bottom-color: rgba(225, 29, 72, 0.3);
}

.product-details-tabs .nav-tabs .nav-link.active {
    color: var(--ap-red);
    border-bottom-color: var(--ap-red);
    background: none;
}

.product-details-tabs .tab-content {
    border: 1px solid #e5e7eb;
    border-top: none;
    background: white;
    border-radius: 0 0 0.75rem 0.75rem;
}

.product-details-tabs .tab-pane {
    min-height: 200px;
}

/* Product Description */
.product-description {
    line-height: 1.7;
    color: #374151;
}

.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5,
.product-description h6 {
    color: var(--ap-red);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.product-description img {
    max-width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Specifications Table */
.specifications-table .table th,
.specifications-table .table td {
    border-color: #e5e7eb;
    padding: 1rem;
}

.specifications-table .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #f8fafc;
}



/* Breadcrumb */
.breadcrumb {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--ap-red) !important;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--ap-red-700) !important;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6b7280;
    font-weight: 500;
}

/* Price List Table */
.price_prod_qty_list {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.price_prod_qty_list td {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.price_prod_qty_list_head {
    font-weight: 600;
    color: var(--ap-red);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ap-red-50);
}

/* QR Code */
.mzc_qrcode {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.mzc_qrcode img {
    max-width: 120px;
    border-radius: 0.25rem;
}

/* Vendor Info */
.vendorinfo {
    background: var(--ap-red-50);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--ap-red);
    margin-top: 1rem;
}

/* Manufacturer Info */
.manufacturer-info {
    border-left: 4px solid var(--ap-red);
}

/* Additional Info */
.additional-info,
.basic-price-info {
    font-size: 0.875rem;
}

/* Responsive Design for Product Page */
@media (max-width: 991.98px) {
    .product-images-section,
    .product-info-section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .product-images-section .lightbox img {
        height: 300px;
    }
    
    .product-thumbnails .img-thumbnail {
        height: 60px;
    }
    
    .buy-section {
        margin-top: 2rem;
        padding: 1rem;
    }
    
    .product-price-section .current-price .price-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .product-detail-row {
        margin-bottom: 1rem;
    }
    
    .product-images-section .lightbox img {
        height: 250px;
    }
    
    .product-thumbnails .img-thumbnail {
        height: 50px;
    }
    
    .product-details-tabs .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .quantity-section .row {
        justify-content: center;
    }
    
    .action-buttons .btn-danger {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Loading Animation */
#jshop_image_loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Product Labels */
.product_label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.product_label .label_name {
    background: var(--ap-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === ARTICLE STYLES === */

/* Article Layout */
.com-content-article {
    font-family: inherit;
}

.com-content-article .article-title {
    color: var(--ap-red);
    border-bottom: 3px solid var(--ap-red-50);
    padding-bottom: 0.5rem;
}

/* Article Header Card */
.com-content-article .article-header .card-body {
    background: linear-gradient(135deg, var(--ap-red-50), #ffffff);
}

/* Article Status Badges */
.com-content-article .article-status .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
}

/* Article Meta Info */
.com-content-article .article-meta,
.com-content-article .article-meta-bottom {
    border-left: 4px solid var(--ap-red);
}

/* Article Body */
.com-content-article .article-text {
    line-height: 1.8;
    font-size: 1.05rem;
}

.com-content-article .article-text h1,
.com-content-article .article-text h2,
.com-content-article .article-text h3,
.com-content-article .article-text h4,
.com-content-article .article-text h5,
.com-content-article .article-text h6 {
    color: var(--ap-red);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.com-content-article .article-text p {
    margin-bottom: 1.2rem;
}

.com-content-article .article-text img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.com-content-article .article-text blockquote {
    border-left: 4px solid var(--ap-red);
    background: var(--ap-red-50);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
}

/* Article Tags */
.com-content-article .article-tags .badge,
.com-content-article .article-tags-bottom .badge {
    background-color: var(--ap-red-50);
    color: var(--ap-red);
    border: 1px solid var(--ap-red);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.com-content-article .article-tags .badge:hover,
.com-content-article .article-tags-bottom .badge:hover {
    background-color: var(--ap-red);
    color: white;
    transform: translateY(-1px);
}

/* Article Image */
.com-content-article .article-image img {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Table of Contents */
.com-content-article .article-toc {
    background: linear-gradient(135deg, var(--ap-red-50), #f8f9fa);
}

.com-content-article .article-toc .card-title {
    color: var(--ap-red);
}

/* Article Actions */
.com-content-article .article-actions .btn {
    border-radius: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Guest Access Notice */
.com-content-article .guest-access-notice {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Pagination Cards */
.com-content-article .article-pagination,
.com-content-article .article-pagination-bottom,
.com-content-article .article-pagination-relative {
    border-radius: 0.75rem;
}

/* Responsive Article Layout */
@media (max-width: 767.98px) {
    .com-content-article .article-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .com-content-article .article-title {
        font-size: 1.75rem !important;
    }
}

/* Print Styles */
@media print {
    .com-content-article .article-actions,
    .com-content-article .article-pagination,
    .com-content-article .article-pagination-bottom,
    .com-content-article .article-pagination-relative {
        display: none !important;
    }
}

.jshop.pagelogin .card {
    min-height: 500px;
}

@media (max-width: 767.98px) {
    .jshop.pagelogin .card {
        min-height: auto;
    }
}

/* === CART WIDGET STYLES === */

/* Cart Widget */
.mzc-cart-widget {
    display: flex;
    align-items: center;
}

.mzc-cart-widget .cart-link {
    color: #374151 !important;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
}

.mzc-cart-widget .cart-link:hover {
    color: var(--ap-red) !important;
    background-color: var(--ap-red-50);
    border-color: var(--ap-red);
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* Cart Icon */
.mzc-cart-widget .cart-icon {
    font-size: 1.5rem;
    color: inherit;
    transition: color 0.3s ease;
}

/* Cart Badge */
.mzc-cart-widget .cart-badge {
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: pulse 2s infinite;
}

/* Cart Summary */
.mzc-cart-widget .cart-summary {
    line-height: 1.2;
}

.mzc-cart-widget .cart-count {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.mzc-cart-widget .cart-total {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Animation for badge */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .mzc-cart-widget .cart-icon {
        font-size: 1.3rem;
    }

    .mzc-cart-widget .cart-badge {
        top: -6px;
        right: -6px;
        min-width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .mzc-cart-widget .cart-link {
        padding: 0.375rem;
    }

    .mzc-cart-widget .cart-icon {
        font-size: 1.2rem;
    }

    .mzc-cart-widget .cart-badge {
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .mzc-cart-widget .cart-link {
        color: #e5e7eb !important;
    }

    .mzc-cart-widget .cart-link:hover {
        background-color: rgba(225, 29, 72, 0.2);
    }
}

/* === USER ORDERS PAGE STYLES === */

/* Page Header */
.user-orders-page .page-header-section {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1rem;
}

.user-orders-page .page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.user-orders-page .page-subtitle {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Order Cards */
.user-orders-page .order-card {
    transition: all 0.3s ease;
    border-radius: 0.75rem !important;
}

.user-orders-page .order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.user-orders-page .order-card .card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
}

.user-orders-page .order-card .card-footer {
    border-radius: 0 0 0.75rem 0.75rem !important;
}

/* Order Number */
.user-orders-page .order-number {
    position: relative;
}

.user-orders-page .order-number::before {
    content: '#';
    color: var(--ap-red);
    font-weight: bold;
    margin-right: 2px;
}

/* Order Info Items */
.user-orders-page .info-item {
    margin-bottom: 0.75rem;
}

.user-orders-page .info-item:last-child {
    margin-bottom: 0;
}

.user-orders-page .info-item i {
    width: 16px;
    text-align: center;
}

.user-orders-page .info-item .text-muted {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.user-orders-page .info-item .fw-semibold {
    font-size: 0.9rem;
    color: #374151;
}

/* Order Summary Box */
.user-orders-page .order-summary {
    background: linear-gradient(135deg, var(--ap-red-50), #f8f9fa) !important;
    border: 1px solid rgba(225, 29, 72, 0.1);
    position: relative;
    overflow: hidden;
}

.user-orders-page .order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ap-red), var(--ap-red-700));
}

.user-orders-page .total-amount .small {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Order Actions */
.user-orders-page .order-actions {
    align-items: center;
}

.user-orders-page .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-orders-page .btn-outline-danger:hover {
    background-color: var(--ap-red);
    border-color: var(--ap-red);
    transform: translateY(-1px);
}

.user-orders-page .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-1px);
}

.user-orders-page .btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
    transform: translateY(-1px);
}

/* Status Badge */
.user-orders-page .badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Orders Summary */
.user-orders-page .orders-summary .card-body {
    background: linear-gradient(135deg, var(--ap-red-50), #f8f9fa) !important;
    border: 1px solid rgba(225, 29, 72, 0.1);
    border-radius: 0.75rem !important;
}

.user-orders-page .orders-summary i {
    opacity: 0.8;
}

/* Empty State */
.user-orders-page .no-orders-section {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-orders-page .empty-state {
    max-width: 400px;
    text-align: center;
}

.user-orders-page .empty-state i {
    display: block;
    margin: 0 auto 1rem;
}

.user-orders-page .empty-state h4 {
    font-weight: 600;
}

.user-orders-page .empty-state .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 0.75rem;
    text-transform: none;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .user-orders-page .order-card .card-header .row > div {
        margin-bottom: 0.75rem;
    }

    .user-orders-page .order-card .card-header .row > div:last-child {
        margin-bottom: 0;
    }

    .user-orders-page .order-summary {
        margin-top: 1rem;
    }

    .user-orders-page .order-actions {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .user-orders-page .page-title {
        font-size: 1.5rem;
    }

    .user-orders-page .order-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .user-orders-page .order-actions .btn {
        margin-bottom: 0.5rem;
    }

    .user-orders-page .order-actions .btn:last-child {
        margin-bottom: 0;
    }

    .user-orders-page .info-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .user-orders-page .order-card .card-header,
    .user-orders-page .order-card .card-body,
    .user-orders-page .order-card .card-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .user-orders-page .empty-state i {
        font-size: 3rem !important;
    }

    .user-orders-page .empty-state h4 {
        font-size: 1.25rem;
    }
}

/* === PRODUCT FILTERS FORM STYLES === */

/* Product Filters Form Container */
.product-filters-form {
    margin-bottom: 2rem;
}

.product-filters-form .container-fluid {
    padding: 0;
}

/* Sorting and Count Selection Card */
.product-filters-form .card:first-child {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.product-filters-form .card:first-child:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-filters-form .card .card-body {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

/* Form Labels */
.product-filters-form .form-label {
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Dropdown containers */
.product-filters-form .sorting-dropdown {
    min-width: 180px;
}

.product-filters-form .count-dropdown {
    min-width: 120px;
}

/* Sort direction icon */
.product-filters-form .sort-direction-icon {
    max-width: 12px;
    height: auto;
}

/* Select Dropdowns */
.product-filters-form select {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-color: white;
    transition: all 0.3s ease;
    min-height: 2.25rem;
}

.product-filters-form select:focus {
    border-color: var(--ap-red);
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.25);
    outline: none;
}

.product-filters-form select:hover {
    border-color: var(--ap-red);
}

/* Sort Direction Button */
.product-filters-form .btn-outline-secondary {
    border-color: #d1d5db;
    color: #6b7280;
    padding: 0.375rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
}

.product-filters-form .btn-outline-secondary:hover {
    border-color: var(--ap-red);
    background-color: var(--ap-red);
    color: white;
}

.product-filters-form .btn-outline-secondary img {
    filter: brightness(0.7);
    transition: filter 0.3s ease;
}

.product-filters-form .btn-outline-secondary:hover img {
    filter: brightness(1) invert(1);
}

/* Filter Section Card */
.product-filters-form .card:last-child {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-filters-form .card:last-child:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-filters-form .card:last-child .card-body {
    padding: 1.5rem 1.75rem;
}

/* Price Filter Section */
.product-filters-form .price-filter-section h6 {
    color: var(--ap-red);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ap-red-50);
    position: relative;
}

.product-filters-form .price-filter-section h6::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 3rem;
    height: 2px;
    background: var(--ap-red);
    border-radius: 1px;
}

/* Price Input Groups */
.product-filters-form .input-group {
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.product-filters-form .input-group:focus-within {
    box-shadow: 0 0 0 0.15rem rgba(225, 29, 72, 0.2);
}

.product-filters-form .input-group .form-control {
    border: 1px solid #e5e7eb;
    border-right: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-color: white;
    transition: all 0.3s ease;
}

.product-filters-form .input-group .form-control:focus {
    border-color: var(--ap-red);
    box-shadow: none;
    background-color: var(--ap-red-50);
}

.product-filters-form .input-group-text {
    border: 1px solid #e5e7eb;
    border-left: none;
    background-color: #f8f9fa;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.product-filters-form .input-group:focus-within .input-group-text {
    border-color: var(--ap-red);
    background-color: var(--ap-red-50);
    color: var(--ap-red);
}

/* Action Buttons */
.product-filters-form .btn-primary {
    background: var(--ap-red);
    border-color: var(--ap-red);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.2);
    font-size: 0.875rem;
}

.product-filters-form .btn-primary:hover {
    background: var(--ap-red-700);
    border-color: var(--ap-red-700);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(225, 29, 72, 0.3);
}

.product-filters-form .btn-outline-secondary.clear-btn {
    border-color: #d1d5db;
    color: #6b7280;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.product-filters-form .btn-outline-secondary.clear-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
    transform: translateY(-1px);
}

/* Responsive Design for Filters */
@media (max-width: 991.98px) {
    .product-filters-form .card .card-body {
        padding: 1rem 1.25rem;
    }
    
    .product-filters-form .card:last-child .card-body {
        padding: 1.25rem;
    }
    
    .product-filters-form .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.375rem;
    }
    
    .product-filters-form select {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-height: 2.5rem;
    }
    
    .product-filters-form .btn-outline-secondary {
        min-width: 2.5rem;
        height: 2.5rem;
        padding: 0.375rem;
    }
}

@media (max-width: 767.98px) {
    .product-filters-form .card .card-body {
        padding: 1rem;
    }
    
    .product-filters-form .price-filter-section h6 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .product-filters-form .input-group .form-control,
    .product-filters-form .input-group-text {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .product-filters-form .btn-primary {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .product-filters-form .btn-outline-secondary.clear-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Stack buttons vertically on very small screens */
    .product-filters-form .d-grid.d-md-flex {
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .product-filters-form .container-fluid {
        padding: 0 0.5rem;
    }
    
    .product-filters-form .card {
        margin-bottom: 1rem;
    }
    
    .product-filters-form .card .card-body {
        padding: 0.875rem;
    }
    
    .product-filters-form .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .product-filters-form select {
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 2.25rem;
    }
    
    .product-filters-form .btn-outline-secondary {
        min-width: 2.25rem;
        height: 2.25rem;
        padding: 0.25rem;
    }
    
    .product-filters-form .input-group .form-control,
    .product-filters-form .input-group-text {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .product-filters-form .btn-primary,
    .product-filters-form .btn-outline-secondary.clear-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    /* On mobile, make price inputs take half width each */
    .product-filters-form .price-filter-section .col-6 {
        margin-bottom: 1rem;
    }
    
    /* Full width buttons on mobile */
    .product-filters-form .col-12 {
        margin-top: 0.5rem;
    }
}

/* Animation for smooth transitions */
.product-filters-form * {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
.product-filters-form select:focus,
.product-filters-form .form-control:focus,
.product-filters-form .btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.25);
}

/* Loading state for buttons */
.product-filters-form .btn.loading {
    position: relative;
    color: transparent;
}

.product-filters-form .btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === WISHLIST STYLES === */

/* Wishlist Container */
.wishlist-container {
    margin-bottom: 2rem;
}

.wishlist-container .container-fluid {
    padding: 0;
}

/* Wishlist Table */
.wishlist-table {
    margin-bottom: 0;
}

.wishlist-table thead th {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-bottom: 2px solid var(--ap-red-50);
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.wishlist-table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

/* Wishlist Item Row */
.wishlist-item {
    transition: all 0.3s ease;
}

.wishlist-item:hover {
    background-color: var(--ap-red-50);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Product Image */
.wishlist-table .img-thumbnail {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: white;
}

.wishlist-table .img-thumbnail:hover {
    border-color: var(--ap-red);
    transform: scale(1.05);
}

/* Product Name and Info */
.wishlist-table h6 a {
    color: #374151;
    transition: color 0.3s ease;
}

.wishlist-table h6 a:hover {
    color: var(--ap-red) !important;
}

.wishlist-table .text-muted {
    color: #6b7280 !important;
}

.wishlist-table .fw-medium {
    color: #374151;
}

/* Price Display */
.wishlist-table .text-primary {
    color: var(--ap-red) !important;
    font-weight: 600;
}

.wishlist-table .text-success {
    color: #059669 !important;
    font-weight: 600;
}

/* Quantity Badge */
.wishlist-table .badge.bg-light {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

/* Action Buttons */
.wishlist-table .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wishlist-table .btn-primary {
    background: var(--ap-red);
    border-color: var(--ap-red);
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.2);
}

.wishlist-table .btn-primary:hover {
    background: var(--ap-red-700);
    border-color: var(--ap-red-700);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(225, 29, 72, 0.3);
}

.wishlist-table .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.wishlist-table .btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

/* Navigation Buttons */
.wishlist-container .card:last-child {
    border-radius: 0.75rem;
}

.wishlist-container .card:last-child .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.wishlist-container .btn-outline-secondary {
    color: #6b7280;
    border-color: #d1d5db;
}

.wishlist-container .btn-outline-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
    transform: translateY(-1px);
}

.wishlist-container .btn-primary {
    background: var(--ap-red);
    border-color: var(--ap-red);
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.2);
}

.wishlist-container .btn-primary:hover {
    background: var(--ap-red-700);
    border-color: var(--ap-red-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(225, 29, 72, 0.3);
}

/* Responsive Design for Wishlist */
@media (max-width: 991.98px) {
    .wishlist-table thead th,
    .wishlist-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .wishlist-table .btn-sm {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .wishlist-container .card:last-child .btn {
        padding: 0.625rem 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .wishlist-table thead th,
    .wishlist-table tbody td {
        padding: 1rem 0.5rem;
    }
    
    .wishlist-table h6 {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .wishlist-table .small {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .wishlist-container .card:last-child .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile specific adjustments */
    .wishlist-item:hover {
        transform: none;
        box-shadow: none;
        background-color: var(--ap-red-50);
    }
    
    /* Mobile product info spacing */
    .wishlist-table .d-md-none .p-2 {
        padding: 0.75rem !important;
    }
    
    .wishlist-table .d-md-none .col-12 {
        margin-top: 0.75rem !important;
    }
    
    .wishlist-table .d-md-none small {
        font-size: 0.75rem;
        margin-bottom: 0.25rem !important;
    }
    
    /* Action buttons spacing */
    .wishlist-table .btn-sm {
        padding: 0.5rem 0.75rem !important;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 576px) {
    .wishlist-table {
        font-size: 0.9rem;
    }
    
    .wishlist-table thead th {
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }
    
    .wishlist-table tbody td {
        padding: 1.25rem 0.5rem;
    }
    
    .wishlist-table h6 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .wishlist-table .btn-sm {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.85rem;
        min-width: 48px;
        min-height: 48px;
    }
    
    .wishlist-container .card:last-child .btn {
        font-size: 0.9rem;
        padding: 1rem 1.5rem;
    }
    
    /* Extra spacing for very small screens */
    .wishlist-table .d-md-none .row {
        margin-top: 1rem !important;
    }
    
    .wishlist-table .d-md-none .p-2 {
        padding: 1rem !important;
    }
    
    .wishlist-table .mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    .wishlist-table .small {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Empty State (if needed) */
.wishlist-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.wishlist-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

/* Animation for table rows */
.wishlist-item {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.3s ease forwards;
}

.wishlist-item:nth-child(1) { animation-delay: 0.1s; }
.wishlist-item:nth-child(2) { animation-delay: 0.15s; }
.wishlist-item:nth-child(3) { animation-delay: 0.2s; }
.wishlist-item:nth-child(4) { animation-delay: 0.25s; }
.wishlist-item:nth-child(5) { animation-delay: 0.3s; }
.wishlist-item:nth-child(n+6) { animation-delay: 0.35s; }

/* Mobile specific adjustments for Wishlist */
@media (max-width: 767.98px) {
    .wishlist-table .d-md-none .row .col-6 {
        margin-bottom: 0.75rem;
        padding: 0.5rem;
    }
    
    .wishlist-table .d-md-none .row .col-6:last-child {
        margin-bottom: 0;
    }
    
    .wishlist-table .d-md-none span {
        line-height: 1.4;
        word-break: break-word;
    }
    
    .wishlist-table .product-info h6 {
        line-height: 1.3;
        word-break: break-word;
    }
    
    .wishlist-table .small {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

@media (max-width: 576px) {
    .wishlist-table .d-md-none {
        padding: 0.75rem 0;
        margin-top: 0.75rem;
    }
    
    .wishlist-table .d-md-none .row {
        margin: 0;
    }
    
    .wishlist-table .d-md-none .col-6 {
        padding: 0.375rem 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .wishlist-table .product-info {
        padding-right: 0.5rem;
    }
    
    .wishlist-table .product-info h6 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
}

/* === ORDER TABLE STYLES === */

/* Order Items Container */
.order_items {
	margin-bottom: 1.5rem;
}

/* Order Table */
.order_items .order-table {
	border-collapse: separate;
	border-spacing: 0;
}

.order_items .order-table thead th {
	border-bottom: 2px solid #dee2e6;
	padding: 0.75rem;
	font-weight: 600;
	background-color: #f8f9fa;
	color: #495057;
}

.order_items .order-table tbody td {
	padding: 1rem 0.75rem;
	vertical-align: middle;
	border-bottom: 1px solid #e9ecef;
}

/* Column Widths */
.order_items .order-table th.col-ean,
.order_items .order-table td.col-ean {
	width: 120px;
}

.order_items .order-table th.col-price,
.order_items .order-table td.col-price {
	width: 120px;
}

.order_items .order-table th.col-quantity,
.order_items .order-table td.col-quantity {
	width: 80px;
}

.order_items .order-table th.col-total,
.order_items .order-table td.col-total {
	width: 120px;
}

/* Order Item Row */
.order_items .order-item {
	transition: background-color 0.2s ease;
}

.order_items .order-item:hover {
	background-color: #f8f9fa;
}

/* Product Name and Info */
.order_items .order-item h6 {
	margin-bottom: 0.25rem;
	color: #212529;
}

.order_items .order-item .text-muted {
	color: #6c757d !important;
	font-size: 0.875rem;
}

.order_items .order-item .fw-medium {
	font-weight: 500;
}

/* Price Display */
.order_items .text-primary {
	color: var(--ap-red) !important;
	font-weight: 600;
}

.order_items .text-success {
	color: #198754 !important;
	font-weight: 600;
}

/* Quantity Badge */
.order_items .badge.bg-light {
	background-color: #f8f9fa !important;
	color: #495057;
	border: 1px solid #dee2e6;
	padding: 0.375rem 0.75rem;
	font-weight: 500;
}

/* EAN Code */
.order_items code {
	background-color: #f8f9fa;
	color: #6c757d;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	font-size: 0.875rem;
}

/* Attributes */
.order_items .attribs {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: #6c757d;
}

/* File Downloads */
.order_items .filelist {
	margin-top: 0.75rem;
}

.order_items .filelist .file {
	margin-bottom: 0.5rem;
	padding: 0.5rem;
	background-color: #f8f9fa;
	border-radius: 0.375rem;
	border: 1px solid #e9ecef;
}

.order_items .filelist .descr {
	font-weight: 500;
	color: #495057;
	margin-right: 1rem;
}

.order_items .filelist .download {
	color: var(--ap-red) !important;
	text-decoration: none;
	font-weight: 500;
}

.order_items .filelist .download:hover {
	color: var(--ap-red-700) !important;
	text-decoration: underline;
}

/* Mobile Layout for Order Items */
.order_items .d-md-none .row.g-1 {
	background-color: #f8f9fa;
	border-radius: 0.5rem;
	padding: 0.75rem;
	margin-top: 0.75rem;
	border: 1px solid #e9ecef;
}

.order_items .d-md-none .col-12.mb-1 {
	border-bottom: 1px solid #dee2e6;
	padding-bottom: 0.5rem;
	margin-bottom: 0.75rem !important;
}

.order_items .d-md-none .text-muted {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.order_items .d-md-none .fw-bold {
	font-size: 0.875rem;
}

/* Responsive Design for Order Table */
@media (max-width: 991.98px) {
	.order_items .table-responsive {
		border: none;
	}
	
	.order_items .order-table {
		margin-bottom: 0;
	}
}

@media (max-width: 767.98px) {
	.order_items .order-item {
		border-bottom: 2px solid #e9ecef;
		padding-bottom: 1.5rem;
		margin-bottom: 1rem;
	}
	
	.order_items .order-item:last-child {
		border-bottom: none;
		margin-bottom: 0;
	}
	
	.order_items .d-md-none {
		padding: 0;
	}
}

@media (max-width: 576px) {
	.order_items .order-item h6 {
		font-size: 1rem;
		line-height: 1.4;
	}
	
	.order_items .d-md-none .row.g-1 {
		margin-top: 0.5rem;
		padding: 0.5rem;
	}
	
	.order_items .d-md-none .fw-bold {
		font-size: 0.8125rem;
	}
}

/* === E-COMMERCE TABLES (CART, CHECKOUT, WISHLIST) === */

/* Base Table Styles - ใช้ร่วมกันสำหรับทุกตารางใน e-commerce */
.cart-table,
.checkout-table,
.wishlist-table,
.order-table {
	border-collapse: separate;
	border-spacing: 0;
}

/* Base Header Styles */
.cart-table thead th,
.checkout-table thead th,
.wishlist-table thead th,
.order-table thead th {
	border-bottom: 2px solid #dee2e6;
	padding: 0.75rem;
	font-weight: 600;
	background-color: #f8f9fa;
	color: #495057;
}

/* Base Body Styles */
.cart-table tbody td,
.checkout-table tbody td,
.wishlist-table tbody td,
.order-table tbody td {
	padding: 1rem 0.75rem;
	vertical-align: middle;
	border-bottom: 1px solid #e9ecef;
}

/* === SHARED COLUMN WIDTHS === */
/* Image Column */
.cart-table th.col-image,
.cart-table td.col-image,
.checkout-table th.col-image,
.checkout-table td.col-image,
.wishlist-table th.col-image,
.wishlist-table td.col-image,
.order-table th.col-image,
.order-table td.col-image {
	width: 100px;
}

/* Price Column */
.cart-table th.col-price,
.cart-table td.col-price,
.checkout-table th.col-price,
.checkout-table td.col-price,
.wishlist-table th.col-price,
.wishlist-table td.col-price,
.order-table th.col-price,
.order-table td.col-price {
	width: 120px;
}

/* Total Column */
.cart-table th.col-total,
.cart-table td.col-total,
.checkout-table th.col-total,
.checkout-table td.col-total,
.wishlist-table th.col-total,
.wishlist-table td.col-total,
.order-table th.col-total,
.order-table td.col-total {
	width: 120px;
}

/* === SPECIFIC COLUMN WIDTHS === */
/* Quantity Column - แตกต่างกันตามตาราง */
.cart-table th.col-quantity,
.cart-table td.col-quantity {
	width: 100px; /* กว้างกว่าเพราะมี input field */
}

.checkout-table th.col-quantity,
.checkout-table td.col-quantity,
.wishlist-table th.col-quantity,
.wishlist-table td.col-quantity,
.order-table th.col-quantity,
.order-table td.col-quantity {
	width: 80px;
}

/* Remove Column - แตกต่างกันตามตาราง */
.cart-table th.col-remove,
.cart-table td.col-remove {
	width: 80px;
}

.wishlist-table th.col-remove,
.wishlist-table td.col-remove {
	width: 60px;
}

/* Wishlist-specific: Add to Cart Column */
.wishlist-table th.col-add-cart,
.wishlist-table td.col-add-cart {
	width: 100px;
}

/* Order-specific: EAN Column */
.order-table th.col-ean,
.order-table td.col-ean {
	width: 120px;
}

/* === SHARED IMAGE STYLES === */
.cart-table .img-thumbnail.large,
.checkout-table .img-thumbnail.large,
.wishlist-table .img-thumbnail.large,
.order-table .img-thumbnail.large {
	width: 80px;
	height: 80px;
	object-fit: cover;
}

.cart-table .img-thumbnail.small,
.checkout-table .img-thumbnail.small,
.wishlist-table .img-thumbnail.small,
.order-table .img-thumbnail.small {
	width: 60px;
	height: 60px;
	object-fit: cover;
}

/* === CART-SPECIFIC STYLES === */
.cart-table .quantity-input-mobile {
	width: 50px;
}

.cart-table .quantity-input-desktop {
	width: 70px;
}

/* === HISTORY TABLE STYLES === */
/* History-specific Column Widths */
.history-table th.col-date,
.history-table td.col-date {
	width: 150px;
}

.history-table th.col-status,
.history-table td.col-status {
	width: 180px;
}

/* History Item Mobile Layout */
.history-table .history-item .comment-content {
	line-height: 1.5;
	color: #495057;
}

.history-table .d-md-none .fw-bold {
	font-size: 0.875rem;
}

.history-table .badge {
	font-size: 0.75rem;
	padding: 0.375rem 0.75rem;
}

/* === GOODS RETURNED FORM STYLES === */

/* Goods Returned Page Container */
.jshop.goodsreturned {
	padding: 0;
}

.jshop.goodsreturned .page-header {
	color: var(--site-primary-color);
	font-weight: 600;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--site-primary-color);
	padding-bottom: 0.5rem;
}

/* Form Cards */
.jshop.goodsreturned .card {
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.15s ease-in-out;
}

.jshop.goodsreturned .card:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.jshop.goodsreturned .card-header {
	background-color: #f8f9fa;
	border-bottom: 1px solid #dee2e6;
	padding: 1rem 1.25rem;
}

.jshop.goodsreturned .card-title {
	color: var(--site-primary-color);
	font-weight: 600;
	font-size: 1.1rem;
}

/* Goods Returned Items Table */
.jshop.goodsreturned #goods_returned_items {
	margin-bottom: 0;
}

.jshop.goodsreturned #goods_returned_items thead th {
	background-color: #f8f9fa;
	border-bottom: 2px solid #dee2e6;
	color: #495057;
	font-weight: 600;
	font-size: 0.9rem;
	padding: 0.875rem 0.75rem;
	vertical-align: middle;
}

.jshop.goodsreturned #goods_returned_items tbody td {
	padding: 1rem 0.75rem;
	vertical-align: middle;
	border-top: 1px solid #dee2e6;
}

/* Table Column Widths */
.jshop.goodsreturned #goods_returned_items th.col-quantity,
.jshop.goodsreturned #goods_returned_items td.col-quantity {
	width: 150px;
	min-width: 150px;
}

.jshop.goodsreturned #goods_returned_items th.col-reason,
.jshop.goodsreturned #goods_returned_items td.col-reason {
	width: 35%;
	min-width: 200px;
}

.jshop.goodsreturned #goods_returned_items th.col-actions,
.jshop.goodsreturned #goods_returned_items td.col-actions {
	width: 100px;
	min-width: 100px;
}

/* Quantity Input Container */
.jshop.goodsreturned .quantity-input-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.jshop.goodsreturned .quantity-input {
	width: 80px !important;
	min-width: 80px;
	flex-shrink: 0;
}

.jshop.goodsreturned .quantity-max {
	font-size: 0.8rem;
	color: #6c757d;
}

/* Reason Textarea */
.jshop.goodsreturned .reason-textarea {
	resize: vertical;
	min-height: 60px;
}

/* Add Item Section */
.jshop.goodsreturned #add_item_section {
	border-top: 1px solid #dee2e6;
	margin-top: 1rem;
	padding-top: 1rem;
}

.jshop.goodsreturned #add_item_section h6 {
	color: var(--site-primary-color);
	font-weight: 600;
	margin-bottom: 1rem;
}

.jshop.goodsreturned #add_item_section .form-label {
	font-weight: 500;
	color: #495057;
	margin-bottom: 0.5rem;
}

/* Action Buttons */
.jshop.goodsreturned #toolbar {
	padding: 1.5rem;
}

.jshop.goodsreturned #toolbar .btn {
	min-width: 120px;
	font-weight: 500;
	padding: 0.75rem 2rem;
	border-radius: 0.375rem;
	transition: all 0.15s ease-in-out;
}

.jshop.goodsreturned #toolbar .btn-primary {
	background-color: var(--site-primary-color);
	border-color: var(--site-primary-color);
}

.jshop.goodsreturned #toolbar .btn-primary:hover {
	background-color: #be123c;
	border-color: #be123c;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(225, 29, 72, 0.2);
}

.jshop.goodsreturned #toolbar .btn-outline-secondary:hover {
	background-color: #6c757d;
	border-color: #6c757d;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

/* Form Controls */
.jshop.goodsreturned .form-control:focus,
.jshop.goodsreturned .form-select:focus {
	border-color: var(--site-primary-color);
	box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.15);
}

.jshop.goodsreturned .btn-success {
	background-color: #198754;
	border-color: #198754;
}

.jshop.goodsreturned .btn-success:hover {
	background-color: #146c43;
	border-color: #146c43;
}

/* Responsive Design for Goods Returned */
@media (max-width: 991.98px) {
	.jshop.goodsreturned .row.g-3 {
		margin-bottom: 1rem;
	}
	
	.jshop.goodsreturned #add_item_section .row {
		align-items: stretch !important;
	}
	
	.jshop.goodsreturned #add_item_section .btn {
		margin-top: 1.75rem;
	}
}

@media (max-width: 767.98px) {
	.jshop.goodsreturned .page-header {
		font-size: 1.5rem;
		text-align: center;
	}
	
	.jshop.goodsreturned .table-responsive {
		border: 1px solid #dee2e6;
		border-radius: 0.375rem;
	}
	
	.jshop.goodsreturned #goods_returned_items th,
	.jshop.goodsreturned #goods_returned_items td {
		padding: 0.75rem 0.5rem;
		font-size: 0.9rem;
	}
	
	.jshop.goodsreturned .quantity-input-container {
		flex-direction: column;
		gap: 0.25rem;
	}
	
	.jshop.goodsreturned .quantity-input {
		width: 70px !important;
	}
	
	.jshop.goodsreturned #toolbar .btn {
		min-width: 100px;
		padding: 0.5rem 1.5rem;
		font-size: 0.9rem;
	}
}

@media (max-width: 576px) {
	.jshop.goodsreturned .card {
		border-radius: 0.25rem;
	}
	
	.jshop.goodsreturned .card-body {
		padding: 1rem 0.75rem;
	}
	
	.jshop.goodsreturned #goods_returned_items th,
	.jshop.goodsreturned #goods_returned_items td {
		padding: 0.5rem 0.25rem;
		font-size: 0.8rem;
	}
	
	.jshop.goodsreturned .btn-sm {
		padding: 0.25rem 0.5rem;
		font-size: 0.75rem;
	}
	
	.jshop.goodsreturned #toolbar {
		padding: 1rem 0.5rem;
	}
	
	.jshop.goodsreturned #toolbar .btn {
		width: 100%;
		margin-bottom: 0.5rem;
	}
	
	.jshop.goodsreturned #toolbar .d-flex {
		flex-direction: column;
	}
}

/* === GOODS RETURNED LIST STYLES === */

/* Goods Returned List Page Container */
.jshop.goodsreturneds {
	padding: 0;
}

.jshop.goodsreturneds .page-header {
	color: var(--site-primary-color);
	font-weight: 600;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--site-primary-color);
	padding-bottom: 0.5rem;
}

/* Header Actions Card */
.jshop.goodsreturneds .card:first-child {
	border: 1px solid #dee2e6;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.jshop.goodsreturneds .card:first-child .btn-primary {
	background-color: var(--site-primary-color);
	border-color: var(--site-primary-color);
	font-weight: 500;
	transition: all 0.15s ease-in-out;
}

.jshop.goodsreturneds .card:first-child .btn-primary:hover {
	background-color: #be123c;
	border-color: #be123c;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(225, 29, 72, 0.2);
}

/* List Card */
.jshop.goodsreturneds .card:last-child {
	border: 1px solid #dee2e6;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.jshop.goodsreturneds .card-header {
	background-color: #f8f9fa;
	border-bottom: 1px solid #dee2e6;
	padding: 1rem 1.25rem;
}

.jshop.goodsreturneds .card-title {
	color: var(--site-primary-color);
	font-weight: 600;
	font-size: 1.1rem;
}

/* Goods Returned List Table */
.jshop.goodsreturneds #goods_returned_list {
	margin-bottom: 0;
}

.jshop.goodsreturneds #goods_returned_list thead th {
	background-color: #f8f9fa;
	border-bottom: 2px solid #dee2e6;
	color: #495057;
	font-weight: 600;
	font-size: 0.9rem;
	padding: 0.875rem 0.75rem;
	vertical-align: middle;
}

.jshop.goodsreturneds #goods_returned_list tbody td {
	padding: 1rem 0.75rem;
	vertical-align: middle;
	border-top: 1px solid #dee2e6;
}

/* Table Column Widths */
.jshop.goodsreturneds #goods_returned_list th.col-status,
.jshop.goodsreturneds #goods_returned_list td.col-status {
	width: 150px;
	min-width: 150px;
}

.jshop.goodsreturneds #goods_returned_list th.col-date,
.jshop.goodsreturneds #goods_returned_list td.col-date {
	width: 180px;
	min-width: 180px;
}

.jshop.goodsreturneds #goods_returned_list th.col-actions,
.jshop.goodsreturneds #goods_returned_list td.col-actions {
	width: 80px;
	min-width: 80px;
}

/* Table Row Hover Effect */
.jshop.goodsreturneds .goods-returned-item {
	transition: background-color 0.15s ease-in-out;
}

.jshop.goodsreturneds .goods-returned-item:hover {
	background-color: rgba(225, 29, 72, 0.05);
}

/* Status Badge */
.jshop.goodsreturneds .badge.bg-info {
	background-color: #0dcaf0 !important;
	color: #000;
	font-size: 0.8rem;
	padding: 0.375rem 0.75rem;
}

/* Order Number Link */
.jshop.goodsreturneds .goods-returned-item a {
	color: var(--site-primary-color);
	transition: color 0.15s ease-in-out;
}

.jshop.goodsreturneds .goods-returned-item a:hover {
	color: #be123c;
	text-decoration: underline !important;
}

/* Action Buttons */
.jshop.goodsreturneds .btn-outline-primary {
	border-color: var(--site-primary-color);
	color: var(--site-primary-color);
	transition: all 0.15s ease-in-out;
}

.jshop.goodsreturneds .btn-outline-primary:hover {
	background-color: var(--site-primary-color);
	border-color: var(--site-primary-color);
	color: white;
	transform: scale(1.05);
}

/* Pagination in Footer */
.jshop.goodsreturneds .card-footer {
	padding: 1rem 1.25rem;
}

.jshop.goodsreturneds .card-footer .pagination {
	margin-bottom: 0;
}

/* Empty State */
.jshop.goodsreturneds .empty-state {
	padding: 2rem;
}

.jshop.goodsreturneds .empty-state i {
	color: #6c757d;
	margin-bottom: 1rem;
}

.jshop.goodsreturneds .empty-state h4 {
	color: #495057;
	margin-bottom: 0.5rem;
}

.jshop.goodsreturneds .empty-state p {
	font-size: 1rem;
	line-height: 1.5;
}

/* Badge Count */
.jshop.goodsreturneds .badge.bg-primary {
	background-color: var(--site-primary-color) !important;
	font-size: 0.75rem;
}

/* Responsive Design for Goods Returned List */
@media (max-width: 991.98px) {
	.jshop.goodsreturneds .row.g-3 {
		flex-direction: column;
	}
	
	.jshop.goodsreturneds .col-md-6:first-child {
		margin-bottom: 1rem;
	}
}

@media (max-width: 767.98px) {
	.jshop.goodsreturneds .page-header {
		font-size: 1.5rem;
		text-align: center;
	}
	
	.jshop.goodsreturneds .card-header .card-title {
		font-size: 1rem;
	}
	
	.jshop.goodsreturneds #goods_returned_list th,
	.jshop.goodsreturneds #goods_returned_list td {
		padding: 0.75rem 0.5rem;
		font-size: 0.9rem;
	}
	
	.jshop.goodsreturneds #goods_returned_list th.col-status,
	.jshop.goodsreturneds #goods_returned_list td.col-status {
		width: 120px;
		min-width: 120px;
	}
	
	.jshop.goodsreturneds #goods_returned_list th.col-date,
	.jshop.goodsreturneds #goods_returned_list td.col-date {
		width: 140px;
		min-width: 140px;
	}
	
	.jshop.goodsreturneds .badge {
		font-size: 0.7rem;
		padding: 0.25rem 0.5rem;
	}
}

@media (max-width: 576px) {
	.jshop.goodsreturneds .card-body {
		padding: 1rem 0.75rem;
	}
	
	.jshop.goodsreturneds #goods_returned_list th,
	.jshop.goodsreturneds #goods_returned_list td {
		padding: 0.5rem 0.25rem;
		font-size: 0.8rem;
	}
	
	.jshop.goodsreturneds .btn-sm {
		padding: 0.25rem 0.5rem;
		font-size: 0.75rem;
	}
	
	.jshop.goodsreturneds .empty-state {
		padding: 1.5rem 1rem;
	}
	
	.jshop.goodsreturneds .empty-state i {
		font-size: 2rem;
	}
	
	.jshop.goodsreturneds .empty-state h4 {
		font-size: 1.2rem;
	}
}
#jquery-overlay {
    z-index: 1040 !important;
}
#jquery-lightbox {
    z-index: 1050 !important;
}