/* =======================================================
   AURA E-COMMERCE PLATFORM — BASE DESIGN SYSTEM
   ======================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

body.theme-switching {
    opacity: 0.85;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* Container Utilities */
.container {
    width: 100%;
    max-width: var(--theme-container, 1280px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.container-fluid {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* Flexbox & Grid Utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.grid { display: grid; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

/* Common Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-primary { background: var(--theme-primary, #111827); color: #ffffff; }
.badge-danger { background: #ef4444; color: #ffffff; }
.badge-warning { background: #f59e0b; color: #1e293b; }
.badge-success { background: #10b981; color: #ffffff; }
.badge-neutral { background: #e2e8f0; color: #334155; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--theme-radius, 8px);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--theme-primary, #111827);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.16);
}
.btn-secondary {
    background: transparent;
    color: var(--theme-primary, #111827);
    border: 1px solid currentColor;
}
.btn-secondary:hover {
    background: rgba(0,0,0,0.04);
}
.btn-accent {
    background: var(--theme-accent, #0284c7);
    color: #ffffff;
}
.btn-accent:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* Announcement Bar */
.announcement-bar {
    background: #0f172a;
    color: #f8fafc;
    padding: 8px 16px;
    font-size: 13px;
    text-align: center;
    letter-spacing: 0.2px;
}
.announcement-bar a {
    text-decoration: underline;
    font-weight: 600;
}

/* Badges for counter */
.cart-badge-count, .wishlist-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    background: #ef4444;
    color: #ffffff;
    padding: 0 4px;
    position: absolute;
    top: -6px;
    right: -8px;
}

/* Live Search Dropdown */
.live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    margin-top: 6px;
    z-index: 1000;
    overflow: hidden;
    display: none;
}
.search-drop-header {
    padding: 8px 14px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.search-drop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}
.search-drop-item:hover {
    background: #f8fafc;
}
.search-drop-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    background: #f1f5f9;
}
.search-drop-info {
    flex: 1;
}
.search-drop-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.search-drop-category {
    display: block;
    font-size: 11px;
    color: #64748b;
}
.search-drop-price {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.search-drop-all {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.search-drop-empty {
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* Animations */
@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(15px) scale(0.95); }
}

/* Rating Stars */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #f59e0b;
}
.star-rating .star-count {
    margin-left: 6px;
    color: #64748b;
    font-size: 12px;
}

/* Toast animations & spinners */
.spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
