/**
 * AETHER E-Commerce - Custom Styles
 * Additional styles for interactive elements
 */

/* Toast Notifications */
.toast-notification {
    animation: slideIn 0.3s ease-out;
}

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

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Validation States */
input.error,
select.error {
    border-color: #ba1a1a !important;
}

input.success,
select.success {
    border-color: #28a745 !important;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 49;
}

/* Product Card Hover Effect */
.product-card-image {
    transition: transform 0.7s ease-out;
}

.product-card:hover .product-card-image {
    transform: scale(1.05);
}

/* Quick Add Button */
.quick-add-button {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .quick-add-button {
    opacity: 1;
}

@media (max-width: 768px) {
    .quick-add-button {
        opacity: 1;
    }
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #000;
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Size/Color Selector Buttons */
.size-selector button,
.color-selector button {
    transition: all 0.2s ease;
}

.size-selector button.selected {
    background: #000;
    color: #fff;
    border-color: #000;
}

.color-selector button.selected {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
}

/* Accordion Animation */
details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details[open] summary ~ * {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Gallery */
.thumbnail-button {
    transition: border-color 0.2s ease;
}

.thumbnail-button:hover,
.thumbnail-button.selected {
    border-color: #000;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    color: #c6c6cd;
}

/* Test Mode Badge */
.test-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Admin Panel Styles */
.admin-sidebar {
    width: 250px;
    background: #000;
    color: #fff;
}

.admin-sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e3e4;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 2px;
}

.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.processing { background: #dbeafe; color: #1e40af; }
.status-badge.shipped { background: #d1fae5; color: #065f46; }
.status-badge.delivered { background: #d1fae5; color: #065f46; }
.status-badge.cancelled { background: #fee2e2; color: #991b1b; }

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #c6c6cd;
    background: #fff;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #000;
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 1px solid #c6c6cd;
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #c6c6cd;
}

.pagination a:hover {
    background: #f8f9fa;
}

.pagination .current {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Filter Tags */
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e1e3e4;
    font-size: 12px;
}

.filter-tag button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.5;
}

.filter-tag button:hover {
    opacity: 1;
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.product-gallery-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.product-gallery-thumbnails button {
    flex-shrink: 0;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .product-gallery-thumbnails {
        flex-direction: column;
        overflow-x: visible;
        overflow-y: auto;
        max-height: 500px;
        scroll-snap-type: y mandatory;
    }
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e3e4;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.search-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.search-suggestion-item:hover {
    background: #f8f9fa;
}

/* Utilities */
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
