/* =============================================
   BASE STYLESHEET
   Theme colors are loaded from /assets/css/themes/ folder
   ============================================= */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--link-hover);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--shadow);
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1;
}

.navbar-brand a:hover {
    color: var(--primary-hover);
}

/* Navbar Logo Styles */
.navbar-logo {
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.navbar-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.navbar-logo-circle {
    border-radius: 50%;
}

.navbar-logo-square {
    border-radius: 8px;
}

.navbar-text {
    display: inline-block;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-menu a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
}

/* Main content */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 2.5rem 0;
}

/* Typography */
.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Theme-aware note boxes / status messages */
.note-box {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--note-accent, var(--primary-color));
    color: var(--text-primary);
    box-shadow: 0 2px 6px var(--shadow);
}

.note-box .note-icon {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--note-accent, var(--primary-color));
    margin-top: 2px;
}

.note-box strong {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.note-box p,
.note-box div,
.note-box span {
    color: inherit;
}

.note-box.note-success { --note-accent: var(--success-color, #16a34a); }
.note-box.note-error { --note-accent: var(--danger-color, #ef4444); }
.note-box.note-info { --note-accent: var(--info-color, #0ea5e9); }
.note-box.note-warning { --note-accent: var(--warning-color, #f59e0b); }

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: min(360px, 90vw);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    pointer-events: auto;
}

[data-mode="dark"] .toast {
    background: var(--bg-tertiary);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.toast.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.toast-message {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.8;
    padding: 0;
}

.toast-close:hover {
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

.toast-info .toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info-color);
}

/* Utility chips */
.status-chip,
.currency-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-primary);
}

[data-mode="dark"] .status-chip,
[data-mode="dark"] .currency-chip {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light, #f8fafc);
}

/* Footer - Old (Keep for backward compatibility) */
.footer {
    background-color: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    padding: 3rem 0 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

/* New Footer Design */
.footer-main {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e8e8e8;
    margin-top: 4rem;
}

.footer-content {
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
    gap: 3rem;
}

.footer-column {
    min-width: 0;
}

.footer-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-about .footer-heading {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #b8b8b8;
    margin-bottom: 1.5rem;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #b8b8b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e8e8e8;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Footer Contact */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #b8b8b8;
    line-height: 1.6;
}

.footer-contact-list svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-color);
}

.footer-contact-list a {
    color: #b8b8b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-list a:hover {
    color: var(--primary-color);
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    margin: 0;
    font-size: 0.9rem;
    color: #b8b8b8;
}

.footer-payment-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #b8b8b8;
}

.footer-payment-icons svg {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid transparent;
    font-weight: 500;
    display: block;
    box-shadow: 0 2px 4px var(--shadow);
    line-height: 1.6;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

[data-theme="dark"] .alert-success {
    background-color: rgba(16, 185, 129, 0.15);
}

.alert-error, .alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

[data-theme="dark"] .alert-error,
[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-left-color: var(--info-color);
    color: var(--info-color);
}

[data-theme="dark"] .alert-info {
    background-color: rgba(59, 130, 246, 0.15);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 4px var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: 0 6px 12px var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
    border-color: #059669;
    color: white;
    box-shadow: 0 6px 12px var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
    box-shadow: 0 4px 8px var(--shadow);
    transform: translateY(-1px);
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
    border-color: #d97706;
    color: white;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline-secondary:hover:not(:disabled) {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-small {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-info {
    background-color: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.btn-info:hover:not(:disabled) {
    background-color: #0284c7;
    border-color: #0284c7;
    color: white;
    box-shadow: 0 4px 8px var(--shadow);
    transform: translateY(-1px);
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-group {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-group .btn {
    margin: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-label-required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Fix for forms in grid columns */
.row [class*="col-"] .form-control {
    max-width: 100%;
}

.form-control:hover {
    border-color: var(--primary-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-control:disabled {
    background-color: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.invalid-feedback {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--danger-color);
}

.valid-feedback {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--success-color);
}

/* Bootstrap-like Grid & Layout Classes */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.row.g-3 {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.row.g-3 > * {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Search form specific fixes */
.row.g-3 .col-md-10,
.row.g-3 .col-md-2 {
    display: flex;
    align-items: stretch;
}

.row.g-3 .col-md-10 .form-control,
.row.g-3 .col-md-2 .btn {
    height: 100%;
    display: flex;
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

/* Input Groups */
.input-group {
    display: flex;
    position: relative;
    width: 100%;
}

.input-group .form-control {
    flex: 1;
    border-radius: 8px 0 0 8px;
}

.input-group .btn {
    border-radius: 0 8px 8px 0;
    margin-left: -1px;
}

.input-group .btn-outline-secondary {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.input-group .btn-outline-secondary:hover {
    background-color: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--text-tertiary);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Card Header & Body */
.card-header {
    padding: 1rem 1.5rem;
    margin: -1.75rem -1.75rem 1.5rem -1.75rem;
    background-color: var(--primary-color);
    border-radius: 12px 12px 0 0;
}

.card-header.bg-primary {
    background-color: var(--primary-color);
}

.card-header.text-white {
    color: white;
}

.card-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card.shadow {
    box-shadow: 0 4px 12px var(--shadow);
}

.card-body.p-4 {
    padding: 2rem;
}

/* Progress Bar */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    text-align: center;
    white-space: nowrap;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.progress-bar.bg-danger {
    background-color: var(--danger-color);
}

.progress-bar.bg-warning {
    background-color: #f59e0b;
}

.progress-bar.bg-success {
    background-color: var(--success-color);
}

/* Alert Headings */
.alert-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Spacing Utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-5 { margin-top: 3rem !important; }
.p-4 { padding: 2rem !important; }
.px-5 { padding-left: 3rem !important; padding-right: 3rem !important; }

.d-flex { display: flex !important; }
.gap-2 { gap: 0.5rem !important; }

.bg-light {
    background-color: var(--bg-secondary);
}

.border-0 {
    border: none !important;
}

.small {
    font-size: 0.875rem;
}

/* Button Size Variants */
.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Button alignment fix - ensure buttons align properly when side by side */
.btn + .btn:not(.mt-1):not(.mt-2):not(.mt-3):not(.mt-4) {
    margin-left: 0.0rem;
}

/* When buttons are in the same flex container (side by side) */
.text-center .btn + .btn,
.card-body .btn + .btn:not([style*="width: 100%"]) {
    margin-left: 0.75rem;
}

/* Remove left margin for stacked buttons */
.btn.mt-1,
.btn.mt-2,
.btn.mt-3,
.btn.mt-4 {
    margin-left: 0;
}

.text-center .btn {
    vertical-align: middle;
}

/* Cards */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-subtitle {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.card-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-highlight {
    border-left: 4px solid var(--primary-color);
}

/* Address Actions */
.address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.address-actions form {
    flex: 1;
    display: flex;
    margin: 0;
}

.address-actions .btn {
    flex: 1;
    white-space: nowrap;
}

/* Product Detail Page */

/* Two Column Layout: Content Left, Sidebar Right */
.product-detail-layout-new {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: start;
}

/* Product Image inside Content Area */
.product-content-center .product-image-top {
    margin-bottom: 2rem;
}

.product-content-center .product-image-top .product-thumbnail {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-content-center .product-image-top .product-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px var(--shadow);
}

.product-content-center .product-image-top .product-thumb-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* Left: Small Product Image - DEPRECATED, using top image now */
.product-image-left {
    display: none; /* Hidden since we moved image to top */
}

.product-thumbnail {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px var(--shadow);
}

.product-thumb-image {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* Center: Product Content */
.product-content-center {
    min-width: 0; /* Prevents grid overflow */
    flex: 1;
}

.product-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    /* Full description shown on product detail page */
}

/* Extra Description (Rich Text from TinyMCE) */
.product-extra-description {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.8;
}

.product-extra-description h1,
.product-extra-description h2,
.product-extra-description h3,
.product-extra-description h4,
.product-extra-description h5,
.product-extra-description h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-extra-description h1 { font-size: 2rem; }
.product-extra-description h2 { font-size: 1.75rem; }
.product-extra-description h3 { font-size: 1.5rem; }
.product-extra-description h4 { font-size: 1.25rem; }

.product-extra-description p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.product-extra-description ul,
.product-extra-description ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.product-extra-description li {
    margin-bottom: 0.5rem;
}

.product-extra-description a {
    color: var(--primary-color);
    text-decoration: underline;
}

.product-extra-description a:hover {
    color: var(--primary-dark);
}

.product-extra-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.product-extra-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.product-extra-description table th,
.product-extra-description table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.product-extra-description table th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.product-extra-description blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-tertiary);
    font-style: italic;
}

.product-extra-description code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.product-extra-description pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.product-extra-description pre code {
    background: none;
    padding: 0;
}

.product-video-center {
    margin-top: 2rem;
}

.youtube-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
}

.youtube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Right: Sidebar */
.product-sidebar {
    min-width: 400px;
    max-width: 400px;
}

.sticky-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

/* Old Product Detail Layout - Keep for backward compatibility */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-media-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-image-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.product-detail-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.product-detail-video {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 8px;
    display: block;
}

.product-video {
    margin-bottom: 1.5rem;
}

.youtube-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
}

.youtube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.product-info-section {
    margin-top: 1.5rem;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-sidebar {
    min-width: 400px;
}

.sticky-sidebar {
    position: sticky;
    top: 80px;
}

/* Grid layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Product cards */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: scale-down;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.product-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--success-color);
    margin: 0.5rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-old-price {
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* Product card description - limited to 3 lines for cards only */
.product-card .product-description {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--danger-color);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* FREE/PAID Product Badges - Beautiful transparent style with backdrop blur */
.product-price-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.product-price-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.product-price-badge.badge-free {
    color: #ffffff;
}

.product-price-badge.badge-paid {
    color: #ffffff;
}

.product-price-badge-icon {
    font-size: 1rem;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

/* NEW: Price Tag Style Badges for Index Page */
.product-price-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem 0.375rem 0.875rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

.product-price-tag::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 13px 8px 13px 0;
}

.product-price-tag.price-tag-free {
    background: #10b981;
    color: #ffffff;
}

.product-price-tag.price-tag-free::before {
    border-color: transparent #10b981 transparent transparent;
}

.product-price-tag.price-tag-paid {
    background: #6366f1;
    color: #ffffff;
}

.product-price-tag.price-tag-paid::before {
    border-color: transparent #6366f1 transparent transparent;
}

/* Promotional Pricing Styles */
.original-price {
    color: #dc2626;
    text-decoration: line-through;
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 600;
    order: -1; /* Show first */
}

.promo-price {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
}

.promo-badge {
    background: var(--danger-color);
    color: #ffffff;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.575rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Adjust price display when product is free */
.product-price.price-free {
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: 900;
}

/* Product Action Buttons with Icons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-icon svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-icon:hover svg {
    transform: scale(1.1);
}

.btn-icon i,
.btn-icon .icon {
    font-size: 1.1rem;
}

.btn-icon-only {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.btn-icon-only:hover {
    transform: translateY(-2px);
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-actions form {
    flex: 1;
    display: flex;
}

.product-actions .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    min-height: 44px;
}

/* Table Action Buttons */
.table-actions {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.table-actions form {
    display: inline-flex;
    margin: 0;
}

.table-actions .btn {
    white-space: nowrap;
    min-width: auto;
    justify-content: center;
}

.table-actions .btn-small,
.table-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

/* Order Actions */
.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th,
.table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-tertiary);
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.table-striped tbody tr:nth-child(even):hover {
    background-color: var(--bg-tertiary);
}

/* Search bar */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.search-bar input {
    flex: 1;
}

/* Auth forms */
.auth-container {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2.5rem;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.auth-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    background-color: var(--bg-secondary);
    padding: 0 1rem;
    position: relative;
    color: var(--text-secondary);
}

.oauth-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.oauth-button:hover {
    background-color: #f8f9fa;
}

/* Profile tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    overflow-x: visible;
}

.tab {
    padding: 1.25rem 1.75rem;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
    pointer-events: auto; /* Ensure tabs are clickable */
    user-select: none; /* Prevent text selection on click */
}

.tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.tab.active {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cart */
.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--primary-color);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.cart-item-quantity {
    width: 100px;
}

.cart-item-price {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--success-color);
}

.cart-summary {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 1.5rem;
}

/* Checkout sidebar sticky wrapper */
.checkout-sidebar-sticky {
    position: sticky;
    top: 90px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for checkout sidebar */
.checkout-sidebar-sticky::-webkit-scrollbar {
    width: 6px;
}

.checkout-sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.checkout-sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.checkout-sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.cart-summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-summary-total {
    font-size: 1.5rem;
    font-weight: 800;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border-color);
}

/* Admin sidebar */
/* Admin Layout */
body:has(.admin-layout) .container {
    max-width: 1600px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.admin-sidebar {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.admin-sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background-color: var(--bg-tertiary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-primary {
    background-color: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.badge-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Theme Notification Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.theme-notification {
    animation: slideInRight 0.3s ease;
}

/* =============================================
   HERO SLIDER
   ============================================= */
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 3rem;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-lg);
}

.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 2rem;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.slide-content .features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.slide-content .features span {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.slide-content .rating {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.slide-content .rating-text {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 2rem;
}

.slider-btn.next {
    right: 2rem;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    transform: scale(1.3);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Product Layout - Tablet */
    .product-content-center .product-image-top .product-thumbnail {
        max-width: 100%;
    }
    
    .product-detail-layout-new {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-sidebar {
        max-width: 100%;
        min-width: auto;
    }
    
    .sticky-sidebar {
        position: relative;
        top: 0;
    }
    
    /* Footer - Tablet */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .navbar-menu {
        gap: 1rem;
        font-size: 0.875rem;
        flex-wrap: wrap;
    }
    
    .navbar-brand a {
        font-size: 1.375rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .table-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .table-actions .btn {
        width: 100%;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        position: static;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .cart-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .cart-summary {
        position: static;
        margin-top: 2rem;
    }
    
    .checkout-sidebar-sticky {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    .auth-container {
        margin: 1.5rem auto;
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }
    
    /* Grid responsive behavior */
    .col-md-2,
    .col-md-6,
    .col-md-8,
    .col-md-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .row.g-3 {
        margin-right: 0;
        margin-left: 0;
    }
    
    .row.g-3 > * {
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 0.75rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .product-sidebar {
        order: 3;
        min-width: auto;
        width: 100%;
    }
    
    .sticky-sidebar {
        position: relative;
        top: 0;
    }
    
    /* New Product Layout - Mobile */
    .product-content-center .product-image-top .product-thumbnail {
        max-width: 100%;
        padding: 1rem;
    }
    
    .product-content-center .product-image-top .product-thumb-image {
        max-height: 300px;
    }
    
    .product-detail-layout-new {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-image-left {
        position: relative;
        top: 0;
        order: 1;
    }
    
    .product-thumbnail {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .product-content-center {
        order: 2;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-description {
        font-size: 1rem;
    }
    
    .product-sidebar {
        order: 3;
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .sticky-sidebar {
        position: relative;
        top: 0;
    }
    
    /* Footer - Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-about {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-payment-icons {
        justify-content: center;
    }
    
    /* Slider - Mobile */
    .hero-slider {
        margin-bottom: 2rem;
        border-radius: 12px;
    }
    
    .slider-container {
        height: 400px;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .slide-content .features {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .slide-content .features span {
        font-size: 1rem;
    }
    
    .slider-btn {
        padding: 0.75rem 1rem;
        font-size: 1.25rem;
    }
    
    .slider-btn.prev {
        left: 1rem;
    }
    
    .slider-btn.next {
        right: 1rem;
    }
    
    .slider-dots {
        bottom: 1rem;
        gap: 0.75rem;
    }
    
    .dot {
        width: 12px;
        height: 12px;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-bold {
    font-weight: 700;
}

.text-muted {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.5rem; }
.ml-2 { margin-left: 1rem; }
.mr-1 { margin-right: 0.5rem; }
.mr-2 { margin-right: 1rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.gap-0 { gap: 0; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-inline-block {
    display: inline-block;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.rounded {
    border-radius: 8px;
}

.rounded-lg {
    border-radius: 12px;
}

.shadow {
    box-shadow: 0 2px 8px var(--shadow);
}

.shadow-lg {
    box-shadow: 0 8px 24px var(--shadow-lg);
}

/* =============================================
   SIDEBAR CART
   ============================================= */

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-secondary);
    box-shadow: -4px 0 20px var(--shadow);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.cart-sidebar-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.cart-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.cart-close:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-sidebar-body::-webkit-scrollbar {
    width: 8px;
}

.cart-sidebar-body::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.cart-sidebar-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.cart-sidebar-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.cart-sidebar-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    background: var(--bg-tertiary);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.cart-total strong {
    color: var(--success-color);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.cart-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sidebar-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sidebar-cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.sidebar-cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg-primary);
    flex-shrink: 0;
}

.sidebar-cart-item-details {
    flex: 1;
    min-width: 0;
}

.sidebar-cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-cart-item-price {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.sidebar-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-primary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.quantity-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    transition: background 0.2s;
}

.quantity-btn:hover {
    background: var(--bg-secondary);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-value {
    padding: 0.25rem 0.5rem;
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.sidebar-cart-item-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.sidebar-cart-item-remove:hover {
    transform: scale(1.2);
}

.sidebar-cart-item-total {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.25rem;
    font-size: 1.05rem;
}

/* Cart link styling */
.cart-link {
    position: relative;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease;
}

.cart-link:hover {
    color: var(--link-hover);
}

/* Cart bump animation */
@keyframes cartBump {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.3) rotate(-5deg);
    }
}

.cart-link.cart-bump {
    animation: cartBump 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        right: -100%;
        width: 100%;
        max-width: 100%;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
}

/* =============================================
   AJAX LOADING STATES
   ============================================= */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#products-grid {
    min-height: 200px;
    transition: opacity 0.3s ease;
}

#products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Fade in animation for newly loaded products */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.4s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* Footer Theme Modes */
/* Default Theme: Footer follows website theme */
.footer-main.footer-theme-default {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-top: 1px solid var(--border-color);
}

.footer-main.footer-theme-default .footer-heading {
    color: var(--text-primary) !important;
}

.footer-main.footer-theme-default .footer-tagline {
    color: var(--primary-color) !important;
}

.footer-main.footer-theme-default .footer-description {
    color: var(--text-secondary) !important;
}

.footer-main.footer-theme-default .footer-links a {
    color: var(--text-secondary) !important;
}

.footer-main.footer-theme-default .footer-links a:hover {
    color: var(--primary-color) !important;
}

.footer-main.footer-theme-default .footer-social a {
    color: var(--text-secondary) !important;
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

.footer-main.footer-theme-default .footer-social a:hover {
    color: var(--primary-color) !important;
    background: var(--bg-primary) !important;
    border-color: var(--primary-color) !important;
}

.footer-main.footer-theme-default .footer-contact-info {
    color: var(--text-secondary) !important;
}

.footer-main.footer-theme-default .footer-bottom {
    background: var(--bg-tertiary) !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* Independent Theme: Footer uses its own styling (existing styles) */
.footer-main.footer-theme-independent {
    /* Keep existing footer gradient background and independent styling */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* =============================================
   CUSTOM MODAL SYSTEM
   ============================================= */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.custom-modal-overlay.active {
    opacity: 1;
}

.custom-modal {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 100%;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1) translateY(0);
}

.custom-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.custom-modal-icon {
    font-size: 2rem;
    line-height: 1;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.custom-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.custom-modal-body {
    padding: 2rem 1.5rem;
}

.custom-modal-message {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.custom-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: var(--bg-tertiary);
}

.custom-modal-btn {
    padding: 0.625rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.custom-modal-btn-confirm {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.custom-modal-btn-confirm:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.custom-modal-btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.custom-modal-btn-cancel:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Dark mode adjustments */
[data-mode="dark"] .custom-modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

[data-mode="dark"] .custom-modal {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

[data-mode="dark"] .custom-modal-btn-confirm:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5);
}

/* Responsive */
@media (max-width: 576px) {
    .custom-modal {
        margin: 0 10px;
    }
    
    .custom-modal-header {
        padding: 1rem;
    }
    
    .custom-modal-body {
        padding: 1.5rem 1rem;
    }
    
    .custom-modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column-reverse;
    }
    
    .custom-modal-btn {
        width: 100%;
    }
}

/* =============================================
   MOBILE RESPONSIVE STYLES
   ============================================= */

/* Navbar Mobile Toggle Button */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    flex-direction: column;
    gap: 4px;
    width: 30px;
    height: 26px;
    align-items: center;
    justify-content: center;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Admin Sidebar Toggle Button */
.admin-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.admin-sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Desktop Admin Sidebar - Above 992px */
@media (min-width: 993px) {
    .admin-sidebar-toggle {
        display: none !important;
    }
    
    .admin-sidebar {
        position: sticky !important;
        left: auto !important;
        top: 80px;
        width: auto;
        height: fit-content;
        z-index: auto;
        box-shadow: none;
    }
    
    .admin-sidebar-overlay {
        display: none !important;
    }
    
    .admin-layout {
        display: grid;
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
}

/* Mobile Responsive Breakpoints */
@media (max-width: 992px) {
    /* Navbar Mobile */
    .navbar-toggle {
        display: flex;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0 0 0;
        border-top: 1px solid var(--border-color);
        margin-top: 1rem;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-menu a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-menu a::after {
        display: none;
    }
    
    .theme-toggle {
        margin: 1rem auto;
    }
    
    /* Admin Layout Mobile */
    .admin-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .admin-layout {
        display: block;
        position: relative;
    }
    
    .admin-sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 999;
        background: var(--bg-secondary);
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 1rem;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .admin-sidebar.active {
        left: 0;
    }
    
    .admin-content {
        width: 100%;
        padding: 1rem;
        margin-left: 0;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Cards and Tables */
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Products Grid */
    .products {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100% !important;
    }
    
    /* Buttons */
    .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn {
        white-space: nowrap;
    }
    
    /* Page Title */
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Further mobile optimizations */
    .navbar-brand a {
        font-size: 1.25rem;
    }
    
    .navbar-logo {
        height: 32px !important;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .products {
        grid-template-columns: 1fr;
    }
    
    /* Modal adjustments */
    .custom-modal {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Cart Sidebar */
    .cart-sidebar {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    /* Small mobile devices */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand a {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    /* Admin Sidebar Mobile */
    .admin-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .admin-sidebar-toggle {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 600px) and (orientation: landscape) {
    .navbar {
        position: static;
    }
    
    .admin-sidebar {
        padding-top: 0.5rem;
    }
    
    .admin-sidebar a {
        padding: 0.5rem 1.25rem;
    }
}

