:root {
    --primary-color: #34495e;
    /* Navy/Slate from logo */
    --accent-color: #3498db;
    /* Bright blue from logo */
    --text-color: #2c3e50;
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --border-color: #e1e8ed;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.5;
}

/* Top Utility Bar */
.top-bar {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
}

.top-bar-links a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    opacity: 0.9;
    transition: var(--transition);
}

.top-bar-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Header & Nav */
header.site-header {
    background: var(--white);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 5%;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo img {
    height: 60px;
    width: auto;
}

.search-container {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    padding-left: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-container input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.search-container i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: 600;
}

.action-item i {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.cart-icon-wrapper {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Category Nav */
.category-nav {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.category-nav li {
    position: relative;
}

.category-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 601;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    display: block;
    transition: var(--transition);
}

.category-nav a:hover {
    color: var(--accent-color);
}

/* Hero Section (Peptide Sciences Style) */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Catalog Grid */
.catalog-section {
    padding: 4rem 5%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure uniform height */
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.product-image {
    width: 100%;
    height: 260px;
    /* Slightly taller for premium feel */
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

/* Detail Page Image */
.detail-image-container {
    height: 450px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart Table Image */
.cart-item-img-container {
    width: 100px;
    height: 100px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-top: auto;
    margin-bottom: 1rem;
}

.stock-status {
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 1rem;
}

.status-in-stock {
    color: var(--success-color);
}

.status-in-stock::before {
    content: '●';
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.btn-add-cart {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(-- accent-color);
}

/* Side Cart Reveal */
#cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 2000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

#cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-bg);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Footer (Peptide Sciences Style) */
footer.site-footer {
    background: #1e293b;
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-main {
        flex-wrap: wrap;
    }

    .search-container {
        order: 3;
        max-width: 100%;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .category-nav {
        overflow-x: auto;
        justify-content: flex-start;
    }
}