html {
    font-size: 13px;
}

@media (min-width: 768px) {
    html {
        font-size: 13px;
    }
}

body {
    font-family: var(--bs-body-font-family);
    margin-bottom: 0;
    background-color: #f7f7f7 !important;
    
}

/* Override Bootstrap primary color */
:root {
    --stl-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --bs-font-sans-serif: var(--stl-font-sans-serif);
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-primary: #0b5ed7;
    --bs-primary-rgb: 11, 94, 215;
    --stl-dark-blue-start: #11415f;
    --stl-dark-blue-mid: #0f3554;
    --stl-dark-blue-end: #0d2e4a;
    --stl-teal-start: #00a8b5;
    --stl-teal-mid: #008ca7;
    --stl-teal-end: #007696;
    --stl-header-blue: #135581;
}

.bg {
    background-image: url('/images/CNC_Carving_STL_Files.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Admin Navbar Styles */

/* Admin navbar/footer styling */
.bg-admin {
    background: linear-gradient(90deg, var(--stl-dark-blue-start), var(--stl-dark-blue-mid) 60%, var(--stl-dark-blue-end));
}

.footer-inverse-border {
    border-top: 5px solid #ffffff;
    border-bottom: none;
    
}

.bg-admin {
    background: linear-gradient(90deg, var(--stl-dark-blue-start), var(--stl-dark-blue-mid) 60%, var(--stl-dark-blue-end)) !important;
    border-bottom: 1px solid #ffffff;
}

/* Thin white top border above the primary main navbar */
.navbar.bg-primary {
    border-top: 1px solid #ffffff;
}

.admin-link {
    color: white !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

    .admin-link:hover {
        color: #f8f9fa !important;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .admin-link.btn {
        background: none;
        border: none;
        text-decoration: none;
    }

        .admin-link.btn:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

/* Divider before nav items */
.with-divider-before {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    
}

/* Search Form Styles - Updated to match button aesthetic */
.search-form {
    width: 100%;
    max-width: 500px;
}

    .search-form .input-group {
        box-shadow: none;
        border-radius: 4px;
        overflow: hidden;
        border: 1px solid #ced4da;
    }

    .search-form .form-control {
        border: none;
        padding: 0.5rem 0.75rem;
        background-color: #f8f9fa;
        font-size: 0.875rem;
        border-radius: 0;
        border-right: 1px solid #dee2e6;
    }

        .search-form .form-control:focus {
            background-color: #fff;
            border-color: #28a745;
            box-shadow: none;
        }

        .search-form .form-control::placeholder {
            color: #6c757d;
            font-style: italic;
        }

    .search-form .input-group-text {
        background-color: #f8f9fa;
        border: none;
        color: #6c757d;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        border-right: 1px solid #dee2e6;
    }

    .search-form .btn-primary {
        border: none;
        padding: 0.5rem 1rem;
        background-color: var(--bs-primary);
        border-color: var(--bs-primary);
        font-size: 0.875rem;
        border-radius: 0;
        font-weight: 500;
    }

        .search-form .btn-primary:hover {
            background-color: #0a53be; /* darker shade of #0b5ed7 */
            border-color: #0a53be;
        }

    .search-form .input-group:focus-within {
        border-color: #28a745;
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
    }

/* Main Navbar Styles */
.navbar-brand {
    font-weight: 400;
    font-size: 1.5rem;
    color: white !important;
    letter-spacing: 0.5px;
    font-family: inherit;
}

    .navbar-brand:hover {
        color: #f8f9fa !important;
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    }

.navbar-brand i {
    font-size: 1.3rem;
    opacity: 0.9;
}

.navbar-brand .brand-tagline {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 0.4rem;
    white-space: nowrap;
    color: #ffffff;
}

.navbar-brand .brand-tagline.Strapline {
    color: #fff !important;
    font-size: 0.9rem;
    font-style: normal;
}

.strapline-title {
    color: #fff !important;
}

.admin-strapline {
    color: #f8f7c6;
    font-size: 0.9rem;
    font-weight: 400;
    font-style: normal;
    white-space: nowrap;
}

.admin-strapline-icon {
    color: #fff;
    width: 1.35em;
    height: 1.35em;
    vertical-align: -0.2em;
}

.bg-success .nav-link {
    color: white !important;

    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
}

    .bg-success .nav-link:hover {
        color: #f8f9fa !important;
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
    }

/* Remove dropdown arrow from navbar items */
.navbar .dropdown-toggle::after {
    display: none;
}

/* Custom Bootstrap icon: bi-filetype-stl */
.bi-filetype-stl::before {
    font-family: initial !important;
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2016%2016'%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M14%204.5V14a2%202%200%200%201-2%202v-1a1%201%200%200%200%201-1V4.5h-2A1.5%201.5%200%200%201%209.5%203V1H4a1%201%200%200%200-1%201v9H2V2a2%202%200%200%201%202-2h5.5z'%2F%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M0%2014.841a1.13%201.13%200%200%200%20.401.823q.194.162.478.252c.284.09.411.091.665.091q.507%200%20.858-.158.355-.159.54-.44a1.17%201.17%200%200%200%20.187-.656q0-.336-.135-.56a1%201%200%200%200-.375-.357%202%202%200%200%200-.565-.21l-.621-.144a1%201%200%200%201-.405-.176.37.37%200%200%201-.143-.299q0-.234.184-.384.187-.152.513-.152.214%200%20.37.068a.6.6%200%200%201%20.245.181.56.56%200%200%201%20.12.258h.75a1.1%201.1%200%200%200-.199-.566%201.2%201.2%200%200%200-.5-.41%201.8%201.8%200%200%200-.78-.152q-.44%200-.776.15-.337.149-.528.421-.19.273-.19.639%200%20.302.123.524t.351.367q.229.143.54.213l.618.144q.31.073.462.193a.39.39%200%200%201%20.153.325q0%20.165-.085.29A.56.56%200%200%201%202%2015.31q-.167.07-.413.07-.176%200-.32-.04a.8.8%200%200%201-.248-.115.58.58%200%200%201-.255-.384z'%2F%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M4.5%2011.85h3.2v.66H6.73v3.34h-.78v-3.34H4.5z'%2F%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M8.8%2011.85h.79v3.34h2.07v.66H8.8z'%2F%3E%0A%3C%2Fsvg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2016%2016'%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M14%204.5V14a2%202%200%200%201-2%202v-1a1%201%200%200%200%201-1V4.5h-2A1.5%201.5%200%200%201%209.5%203V1H4a1%201%200%200%200-1%201v9H2V2a2%202%200%200%201%202-2h5.5z'%2F%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M0%2014.841a1.13%201.13%200%200%200%20.401.823q.194.162.478.252c.284.09.411.091.665.091q.507%200%20.858-.158.355-.159.54-.44a1.17%201.17%200%200%200%20.187-.656q0-.336-.135-.56a1%201%200%200%200-.375-.357%202%202%200%200%200-.565-.21l-.621-.144a1%201%200%200%201-.405-.176.37.37%200%200%201-.143-.299q0-.234.184-.384.187-.152.513-.152.214%200%20.37.068a.6.6%200%200%201%20.245.181.56.56%200%200%201%20.12.258h.75a1.1%201.1%200%200%200-.199-.566%201.2%201.2%200%200%200-.5-.41%201.8%201.8%200%200%200-.78-.152q-.44%200-.776.15-.337.149-.528.421-.19.273-.19.639%200%20.302.123.524t.351.367q.229.143.54.213l.618.144q.31.073.462.193a.39.39%200%200%201%20.153.325q0%20.165-.085.29A.56.56%200%200%201%202%2015.31q-.167.07-.413.07-.176%200-.32-.04a.8.8%200%200%201-.248-.115.58.58%200%200%201-.255-.384z'%2F%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M4.5%2011.85h3.2v.66H6.73v3.34h-.78v-3.34H4.5z'%2F%3E%0A%20%20%3Cpath%20fill%3D'%23fff'%20d%3D'M8.8%2011.85h.79v3.34h2.07v.66H8.8z'%2F%3E%0A%3C%2Fsvg%3E") no-repeat center / contain;
}

.bg-success .with-divider-before {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 0.5rem;
}

/* Primary main navbar link colors */
.navbar.bg-primary .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar.bg-primary .nav-link:hover {
    color: #f8f9fa !important;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.navbar.bg-primary .with-divider-before {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 0.5rem;
    padding-left: 0.5rem;
}

/* Main Content / Footer layout */
:root {
    --app-footer-height: 64px;
}

main {
    padding-top: 2rem;
}

/* Keep content visible above fixed footer */
body {
    padding-bottom: var(--app-footer-height);
}

.app-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    z-index: 1030;
    background-color: #27535c !important;
}

.footer-link-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-link-item.with-divider-before {
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    margin-left: 0.5rem;
    padding-left: 0.5rem;
}

.footer-tutorial-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.35rem 0.85rem;
    transition: all 0.3s ease;
}

.footer-tutorial-link:hover,
.footer-tutorial-link:focus {
    color: #f8f9fa;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

/* Tutorial and informational page styling */
.tutorial-hero {
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, #eef4f5 0%, #f9fbfc 100%);
    border: 1px solid #d6e2e5;
    border-radius: 0.75rem;
    color: #355057;
}

.tutorial-page .tutorial-stage {
    border: 1px solid #d9e4e7;
    border-left: 5px solid #27535c;
    border-radius: 0.75rem !important;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    background: #ffffff;
}

.tutorial-thumb-image {
    width: 100%;
    height: auto;
    border: 1px solid #d6dfe2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tutorial-thumb:hover .tutorial-thumb-image {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.18);
}

.stage-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: #27535c;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tutorial-stage-title {
    color: #1f2f34;
    font-weight: 700;
}

.tutorial-steps {
    padding-left: 1.35rem;
}

.tutorial-steps li {
    margin-bottom: 0.35rem;
    line-height: 1.45;
}

.tutorial-note {
    padding: 0.45rem 0.65rem;
    border-left: 3px solid #b9ced4;
    background: #f4f8f9;
    border-radius: 0.35rem;
    color: #364c53;
    font-size: 0.95rem;
}

/* Card Styles for Business App */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #adb5bd;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card.card-hover {
    transition: box-shadow 0.3s ease;
}

