:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #c6362e;
    --link-color: #006da2;
    --background-color: #ecf0f1;
    --text-color: #333;
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 5px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo{
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}
.logo img {
    border-radius: 5px;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Highlight current menu item based on controller */
.controller-home #menu-home,
.controller-gallery #menu-gallery,
.controller-cart #menu-cart,
.controller-admin #menu-admin {
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #fff 0%, #f5f7fa 100%);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

a {
    color:var(--link-color);
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
}
.btn-admin {
    background-color: #ccc;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.sketch-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
    .sketch-card:hover .sketch-img {
        transform: scale(1.2);
    }
.sketch-card a{
    display:block;
    overflow:hidden;
}
.sketch-img {
    width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s;
}

.sketch-info {
    padding: 15px;
}

.sketch-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sketch-folder {
    font-size: 0.9rem;
    color: #888;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn,
.tag-cloud-all.tag-cloud-item {
    padding: 8px 15px;
    background: #fff;
    color:#000;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
}

/* Tag Cloud Styles */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: baseline;
    justify-content: center;
}

.tag-cloud-item {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 2px 15px 4px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.tag-cloud-item:hover {
    color: var(--accent-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.tag-cloud-all {
    background-color: var(--primary-color);
    color: #fff;
}

.tag-cloud-item.active {
    color: #fff;
    background-color: var(--accent-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.search-bar {
    margin-bottom: 20px;
    padding: 10px;
    background-color:var(--primary-color);
    border-radius:10px;
    max-width:570px;
    margin-left:auto;
}
    .search-bar form {
        display: flex;
        gap: 10px;
    }
    .search-bar input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
.selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.cart-badge {
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-left: 5px;
}

/* Tag toggle admin feature */
.not-tagged {
    opacity: 0.4;
}

.admin-tag-toggle {
    margin-left: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-tag-toggle select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.admin-tag-toggle.active .btn {
    background-color: var(--primary-color);
}

footer a {
    color:inherit;
    text-decoration:none;
}
footer a:hover {
    text-decoration: underline;
}

.sketch-img.landscape {
    margin-top: 35%;
    margin-bottom: 35%;
    transform: scale(1.5);
}

.img-thumb {
    object-fit: cover;
    overflow: clip;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin:0;
    transform-origin: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.15s ease;
}
    .img-thumb.big {
        position: absolute;
        z-index: 10;
        box-shadow: var(--shadow);
        transform: scale(1.5);
    }
.a-full {
    width: 100%;
    height: 100%;
    display: block;
    text-decoration:none;
}
.a-full:hover {
    text-decoration:underline;
}
    .a-full small {
        color:#a7a7a7;
    }


.controller-admin.action-index table tr {
    position: relative;
    border-bottom: 1px solid #eee;
}
.controller-admin.action-index table td {
    padding: 12px;
}
.btn-visible {
    padding: 5px 10px;
    font-size: 0.8rem;
    background: #27ae60;
}
.btn-vhidden {
    padding: 5px 10px;
    font-size: 0.8rem;
    background: #e74c3c;
}
/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    height: 3px;
    width: 25px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.4s;
    border-radius:2px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        background-color: var(--card-bg);
        flex-direction: column;
        box-shadow: var(--shadow);
        padding: 20px 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        display: block;
        margin: 10px 0;
        margin-left: 0; /* Override existing margin */
    }
    
    .nav-links div {
        margin-left: 0 !important;
        margin-top: 10px;
        display: block !important;
    }
}