:root {
    --gold-color: #D4AF37;
    --gold-bg: #F4E4BC;
    --silver-color: #C0C0C0;
    --primary-color: #2C3E50;
    --secondary-color: #34495E;
    --success-color: #27AE60;
    --danger-color: #E74C3C;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 0; /* Default no padding */
}

/* Admin pages using layout.html should have no top padding */
body.admin-page {
    padding-top: 0;
}

/* For pages using sticky header (like product pages) */
body.sticky-header-page {
    padding-top: 300px; /* Space for sticky header with breadcrumb */
}

body.sticky-header-page.no-breadcrumb {
    padding-top: 250px; /* Reduced padding when no breadcrumb section */
}

/* Sticky Header Container */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Logo Section */
.logo-section {
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 1001;
    background: white;
}

.navbar {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    position: relative;
    z-index: 1001;
    background: white;
}

.logo {
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Navigation Styles */
.navbar-light .navbar-nav .nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--gold-color);
}

/* Price Ticker Styles */
.bg-gold {
    background-color: var(--gold-bg) !important;
}

.price-ticker {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    font-size: 0.85rem;
    padding: 4px 0;
    position: relative;
    z-index: 1001;
}

.price-ticker-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    min-height: 40px;
}

.prices-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.price-line {
    display: inline;
    white-space: nowrap;
}

.separator {
    color: #6c757d;
}

.info-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 0.75rem;
}

.timestamp-line {
    font-weight: 500;
    color: #333;
}

.disclaimer-line {
    color: #6c757d;
    font-style: italic;
}

/* Breadcrumb styling within header */
.breadcrumb-section {
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-weight: bold;
}

.breadcrumb-section .breadcrumb-item a {
    color: #007bff;
    transition: color 0.2s;
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline !important;
}

.breadcrumb-section .breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