.card.card-hover:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* STL listing tiles: slightly darker border for better separation */
.card.card-hover.border-light.position-relative {
    border-color: #9aa3ad !important;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card.card-hover.border-light.position-relative .catalog-card-thumb {
    border-radius: 0;
}

.card-header {
    background: linear-gradient(125deg, var(--stl-dark-blue-mid) 0%, var(--stl-header-blue) 55%, var(--stl-teal-start) 100%);
    font-weight: 600;
    font-size: 0.82rem;
    color: #ffffff;
    border-bottom: 1px solid #adb5bd;
    padding-top: 0.8rem;
    padding-bottom: 0.6rem;
}

.card-header h5 {
    color: #ffffff;
    font-size: 1.2rem;
}

.card-titles,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: #f8f7c6 !important;
}

.card-body {
    background-color: #ffffff;
    /*background-color: #6d98a1;*/
    /*   background: linear-gradient(to right, #27535c 0%, rgba(39, 83, 92, 0) 100%);*/
    /*border-bottom: 1px solid #27535c;*/



}

.admin-table thead tr {
    border-bottom: 2px solid #6c757d;
}

.admin-table thead th {
    border-bottom: none;
}

.catalog-card-thumb {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.catalog-card-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.details-main-image-container {
    width: 100%;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.details-main-image-container .main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.details-thumbnail-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 520px;
}

.details-thumbnail-stack .small-thumbnail {
    flex: 1;
    width: 110px;
    object-fit: cover;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .details-main-image-container,
    .details-thumbnail-stack {
        height: auto;
    }
}

.preview-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.preview-image-wrapper {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-preview-modal .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L6.707 6l4.647 4.646a.5.5 0 0 1-.708.708l-5-5a.5.5 0 0 1 0-.708l5-5a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
}

.cart-preview-modal .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0L10.707 6l-5.353 5.354a.5.5 0 0 1-.708-.708L9.293 6 4.646 1.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.plead {
    font-size: 13px;
    color: #000;
    
}

.splead {
    font-size: 13px;
    color: #0b5ed7;
}

.bignav {
    border-top: 1px solid #fff;
    background: linear-gradient(90deg, var(--stl-teal-start), var(--stl-teal-mid) 55%, var(--stl-teal-end));
}

.bignav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.25rem 1rem !important;
    transition: all 0.3s ease;
}

