/* =====================================================
   MMDC Armas - Componentes Adicionais
   ===================================================== */

/* ==================== Toast Notifications ==================== */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    right: var(--space-md);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    min-width: 300px;
    max-width: 400px;
    padding: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-success {
    border-left: 4px solid var(--color-success);
}

.toast.toast-error {
    border-left: 4px solid var(--color-error);
}

.toast.toast-warning {
    border-left: 4px solid var(--color-warning);
}

.toast.toast-info {
    border-left: 4px solid var(--color-info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.toast-message {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

/* ==================== Dropdown ==================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.dropdown.active .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-item:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-xs) 0;
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    font-size: var(--font-size-sm);
}

.breadcrumb-item {
    color: var(--color-text-muted);
}

.breadcrumb-item a {
    color: var(--color-text-secondary);
}

.breadcrumb-item a:hover {
    color: var(--color-accent);
}

.breadcrumb-item.active {
    color: var(--color-text-primary);
}

.breadcrumb-separator {
    color: var(--color-text-muted);
}

/* ==================== Steps / Stepper ==================== */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--color-border);
}

.step.completed::after {
    background: var(--color-accent);
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    font-weight: 600;
    z-index: 1;
    transition: all var(--transition-fast);
}

.step.active .step-number {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: white;
}

.step.completed .step-number {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: white;
}

.step-label {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--color-text-primary);
}

/* ==================== Accordion ==================== */
.accordion {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-card);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: var(--color-bg-hover);
}

.accordion-title {
    font-weight: 600;
}

.accordion-icon {
    transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 0 var(--space-lg);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-base);
}

.accordion-item.active .accordion-body {
    padding: var(--space-md) var(--space-lg);
    max-height: 500px;
}

/* ==================== Rating Stars ==================== */
.rating {
    display: flex;
    gap: 2px;
}

.rating-star {
    color: var(--color-border);
    font-size: var(--font-size-lg);
}

.rating-star.filled {
    color: var(--color-warning);
}

.rating-star.half {
    position: relative;
}

.rating-star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    color: var(--color-warning);
    overflow: hidden;
    width: 50%;
}

/* ==================== Avatar ==================== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-accent);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--font-size-sm); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--font-size-xl); }
.avatar-xl { width: 80px; height: 80px; font-size: var(--font-size-2xl); }

/* ==================== Tooltip ==================== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
}

.tooltip:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* ==================== Progress Bar ==================== */
.progress {
    height: 8px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar.success { background: var(--color-success); }
.progress-bar.warning { background: var(--color-warning); }
.progress-bar.error { background: var(--color-error); }

/* ==================== Skeleton Loading ==================== */
.skeleton {
    background: linear-gradient(90deg, 
        var(--color-bg-tertiary) 25%, 
        var(--color-bg-hover) 50%, 
        var(--color-bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-sm);
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--space-md);
}

.skeleton-image {
    height: 200px;
    margin-bottom: var(--space-md);
}

.skeleton-btn {
    height: 40px;
    width: 120px;
}

/* ==================== Image Gallery ==================== */
.gallery {
    display: grid;
    gap: var(--space-md);
}

.gallery-main {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--color-accent);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== Order Status Timeline ==================== */
.timeline {
    position: relative;
    padding-left: var(--space-xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-lg);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -23px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border);
    border-radius: 50%;
}

.timeline-item.completed .timeline-dot {
    background: var(--color-success);
    border-color: var(--color-success);
}

.timeline-item.current .timeline-dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(233, 69, 96, 0); }
}

.timeline-content {
    padding-left: var(--space-sm);
}

.timeline-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.timeline-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ==================== Stat Cards ==================== */
.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(233, 69, 96, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-accent);
    font-size: var(--font-size-xl);
}

.stat-card-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.stat-card-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.stat-card-change {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    margin-top: var(--space-sm);
}

.stat-card-change.positive { color: var(--color-success); }
.stat-card-change.negative { color: var(--color-error); }

/* ==================== Chips / Tags ==================== */
.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
}

.chip-remove {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.chip-remove:hover {
    background: var(--color-error);
    color: white;
}

/* ==================== Switch Toggle ==================== */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.switch-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: var(--color-text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.switch input:checked + .switch-slider {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.switch input:checked + .switch-slider::before {
    transform: translateY(-50%) translateX(24px);
    background: white;
}

/* ==================== File Upload ==================== */
.file-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: var(--color-bg-tertiary);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-hover);
}

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 48px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.file-upload-text {
    color: var(--color-text-secondary);
    text-align: center;
}

.file-upload-text strong {
    color: var(--color-accent);
}

/* ==================== Mobile Menu ==================== */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-primary);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    padding: var(--space-lg);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    min-height: 48px;
    color: var(--color-text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    color: var(--color-accent);
}

/* ==================== Quick View Product ==================== */
.quick-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

@media (max-width: 768px) {
    .quick-view {
        grid-template-columns: 1fr;
    }
}