/* Pages with breadcrumbs already have proper padding from body */

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 270px; /* Mobile header with breadcrumb */
    }
    
    body.no-breadcrumb {
        padding-top: 220px; /* Reduced mobile padding when no breadcrumb section */
    }
    
    .breadcrumb-section .breadcrumb-item {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .price-ticker {
        background: #ffffff !important;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .price-ticker-layout {
        flex-direction: column;
        gap: 3px;
        padding: 2px 0;
        min-height: auto;
    }
    
    .prices-section {
        flex-direction: column;
        gap: 2px;
        width: 100%;
        align-items: stretch;
    }
    
    .price-line {
        display: block;
        text-align: center;
        padding: 3px 6px;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        user-select: none;
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    .price-line:hover {
        background: #f8f9fa;
        border-color: #d4af37;
    }
    
    .price-line:active {
        background: #f0f0f0;
        transform: scale(0.98);
    }
    
    .separator {
        display: none;
    }
    
    .info-section {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100%;
        gap: 12px;
        font-size: 0.6rem;
        margin-top: 2px;
        padding: 0 4px;
    }
    
    .mobile-toggle-hint {
        display: flex;
        flex-direction: column;
        font-size: 0.55rem;
        color: #6c757d;
        font-style: italic;
        line-height: 1.1;
        text-align: left;
        flex: 1;
        min-width: 0;
    }
    
    .mobile-info-right {
        display: flex;
        flex-direction: column;
        text-align: right;
        gap: 1px;
        flex: 1;
        min-width: 0;
        align-items: flex-end;
    }
    
    .timestamp-line {
        font-size: 0.6rem;
        margin-bottom: 0;
        color: #333;
        font-weight: 500;
        white-space: nowrap;
    }
    
    .disclaimer-line {
        font-size: 0.55rem;
        line-height: 1.1;
        color: #6c757d;
        white-space: nowrap;
    }
    
    .mobile-unit-indicator {
        color: #6c757d;
        font-weight: normal;
        font-size: 0.65rem;
    }
    
    .desktop-only {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-toggle-hint {
        display: none;
    }
    
    .mobile-unit-indicator {
        display: none;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .desktop-only {
        display: inline !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: inline !important;
    }
}

.price-ticker .small {
    font-size: 0.75rem;
}

/* Footer Styles */
.footer-dark {
    background-color: #1a1a1a;
    color: #d4af37;
    border-top: 1px solid #333;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-dark .row {
        text-align: center;
    }
    
    .footer-dark .col-md-6 {
        text-align: center !important;
        margin-bottom: 10px;
    }
    
    .footer-dark .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .footer-dark .social-links {
        justify-content: center;
        align-items: center;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .footer-dark .follow-text {
        display: block;
        margin-bottom: 8px;
        margin-right: 0 !important;
        width: 100%;
        text-align: center;
    }
    
    .footer-dark .social-link {
        margin: 0 8px;
    }
}

/* Admin Link - Hidden in footer */
.admin-link {
    color: #2c3e50 !important;
    text-decoration: none;
    font-size: 0.8rem;
    margin-left: 5px;
    opacity: 0;
}

.admin-link:hover {
    color: #2c3e50 !important;
    text-decoration: none;
    opacity: 0;
}

.footer-text {
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-disclaimer {
    color: #888;
    font-size: 0.75rem;
}

.follow-text {
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 500;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: #d4af37;
    color: #1a1a1a;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #b8941f;
    color: #000;
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.price-item {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 2px 5px;
    border-radius: 3px;
}

.price-item:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.metal-name {
    font-weight: bold;
    margin-right: 10px;
}

.gold-price .metal-name {
    color: var(--gold-color);
}

.silver-price .metal-name {
    color: var(--silver-color);
}

.price {
    font-weight: bold;
    margin-right: 8px;
}

.change.positive {
    color: var(--success-color);
}

.change.negative {
    color: var(--danger-color);
}

/* Mobile price display states */
@media (max-width: 768px) {
    .mobile-gram-mode .oz-price {
        display: none !important;
    }
    
    .mobile-gram-mode .gram-price-mobile {
        display: inline !important;
    }
    
    .mobile-gram-mode .gram-price-desktop {
        display: none !important;
    }
    
    .mobile-oz-mode .gram-price-mobile {
        display: none !important;
    }
    
    .mobile-oz-mode .gram-price-desktop {
        display: none !important;
    }
    
    .mobile-oz-mode .oz-price {
        display: inline !important;
    }
}

@media (min-width: 769px) {
    .oz-price, .gram-price-desktop {
        display: inline !important;
    }
    
    .gram-price-mobile {
        display: none !important;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    color: var(--primary-color);
}

.hero-section .lead {
    color: var(--secondary-color);
}

/* About Section */
.about-section h2 {
    color: var(--primary-color);
}

.about-section p {
    color: var(--secondary-color);
    font-size: 1.05em;
}

/* Products Section */
.products-section h2 {
    color: var(--primary-color);
}

/* Featured Products Section - Clean Bootstrap Approach */
.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 8px;
}

.product-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.product-category {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.product-specs {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    flex: 1;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 0.75rem;
    text-align: center;
}
    border-color: var(--gold-color);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-category {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-specs {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 12px;
    flex: 1;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 15px;
    text-align: center;
}

.product-card .btn {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: #000;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.product-card .btn:hover {
    background-color: #b8941f;
    border-color: #b8941f;
    color: #000;
    transform: translateY(-1px);
}

.product-category {
    color: var(--gold-color);
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.product-specs {
    color: var(--secondary-color);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--success-color);
    margin-bottom: 15px;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-3px);
}

.feature-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--secondary-color);
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.cta-section h2 {
    margin-bottom: 20px;
}

/* Store Page Styles */
.store-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.store-header h1 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0;
}

/* Store Product Cards */
.product-card-store {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 580px;
    display: flex;
    flex-direction: column;
}

.product-card-store:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.promo-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.stock-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.stock-status.in-stock {
    background: #28a745;
    color: white;
}

.stock-status.low-stock {
    background: #ffc107;
    color: #212529;
}

.stock-status.out-of-stock {
    background: #6c757d;
    color: white;
}

.product-image-store {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border-bottom: 1px solid #f1f3f4;
    background: #f8f9fa;
}

.product-image-store[src=""], .product-image-store:not([src]) {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.875rem;
}

.product-image-store[src=""]:before, .product-image-store:not([src]):before {
    content: "No Image Available";
}

.product-body-store {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-metal {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-metal.gold {
    color: var(--gold-color);
}

.product-metal.silver {
    color: var(--silver-color);
}

.product-title-store {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 3.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-specs-store {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.product-condition {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.product-price-store {
    font-size: 1.25rem;
    font-weight: 700;
    color: #198754;
    margin-bottom: 4px;
}

.product-price-per-gram {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 16px;
}

.btn-view-product {
    background: #007bff;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    padding: 8px 16px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-view-product:hover {
    background: #0056b3;
    color: white;
}

.product-stock-info {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 12px;
    font-weight: 500;
}

.buyback-section {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid var(--gold-color);
}

.buyback-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.buyback-rate {
    font-size: 0.875rem;
    font-weight: 600;
    color: #198754;
    margin-bottom: 2px;
}

.buyback-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #198754;
    margin-bottom: 4px;
}

.buyback-note {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 2px;
}

/* Loading and No Results */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.spinner-border-custom {
    color: var(--gold-color);
    width: 3rem;
    height: 3rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.no-results h4 {
    color: #495057;
    margin-bottom: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-ticker .row {
        flex-direction: column;
    }
    
    .price-item {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .hero-section {
        text-align: center;
        padding: 60px 0;
    }
    
    .hero-section .col-lg-6:first-child {
        margin-bottom: 30px;
    }
    
    .about-section .col-lg-6:first-child {
        margin-bottom: 30px;
    }
    
    .cta-section .col-auto {
        margin-bottom: 10px;
    }
    
    .product-image-store {
        height: 220px;
    }
    
    .product-body-store {
        padding: 12px;
    }
    
    .product-title-store {
        font-size: 1rem;
    }
    
    .product-price-store {
        font-size: 1.1rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Button styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success {
    font-weight: 600;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5em;
    color: var(--gold-color) !important;
}

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

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    opacity: 0.5;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float:hover {
    opacity: 1;
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

.whatsapp-float i {
    margin-top: 16px;
}