.bignav .navbar-brand {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.bignav .nav-link:hover,
.bignav .nav-link:focus {
    color: #f8f9fa !important;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.bignav .with-divider-before {
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    margin-left: 0.5rem;
    padding-left: 0.5rem;
}

.bignav .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.bignav .dropdown-item {
    padding: 0.5rem 1rem;
}

.bignav .dropdown-item:hover,
.bignav .dropdown-item:focus {
    background-color: rgba(108, 117, 125, 0.14);
}

/* Button Styles */
    .btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

    .btn-success:hover {
        background-color: #218838;
        border-color: #1e7e34;
    }

/* Table Styles */
.table {
    margin-bottom: 0;
}

    .table th {
        background-color: #f8f9fa;
        border-bottom: 2px solid #28a745;
        font-weight: 600;
        color: #495057;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(40, 167, 69, 0.05);
}

/* Actions Column Styling */
.actions-column {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
    white-space: nowrap;
}

    .actions-column th {
        text-align: left !important;
    }

.actions-buttons-center {
    display: inline-flex;
    justify-content: center;
}

/* Form Styles */
.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
}

/* Alert Styles */
.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.site-alert {
    background-color: #e2e3e5 !important;
    border-color: #d3d6d8 !important;
    color: #41464b !important;
}

