:root {
    --primary-color: #e63946;
    --primary-hover: #c92a37;
    --text-on-primary: #ffffff;
    --bg-light: #f8f9fa;
    --font-display: 'Yrsa', serif;
    --font-body: 'Lato', sans-serif;
}

/* Color Schemes */
[data-theme="red-white"] {
    --primary-color: #e63946;
    --primary-hover: #d62828;
    --bg-light: #f1faee;
}

[data-theme="blue-white"] {
    --primary-color: #0077b6;
    --primary-hover: #023e8a;
    --bg-light: #caf0f8;
}

[data-theme="black-white"] {
    --primary-color: #212529;
    --primary-hover: #000000;
    --bg-light: #f8f9fa;
}

[data-theme="red-black"] {
    --primary-color: #d00000;
    --primary-hover: #9d0208;
    --bg-light: #e5e5e5;
}

[data-theme="green-white"] {
    --primary-color: #2a9d8f;
    --primary-hover: #264653;
    --bg-light: #e9c46a; /* subtle contrast */
}

[data-theme="yellow-black"] {
    --primary-color: #ffb703;
    --primary-hover: #fb8500;
    --text-on-primary: #000000;
    --bg-light: #000000;
}

[data-theme="red-blue"] {
    --primary-color: #e63946;
    --bg-light: #1d3557;
    --text-body: #f1faee;
}

[data-theme="sky-blue-white"] {
    --primary-color: #8ecae6;
    --primary-hover: #219ebc;
    --text-on-primary: #023047;
    --bg-light: #f1faee;
}

[data-theme="claret-blue"] {
    --primary-color: #7b2cbf;
    --primary-hover: #5a189a;
    --bg-light: #e0aaff;
}

[data-theme="yellow-blue"] {
    --primary-color: #ffd60a;
    --primary-hover: #ffc300;
    --text-on-primary: #001d3d;
    --bg-light: #003566;
    --text-body: #ffffff;
}


body {
    font-family: var(--font-body);
    color: #333;
    background-color: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dynamic text color support for dark backgrounds */
[data-theme="red-blue"] body, 
[data-theme="yellow-black"] body,
[data-theme="yellow-blue"] body {
    color: #f8f9fa;
}

[data-theme="red-blue"] .text-muted, 
[data-theme="yellow-black"] .text-muted,
[data-theme="yellow-blue"] .text-muted {
    color: #adb5bd !important;
}

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

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: var(--font-display);
}

/* Bootstrap Overrides */
.text-primary {
    color: var(--primary-color) !important;
}

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary.active,
.btn-outline-primary:active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

/* Hero Section */
.hero-section {
    background: url('https://images.unsplash.com/photo-1517433670267-08bbd4be890f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
    height: 80vh;
    min-height: 500px;
    position: relative;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Darken image */
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
}

.card-img-top-wrapper {
    height: 250px;
    overflow: hidden;
}

.card-img-top {
    height: 250px; /* Force consistent height for gallery images */
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 100px;
    right: 0;
    z-index: 1050;
}

#theme-toggle-btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
}

.theme-panel {
    position: absolute;
    right: 100%;
    top: 0;
    width: 200px;
    background: white;
    padding: 15px;
    border-radius: 5px 0 0 5px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
}

.theme-panel.active {
    display: block;
}

.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

.pagination .page-link:hover {
    color: var(--primary-hover);
}

/* Footer */
footer a:hover {
    color: white !important;
    text-decoration: underline !important;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
}

/* Cart Styles */
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
