.header-dropdown-content a {
    display: block;
    color: #eee;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
}
.header-dropdown-content a:hover {
    background: #333;
    color: #ffeb3b;
}
.header-menu-item:hover .header-dropdown-content {
    display: block !important;
}

/* ==========================================================================
   1. LAYOUT & CORE WRAPPERS
   ========================================================================== */

body.dashboard-body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f4;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 50px);
}

.app-header {
    height: 60px;
    background: #2d5a27;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-content {
    width: 100% !important;
    max-width: 95vw;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   HORIZONTAL TOP GARDEN DASHBOARD NAVIGATION
   ========================================================================== */
.garden-dashboard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0 35px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 800px;
    justify-content: center;
}

.garden-nav-pill {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.garden-nav-pill:hover {
    background: #2d5a27;
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================================================
   CLASS PHOTO ROSTER STYLES
   ========================================================================== */
#class-photo-container {
    padding: 30px;
    color: #333;
    width: 100%;
    box-sizing: border-box;
}

.class-photo-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 15px;
}

#close-class-photo-btn {
    background: #1e293b;
    border: 1px solid rgba(0,0,0,0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}
#close-class-photo-btn:hover { 
    background: #2d5a27; 
}

/* Uniform Roster Grid (5 Columns for both Plants & Pots) */
.class-photo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .class-photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 900px) {
    .class-photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 600px) {
    .class-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.class-card {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.class-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* Locked Image Containment */
.class-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid #2a2a2a;
}

.class-card-info {
    padding: 12px;
    text-align: center;
}
.class-card-common {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 2px;
}
.class-card-sci {
    display: block;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* ==========================================================================
   HIGH-RESOLUTION LIGHTBOX LAYOUT
   ========================================================================== */
#hero-expand-trigger {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 40;
    transition: color 0.15s ease, background 0.15s ease;
}
#hero-expand-trigger:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}
#lightbox-overlay.lightbox-visible {
    opacity: 1;
    pointer-events: auto;
}

#lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 2.5rem;
    color: #888;
    cursor: pointer;
    transition: color 0.1s;
    user-select: none;
    z-index: 2010;
}
#lightbox-close:hover { color: #fff; }

.lightbox-content-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 80%;
    max-height: 85vh;
}
#lightbox-title {
    margin: 0 0 4px 0;
    font-size: 1.6rem;
    color: #fff;
    text-align: center;
}
#lightbox-meta {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #aaa;
    text-align: center;
}
#lightbox-main-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.lightbox-arrow {
    padding: 40px 25px;
    font-size: 2.5rem;
    color: #555;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}
.lightbox-arrow:hover { color: #fff; }

/* ==========================================================================
   2. HERO BLOCK (Fixed Stretching)
   ========================================================================== */
.profile-card {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.species-hero {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    transition: background-image 0.4s ease-in-out;
}

#hero-measure {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    visibility: hidden;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px 25px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: white;
    z-index: 20;
    box-sizing: border-box;
}

.common-name {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    display: inline-block;
    vertical-align: middle;
}

.scientific-name {
    font-size: 1.1rem;
    margin: 5px 0 10px 0;
    color: #e2e8f0 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-star-large {
    position: relative;
    top: auto;
    left: auto;
    font-size: 2.2rem;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    z-index: 50;
    margin-right: 12px;
    display: inline-block;
    vertical-align: middle;
}

.hero-date {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: #ffeb3b !important;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    z-index: 50;
    text-align: right;
    max-width: 250px;
    word-wrap: break-word;
    line-height: 1.4;
}

.hero-comment-subtext {
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: normal;
    display: inline-block;
    margin-top: 4px;
}

/* ==========================================================================
   3. GALLERY (Squared & Proportional)
   ========================================================================== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 20px;
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #eee;
}

.thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}
.thumb-wrapper img:hover {
    transform: scale(1.05);
}

.thumb-date-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    padding: 4px 0;
    text-align: center;
    z-index: 5;
}

.hero-star {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 0 3px black;
    cursor: pointer;
    z-index: 10;
}
.star-filled { color: #ffeb3b; }
.star-empty { color: rgba(255, 255, 255, 0.7); }

.thumb-wrapper.is-deleted-thumb img {
    opacity: 0.4;
    filter: grayscale(80%) sepia(30%) hue-rotate(320deg);
}
.gallery-delete-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(139, 0, 0, 0.85);
    color: #ffffff;
    font-size: 0.9rem;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.15);
}

.thumb-wrapper.is-archived-thumb img {
    opacity: 0.55;
    filter: grayscale(30%);
}
.gallery-archive-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #f59e0b;
    font-size: 0.9rem;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ==========================================================================
   4. UTILS & MODALS
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.75);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.modal-content {
    background: #222;
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 95%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.price-badge {
    display: none !important;
}

.nav-carat {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
    border: none;
    width: 46px;
    height: 46px;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 30 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.nav-carat:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}
.prev-carat { left: 15px; }
.next-carat { right: 15px; }

@media (max-width: 768px) {
    .main-content {
        padding: 20px 10px !important;
    }
}

/* ==========================================================================
   INTERACTIVE BREADCRUMB & DASHBOARD DROPDOWNS
   ========================================================================== */
.profile-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.breadcrumb-wrapper {
    position: relative;
    display: inline-block;
}

.breadcrumb-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 6px 0;
    min-width: 160px;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.breadcrumb-wrapper:hover .breadcrumb-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover {
    background: #2d5a27;
    color: #fff;
}
