/* ===================================
   Utility Classes & Polish
   Final Touches for Professional Look
   =================================== */

/* ===================================
   Loading Animations
   =================================== */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--white);
    margin-bottom: 20px;
}

/* ===================================
   Notification Toast
   =================================== */
.toast-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    max-width: 350px;
    background: var(--white);
    padding: 20px 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-left: 4px solid var(--gold-primary);
    z-index: 10000;
    transition: right 0.5s ease;
}

.toast-notification.show {
    right: 30px;
}

.toast-notification.success {
    border-left-color: #28a745;
}

.toast-notification.error {
    border-left-color: #dc3545;
}

.toast-notification.warning {
    border-left-color: #ffc107;
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.toast-title {
    font-weight: 700;
    color: var(--dark-primary);
    font-size: 1.1rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-message {
    color: var(--dark-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===================================
   Modal/Popup
   =================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--white);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gold-primary);
    color: var(--white);
}

/* ===================================
   Badges & Tags
   =================================== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.badge-primary {
    background: var(--gold-primary);
    color: var(--white);
}

.badge-success {
    background: #28a745;
    color: var(--white);
}

.badge-danger {
    background: #dc3545;
    color: var(--white);
}

.badge-warning {
    background: #ffc107;
    color: var(--dark-primary);
}

.badge-info {
    background: #17a2b8;
    color: var(--white);
}

/* ===================================
   Cards & Panels
   =================================== */
.card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    padding: 30px;
    margin-bottom: 30px;
}

.card-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gold-primary);
    padding-bottom: 15px;
}

.card-body {
    color: var(--dark-secondary);
    line-height: 1.8;
}

.panel {
    background: var(--light-gray);
    padding: 25px;
    border-left: 4px solid var(--gold-primary);
    margin-bottom: 25px;
}

/* ===================================
   Progress Bar
   =================================== */
.progress {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
    transition: width 0.5s ease;
}

/* ===================================
   Breadcrumb Enhanced
   =================================== */
.breadcrumb-enhanced {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.breadcrumb-enhanced a {
    color: var(--dark-primary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb-enhanced a:hover {
    color: var(--gold-primary);
}

.breadcrumb-enhanced i {
    color: var(--text-gray);
    font-size: 0.8rem;
}

/* ===================================
   Dividers
   =================================== */
.divider {
    height: 1px;
    background: #e0e0e0;
    margin: 40px 0;
}

.divider-gold {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.divider-thick {
    height: 3px;
    background: var(--gold-primary);
    max-width: 100px;
    margin: 30px auto;
}

/* ===================================
   Text Utilities
   =================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--gold-primary); }
.text-secondary { color: var(--dark-secondary); }
.text-muted { color: var(--text-gray); }
.text-white { color: var(--white); }

.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.font-weight-light { font-weight: 300; }
.font-weight-normal { font-weight: 400; }
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }

.font-serif { font-family: var(--font-heading); }
.font-sans { font-family: var(--font-body); }

/* ===================================
   Spacing Utilities
   =================================== */
.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; }
.mt-5 { margin-top: 3rem; }

.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; }
.mb-5 { margin-bottom: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

/* ===================================
   Display & Flex Utilities
   =================================== */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.align-stretch { align-items: stretch; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.gap-5 { gap: 3rem; }

/* ===================================
   Scroll to Top Button
   =================================== */
.scroll-to-top {
    position: fixed;
    bottom: -60px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.scroll-to-top.visible {
    bottom: 30px;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* ===================================
   Image Effects
   =================================== */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

.img-grayscale {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.img-grayscale:hover {
    filter: grayscale(0%);
}

/* ===================================
   Shadow Utilities
   =================================== */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.shadow-md {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.shadow-xl {
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.shadow-gold {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* ===================================
   Hover Effects
   =================================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.hover-gold {
    transition: color 0.3s ease;
}

.hover-gold:hover {
    color: var(--gold-primary);
}

.hover-bg-gold {
    transition: background-color 0.3s ease;
}

.hover-bg-gold:hover {
    background-color: var(--gold-primary);
    color: var(--white);
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ===================================
   Skeleton Loading
   =================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 15px;
}

.skeleton-image {
    height: 200px;
    width: 100%;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    .footer,
    .scroll-to-top,
    .toast-notification {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .product-card {
        page-break-inside: avoid;
    }
}
