/* RK Jwellers Custom Styles */

:root {
    --primary-gold: #D4AF37;
    --dark-elegant: #1a1a1a;
    --pure-white: #ffffff;
    --silver-accent: #C0C0C0;
    --light-gray: #f8f9fa;
    --text-dark: #333333;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
}

/* Typography */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-gray);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--dark-elegant);
}

/* Navigation */
.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: var(--pure-white) !important;
}

.navbar-dark .navbar-brand:hover,
.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--primary-gold) !important;
}

.navbar-dark .navbar-toggler {
    border-color: var(--pure-white);
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Main Content */
.main-content {
    margin-top: 0;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(44, 44, 44, 0.8) 100%), 
                url('https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--pure-white);
    padding: 40px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23D4AF37" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23D4AF37" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23D4AF37" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23D4AF37" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23D4AF37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--pure-white) !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--pure-white) !important;
    opacity: 0.9;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--pure-white) !important;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Brand Colors */
.text-gold {
    color: var(--primary-gold) !important;
}

.bg-gold {
    background-color: var(--primary-gold) !important;
}

.btn-gold {
    background: linear-gradient(45deg, var(--primary-gold), #F4D03F);
    border: none;
    color: var(--dark-elegant);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: var(--dark-elegant);
}

.btn-outline-gold {
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    background: transparent;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background: var(--primary-gold);
    color: var(--dark-elegant);
    transform: translateY(-2px);
}

/* Category Filter Buttons */
.category-filter {
    margin: 30px 0 20px;
}

.category-btn {
    margin: 5px;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn.active {
    background: linear-gradient(45deg, var(--primary-gold), #F4D03F);
    color: var(--dark-elegant);
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.category-btn:not(.active) {
    background: var(--pure-white);
    color: var(--text-dark);
    border-color: #ddd;
    box-shadow: var(--shadow-light);
}

.category-btn:not(.active):hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--dark-elegant);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Search Bar */
.search-container {
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
}

.search-input {
    border: 2px solid #ddd;
    border-radius: 50px;
    padding: 15px 50px 15px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-gold);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--dark-elegant);
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #F4D03F;
    transform: translateY(-50%) scale(1.1);
}

/* View Toggle */
.view-toggle {
    margin-bottom: 20px;
    text-align: center;
}

.view-btn {
    margin: 0 5px;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-gold);
    background: transparent;
    color: var(--primary-gold);
}

.view-btn:hover {
    background: var(--primary-gold);
    color: var(--dark-elegant);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.view-btn.active {
    background: var(--primary-gold);
    color: var(--dark-elegant);
    box-shadow: var(--shadow-light);
}

/* Jewelry Cards */
.jewelry-card {
    background: var(--pure-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.4s ease;
    margin-bottom: 30px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
}

.jewelry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.jewelry-card:hover::before {
    opacity: 1;
}

.jewelry-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-gold);
}

.jewelry-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 2;
}

.jewelry-card:hover .card-img-top {
    transform: scale(1.08);
}

.jewelry-card .card-body {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.jewelry-card .card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-elegant);
    line-height: 1.3;
}

.jewelry-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.jewelry-info strong {
    color: var(--primary-gold);
    font-weight: 600;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-gold {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
}

.category-silver {
    background: rgba(192, 192, 192, 0.1);
    color: var(--silver-accent);
}

.category-diamond {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
}

/* Table View */
.jewelry-table {
    background: var(--pure-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.jewelry-table .table {
    margin-bottom: 0;
}

.jewelry-table .table th {
    background: var(--primary-gold);
    color: var(--dark-elegant);
    font-weight: 600;
    border: none;
    padding: 15px;
}

.jewelry-table .table td {
    padding: 15px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.jewelry-table .table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.05);
}

.media-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.video-thumbnail-container {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail-container .media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.video-thumbnail-container:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.video-play-overlay i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Admin Media Thumbnails */
.admin-media-thumbnail {
    max-width: 250px !important;
    width: 250px !important;
    height: 150px !important;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.admin-media-thumbnail {
    max-width: 250px;
}

.admin-video-thumbnail-container {
    position: relative;
    display: inline-block;
    max-width: 250px !important;
    width: 250px !important;
    height: 150px !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.admin-video-thumbnail-container .admin-media-thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Admin Panel Styles */
.admin-container {
    background: linear-gradient(135deg, var(--light-gray) 0%, #f0f0f0 100%);
    min-height: calc(100vh - 76px);
    padding: 30px 0;
}

.admin-card {
    background: var(--pure-white);
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
}

.admin-header {
    background: linear-gradient(135deg, var(--primary-gold), #F4D03F);
    color: var(--dark-elegant);
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    margin: -1px -1px 0 -1px;
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="adminGrain" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23adminGrain)"/></svg>');
    opacity: 0.3;
}

.admin-body {
    padding: 35px;
    position: relative;
    z-index: 2;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-elegant);
    margin-bottom: 8px;
}

/* Ensure proper text contrast */
.text-muted {
    color: #6c757d !important;
}

.table th {
    color: var(--dark-elegant) !important;
}

.table td {
    color: var(--text-dark) !important;
}

/* Modal text contrast */
.modal-body {
    color: var(--text-dark);
}

.modal-title {
    color: var(--dark-elegant);
}

/* Login Form */
.login-container {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-elegant) 0%, #2c2c2c 100%);
}

.login-card {
    background: var(--pure-white);
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-gold), #F4D03F);
    color: var(--dark-elegant);
    padding: 30px;
    text-align: center;
}

.login-body {
    padding: 40px 30px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

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

/* Footer */
.footer {
    background: var(--dark-elegant);
    color: var(--pure-white);
    padding: 30px 0 20px;
    margin-top: 40px;
}

.footer h5 {
    color: var(--primary-gold);
    margin-bottom: 20px;
}

.footer a {
    color: var(--silver-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer a.text-decoration-none {
    color: var(--primary-gold);
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer a.text-decoration-none:hover {
    color: #F4D03F;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .jewelry-card .card-img-top {
        height: 200px;
    }
    
    .admin-body {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .category-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .jewelry-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-gold);
    animation: spin 1s ease-in-out infinite;
}

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