.site-alert h5,
.site-alert h6,
.site-alert p,
.site-alert ul,
.site-alert li,
.site-alert strong {
    color: inherit !important;
}

.site-alert a {
    color: #0b5ed7 !important;
    text-decoration: none;
}

.site-alert a:hover {
    color: #0a53be !important;
    text-decoration: underline;
}

/* Modal Enhancements */
.modal-header {
    border-bottom: 2px solid #28a745;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
}

/* Enhanced form styling */
.form-control:focus + .dropdown-arrow {
    color: #28a745;
}

/* Input group for currency */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
    font-weight: 600;
}

.input-group .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

    .input-group .form-control:focus + .input-group-text,
    .input-group .input-group-text:focus + .form-control {
        border-color: #28a745;
    }

/* Textarea styling */
textarea.form-control {
    resize: vertical;
    min-height: calc(1.5em * 7 + 1rem);
}

/* Button spacing and grouping */
.btn + .btn {
    margin-left: 0.5rem;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Compact action buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

    .btn-sm i {
        font-size: 0.8rem;
    }

/* Action button colors */
.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

.admin-header-action-btn {
    border: 1px solid #ffffff !important;
}

.admin-action-btn,
.admin-action-btn.btn-primary,
.admin-action-btn.btn-secondary,
.admin-action-btn.btn-danger,
.admin-action-btn.btn-outline-primary,
.admin-action-btn.btn-outline-secondary,
.admin-action-btn.btn-outline-danger {
    background-color: var(--bs-primary) !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
}

.admin-action-btn:hover,
.admin-action-btn:focus,
.admin-action-btn:active {
    background-color: #0a53be !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Navbar toggler (hamburger) styling */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Enhanced responsive design */
@media (max-width: 767px) {
    .search-form {
        margin-top: 1rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .admin-link {
        font-size: 0.85rem;
    }

    footer .text-end {
        text-align: start !important;
        margin-top: 0.5rem;
    }

    .footer-link-group {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    /* Smaller buttons on mobile */
    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* Utility Classes */
.text-success {
    color: #28a745 !important;
}

.bg-light-success {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

/* STL Relief specific styles */
.main-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.main-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.small-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.small-thumbnail {
    width: 22%;
    max-width: 110px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    cursor: pointer;
    margin: 5px;
}

@media (max-width: 768px) {
    .main-image {
        max-width: 90vw;
    }

    .small-thumbnail {
        width: 20vw;
        max-width: 80px;
    }
}

@media (max-width: 576px) {
    .main-image {
        max-width: 85vw;
    }

    .small-thumbnail {
        width: 18vw;
        max-width: 60px;
    }
}

.zoom-lens {
    position: absolute;
    border: 1px solid #000;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: none;
    z-index: 10;
    user-select: none;
    pointer-events: none;
}

.zoom-result {
    position: absolute;
    border: 1px solid #000;
    background-repeat: no-repeat;
    z-index: 10;
    display: none;
}

.carousel-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.carousel-content {
    position: relative;
    max-width: 1024px;
    margin: auto;
}

.carousel-slides {
    display: flex;
    overflow: hidden;
}

.carousel-image {
    display: none;
}

    .carousel-image.active {
        display: block;
    }

.carousel-prev, .carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-size: 48px;
    user-select: none;
    text-decoration: none;
    line-height: 1;
}

.carousel-prev::after,
.carousel-next::after {
    content: '';
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #dc3545;
    font-size: 40px;
    cursor: pointer;
}

.alert-stl {
    background-color: #f7f7f7 !important;
    border-color: #f7f7f7 !important;
    color: #000 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-stl h6,
.alert-stl p,
.alert-stl ul,
.alert-stl li {
    color: inherit !important;
}

.alert-stl a {
    color: #064855 !important;
    text-decoration: underline;
}

.alert-stl a:hover {
    color: #03272e !important;
}

.thumbnail-card {
    border: 1px solid #9aa3ad !important;
    border-radius: 0.5rem;
    overflow: hidden;
}

.thumbnail-card img {
    display: block;
    border-radius: 0 !important;
}

.cart-thumb-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.cart-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .cart-thumb-wrapper {
        width: 130px;
        height: 130px;
    }
}

.cart-preview-trigger {
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: none;
}

.cart-preview-trigger:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.cart-modal-image {
    max-height: 520px;
    object-fit: contain;
    border-radius: 0.5rem;
}

.cart-preview-modal .modal-body {
    background-color: #f8f9fa;
}

.cart-preview-modal .modal-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.cart-preview-modal .modal-title {
    color: #0b5ed7;
    font-weight: 600;
}

.cart-preview-modal .carousel-control-prev-icon,
.cart-preview-modal .carousel-control-next-icon {
    filter: invert(24%) sepia(94%) saturate(6144%) hue-rotate(353deg) brightness(96%) contrast(101%);
}

.cart-preview-modal .btn-close {
    --bs-btn-close-color: #dc3545;
    --bs-btn-close-opacity: 1;
    --bs-btn-close-hover-opacity: 1;
    filter: none;
}

.cart-total-row td {
    border-top: none;
}


.stl-tile {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stl-tile .card-img-top,
.stl-tile .thumbnail-image {
    transition: transform 0.2s ease;
}

.stl-tile:hover {
    transform: translateY(-4px) scale(1.02);
}

.stl-tile:hover .card-img-top,
.stl-tile:hover .thumbnail-image {
    transform: scale(1.03);
}

main { flex-grow: 1; }
