/* ===================================
   Focus Panel Styles
   Glass greenhouse aesthetic with elegant data visualization
   =================================== */

/* Main focus panel container */
.focus-panel {
    position: fixed;
    left: -900px; /* Start completely off-screen to prevent blocking mouse events (800px + margin) */
    top: 100px; /* Align with layer controls accounting for border radius */
    bottom: 100px; /* Mirror top alignment */
    width: 800px; /* Updated default width to match new panel design */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Dynamic sizing variables */
    --plant-panel-width: 800px; /* 2 plants: 2×360px + 20px gap + 2×20px padding */
    --metrics-panel-width: 800px; /* Match plant panel width for consistency */
    background: rgba(255, 255, 255, 0.03); /* Very light, almost transparent white */
    backdrop-filter: blur(20px) saturate(1.2) brightness(1.1);
    -webkit-backdrop-filter: blur(20px) saturate(1.2) brightness(1.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px; /* Full radius on all corners */
    box-shadow:
        -8px 0 32px rgba(255, 255, 255, 0.1),
        -4px 0 16px rgba(255, 255, 255, 0.05),
        inset 0 0 80px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    opacity: 0;
    z-index: 1001; /* Above SuperSplat container (1000) and layer controls (1000) */
    pointer-events: none; /* Prevent blocking mouse events when invisible/off-screen */

    /* Flex container for proper content sizing */
    display: flex;
    flex-direction: column;

    /* Soft diffuse light effect */
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(255, 255, 255, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 40% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
}

/* Default state - hidden off-screen */
.focus-panel:not(.visible):not(.animating-in):not(.animating-out) {
    transform: translateX(calc(100% + 0px));
    transition: none;
}

/* Visible state - for programmatic animation */
.focus-panel.visible {
    opacity: 1 !important;
    pointer-events: auto; /* Re-enable mouse events when panel is visible */
}

.focus-panel.visible:not(.animating-in):not(.animating-out) {
    transform: translateX(0);
}

/* Animation states controlled by JavaScript */
.focus-panel.animating-in,
.focus-panel.animating-out {
    opacity: 1;
}

/* Connection line from selected PA to focus panel */
.connection-line {
    position: fixed;
    height: 2px;
    background: white;
    opacity: 0;
    z-index: 1003; /* Higher than focus panel (1001) and SuperSplat container (1000) */
    pointer-events: none;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5); /* Add glow for visibility */
}

/* Legacy animation support */
.connection-line:not(.animated) {
    transition: opacity 0.5s ease, width 0.5s ease;
}

.connection-line.visible {
    opacity: 1; /* Full opacity */
}

/* Animated connection line controlled by JavaScript */
.connection-line.animated {
    opacity: 1;
}

/* Visual connection indicator */
.focus-connection-indicator {
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 60px;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    border-left: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 0;
}

/* Panel header */
.focus-panel-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(7, 43, 46, 0.3); /* Slight tint for header */
    flex-shrink: 0; /* Prevent header from shrinking */
}

.panel-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pa-name {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px; /* Reduced font size */
    font-weight: 600;
    margin: 0;
    font-family: 'Oxygen', sans-serif;
    letter-spacing: 1px; /* Better readability for ALL CAPS */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pa-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 400;
    margin: 4px 0 0 0;
    font-family: 'Oxygen', sans-serif;
    font-style: italic;
}

.page-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.page-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    opacity: 1;
}

.page-button.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    opacity: 1;
    cursor: default;
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.page-button.active:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.25);
}

.close-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Panel content */
.focus-panel-content {
    padding: 10px 20px 20px 20px; /* Consistent padding with extra bottom space */
    overflow-y: auto;
    flex: 1; /* Take remaining space in flex container */
    overflow-x: hidden; /* Prevent horizontal scroll */
    min-height: 0; /* Allow flex shrinking */
}

/* Dynamic width classes */
.focus-panel.plant-mode {
    width: var(--plant-panel-width) !important;
}

.focus-panel.metrics-mode {
    width: var(--metrics-panel-width) !important;
}

/* Unified scrollbar styling for panel content */
.focus-panel-content::-webkit-scrollbar {
    width: 6px;
}

.focus-panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.focus-panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.focus-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide scrollbar for plant filters - terrain style */
.plant-filters-panel::-webkit-scrollbar,
.plant-filters-panel .plant-filters-body::-webkit-scrollbar {
    display: none;
}

.plant-filters-panel {
    scrollbar-width: none;
}

.plant-filters-panel .plant-filters-body {
    scrollbar-width: none;
}

/* Metric row styling - 2-column layout */
.metric-row {
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
    width: 360px; /* Match plant tile width */
    display: inline-block;
    vertical-align: top;
    margin-right: 20px; /* Gap between columns */
}

/* 2-column grid container for metrics */
.focus-panel.metrics-mode .focus-panel-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    padding: 20px; /* Match terrain padding */
}

/* Remove right margin from second column items */
.focus-panel.metrics-mode .metric-row:nth-child(even) {
    margin-right: 0;
}

/* Plant mode - use direct scrolling like metrics mode */
.focus-panel.plant-mode .focus-panel-content {
    display: flex;
    flex-direction: column;
    padding: 0; /* No padding needed - plant-grid handles all spacing */
}

.focus-panel.plant-mode .metric-row {
    width: 100%;
    margin-right: 0;
    display: block;
}

.metric-row:nth-child(1) { animation-delay: 0.05s; }
.metric-row:nth-child(2) { animation-delay: 0.1s; }
.metric-row:nth-child(3) { animation-delay: 0.15s; }
.metric-row:nth-child(4) { animation-delay: 0.2s; }
.metric-row:nth-child(5) { animation-delay: 0.25s; }
.metric-row:nth-child(6) { animation-delay: 0.3s; }
.metric-row:nth-child(7) { animation-delay: 0.35s; }
.metric-row:nth-child(8) { animation-delay: 0.4s; }
.metric-row:nth-child(9) { animation-delay: 0.45s; }
.metric-row:nth-child(10) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Metric container with integrated header */
.metric-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 8px;
    width: 100%; /* Ensure container fills metric-row */
    box-sizing: border-box;
}

.metric-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
}

/* Metric header */
.metric-header {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    margin-bottom: 9px; /* Added 5px more space */
    flex-shrink: 0;
    gap: 12px; /* Space between name and interpretation */
}

.metric-name {
    color: white;
    font-size: 20px; /* Increased by 25% from 16px */
    font-weight: 500;
    font-family: 'Oxygen', sans-serif;
}

.metric-interpretation {
    font-size: 20px; /* Match metric name size */
    font-weight: 300; /* 200 points lighter */
    font-style: italic;
    font-family: 'Oxygen', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-left: auto; /* Push to right */
}

/* Interpretation text will use inline Viridis colors */

/* Chart container - maintain height for 2-column layout */
.metric-chart {
    position: relative;
    height: 100px; /* Match canvas height exactly */
    margin: 0;
    padding: 0; /* Remove padding - canvas handles its own padding */
    overflow: visible; /* Ensure dots and labels are not clipped */
    width: 100%; /* Ensure chart fills available width */
}

/* Chart wrapper for proper positioning */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 100px; /* Explicit height matching canvas */
    display: block;
}

/* Value indicator line */
.metric-value-line {
    position: absolute;
    width: 1px;
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.8;
    pointer-events: none;
}

/* Value label */
.metric-value-label {
    position: absolute;
    top: -14px; /* Increased spacing from dot */
    transform: translateX(-50%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Oxygen', sans-serif;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 3;
    min-width: 35px; /* Ensure label doesn't get cut off */
    text-align: center;
}

/* Y-axis labels */
.y-axis-label {
    position: absolute;
    left: -5px;
    top: 15px; /* Adjusted to better position */
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px; /* Slightly larger */
    font-style: italic;
    font-family: 'Oxygen', sans-serif;
    text-align: center;
    width: 35px;
}

.y-axis-max {
    position: absolute;
    left: 5px;
    top: 25px; /* Match canvas paddingTop */
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-family: 'Oxygen', sans-serif;
    text-align: right;
    width: 25px;
}

.y-axis-zero {
    position: absolute;
    left: 5px;
    bottom: 20px; /* Match canvas paddingBottom */
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-family: 'Oxygen', sans-serif;
    text-align: right;
    width: 25px;
}

.gaussian-canvas {
    width: 100%;
    height: 100px; /* Reduced from 120px */
    display: block;
    image-rendering: crisp-edges; /* Prevent blurring */
}

/* Metric dot */
.metric-dot {
    position: absolute;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 10px rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    z-index: 3;
    pointer-events: none;
    opacity: 0.8; /* 80% opacity to show Gaussian behind */
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 10px rgba(255, 255, 255, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(255, 255, 255, 0.8),
            0 0 15px rgba(255, 255, 255, 0.6),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
}


/* Metric details - redesigned layout */
.metric-details {
    margin-top: 4px; /* Further reduced to minimize gap */
    padding: 0 35px; /* Match canvas internal padding for alignment */
    text-align: left;
    flex-shrink: 0; /* Prevent shrinking */
}

.metric-value {
    display: none; /* Hide the range value */
}

.metric-range {
    display: none; /* Hide the range text */
}

.metric-definition {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px; /* Slightly larger */
    font-style: italic;
    font-family: 'Oxygen', sans-serif;
    line-height: 1.4;
    text-align: left;
    display: block;
    width: 100%;
}

.metric-range {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: 'Oxygen', sans-serif;
    display: block;
    margin-top: 2px;
}

/* Axis styling */
.axis-container {
    position: absolute;
    bottom: 0;
    left: 5px;
    right: 5px;
    height: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.axis-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    font-style: italic;
    font-weight: 300;
    font-family: 'Oxygen', sans-serif;
}

.axis-tick {
    width: 1px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
}

/* Loading state */
.focus-panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Mobile responsiveness */
@media screen and (max-width: 767px) {
    .focus-panel {
        width: calc(100vw - 20px);
        left: 10px;
        right: auto;
        top: auto;
        bottom: 10px;
        max-height: 60vh;
        transform: translateY(calc(100% + 20px));
    }
    
    .focus-panel.visible {
        transform: translateY(0);
    }
    
    .metric-interpretation {
        font-size: 14px;
    }
    
    .metric-name {
        font-size: 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .focus-panel {
        border: 2px solid white;
    }
    
    .metric-dot {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .focus-panel {
        transition: opacity 0.2s ease;
    }
    
    .metric-row {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .metric-dot {
        animation: none;
    }
}

/* Print styles */
@media print {
    .focus-panel {
        position: static;
        width: 100%;
        max-height: none;
        background: white;
        color: black;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .metric-name,
    .metric-interpretation,
    .metric-value {
        color: black;
    }
    
    .close-button {
        display: none;
    }
}

/* Plant recommendations page styling */
.plant-recommendations-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.recommendations-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 20px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.recommendations-placeholder h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 16px 0;
    font-family: 'Oxygen', sans-serif;
}

.recommendations-placeholder p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    font-family: 'Oxygen', sans-serif;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.coming-soon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    display: inline-block;
}

/* Refine plant section */
.refine-plant-section {
    margin-top: 12px;
    text-align: center;
}

/* Terrain-style action button */
.action-button {
    background: linear-gradient(135deg, #072b2e 0%, #01213d 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    width: 250px; /* Match terrain app exactly */
    border-radius: 25px;
    cursor: pointer !important;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 16px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1002;
}

.action-button i {
    font-size: 18px;
}

.action-button:hover {
    background-color: #01213d;
}

.action-button span {
    font-weight: 400;
}

/* Plant grid container - no scrolling, parent handles it */
.plant-grid-container {
    width: 100%;
    height: auto;
    padding: 0;
    flex: 1;
    /* No overflow or scrollbar - parent .focus-panel-content handles scrolling */
}

.plant-grid {
    display: grid;
    grid-template-columns: 360px 360px; /* Exact terrain sizing */
    gap: 20px; /* Match terrain gap */
    padding: 20px; /* Match terrain padding */
    box-sizing: border-box;
    justify-content: center; /* Center the grid */
    max-width: 100%;
}

/* Individual plant item - exact terrain design */
.plant-item {
    position: relative;
    width: 360px; /* Exact terrain size */
    height: 360px; /* Exact terrain size */
    border: 1px solid #072b2e; /* Exact terrain border color */
    border-radius: 25px; /* Exact terrain border radius */
    overflow: visible; /* Changed to allow purchase widget to extend below */
    cursor: pointer;
    transition: all 0.2s ease, margin-top 0.3s ease; /* Added margin transition for spacing adjustment */
    background: transparent;
    flex: 0 0 auto;
    display: block;
}

/* Plant item with active purchase widget */
.plant-item.has-active-widget {
    margin-bottom: 350px; /* Reduced spacing - widget extends ~320px + 30px gap */
}

/* Allow widget interactions when widget is active */
.plant-item.has-active-widget .plant-image-container {
    pointer-events: none; /* Allow clicks to pass through to widget */
}

.plant-item.has-active-widget .species-name-banner,
.plant-item.has-active-widget .image-selector {
    pointer-events: auto; /* But keep navigation working */
}

/* Plant items that come after an active widget (push down) */
.plant-item.push-down {
    margin-top: 350px; /* Reduced spacing - widget extends ~320px + 30px gap */
}

/* Smaller spacing for no-inventory widgets */
.plant-item.has-active-widget-small {
    margin-bottom: 150px; /* Small widget height (~130px) + 20px gap */
}

.plant-item.push-down-small {
    margin-top: 150px; /* Small widget height (~130px) + 20px gap */
}

.plant-item:hover {
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

/* Plant image container */
.plant-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 25px; /* Match terrain border radius */
    background: transparent;
    z-index: 2; /* Above widget but below navigation elements */
}

.plant-image,
.species-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease-in-out; /* Exact terrain transition */
    border-radius: 0; /* Images inside container don't need border radius */
}

/* Image hover animations removed - only show purchase icon on hover */

/* Cart button - positioned above layer controls */
.cart-button {
    position: fixed;
    top: 60px; /* Above layer controls, below view cube */
    right: 240px; /* To the left of control panel (which is at right: 10px) */
    width: 40px; /* Smaller to fit just the truck */
    height: 40px;
    background: transparent; /* No background circle */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.cart-button:hover {
    transform: translateY(-2px);
}

.cart-icon {
    width: 32px; /* Slightly larger for better visibility */
    height: 32px;
    background-image: url('../images/truck.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); /* Add shadow for visibility */
}

.cart-counter {
    position: absolute;
    top: -2px; /* Adjusted to sit in truck bed area */
    right: 15px; /* Moved left to be in the truck bed */
    background: #072b2e; /* Match ecodash blue color */
    color: white;
    border-radius: 50%;
    width: 18px; /* Slightly smaller to be proportional */
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    font-family: 'Nunito', sans-serif;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Add shadow for better visibility */
}

.cart-counter.visible {
    opacity: 1;
    transform: scale(1);
}

/* Cart popup - similar styling to purchase widget */
.cart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: #072b2e;
    border: 2px solid #ffffff20;
    border-radius: 25px;
    padding: 30px;
    z-index: 1500;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.cart-popup.visible {
    opacity: 1;
    visibility: visible;
}

.cart-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
    font-family: 'Nunito', sans-serif;
}

.cart-title {
    font-size: 24px;
    font-weight: bold;
}

.cart-close {
    background: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #072b2e;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close:hover {
    background: #f0f0f0;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    color: white;
    font-family: 'Nunito', sans-serif;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-quantity {
    font-size: 14px;
    opacity: 0.8;
}

.cart-item-remove {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-item-remove:hover {
    background: #ff6666;
}

.cart-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    padding: 40px 20px;
}

/* Cart summary */
.cart-summary {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
}

.cart-summary-line.cart-total {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 700;
    font-size: 16px;
    color: white;
}

/* Cart overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Purchase widget - seamless extension of plant item */
.plant-purchase-widget {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0; /* Use right instead of fixed width to prevent overflow */
    max-width: 360px;
    background: #072b2e;
    border: 1px solid #072b2e;
    border-radius: 0 0 25px 25px;
    border-top: none;
    padding: 20px 20px 30px 20px; /* Extra bottom padding to extend height */
    padding-top: 45px; /* Extra top padding to push content down below image */
    min-height: 468px; /* Accommodate full card with max image height (300px) */
    z-index: 1; /* Above plant image container (2), but below species banner (5), and navigation (6) */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-25px); /* Move up significantly to flow from behind plant image */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: default; /* Override parent plant-item cursor: pointer */
    pointer-events: auto; /* Ensure widget can still receive interactions for its buttons */
}

.plant-purchase-widget.visible {
    opacity: 1;
    visibility: visible;
}

.purchase-widget-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    z-index: 4; /* Above widget (3) but below species banner (5) */
}

.purchase-widget-close {
    position: absolute;
    top: -15px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #072b2e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 20;
    pointer-events: auto; /* Ensure close button is clickable */
}

.purchase-widget-close:hover {
    background: #f0f0f0;
}

.purchase-inventory-info {
    color: white;
    font-family: 'Nunito', sans-serif;
}

.inventory-available {
    font-size: 14px;
    margin-bottom: 2px;
    opacity: 0.8;
}

.inventory-location {
    font-size: 12px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inventory-price {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.inventory-size {
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.8;
}

.purchase-widget-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 4; /* Above widget (3) but below species banner (5) */
    position: relative;
}

.add-to-cart-btn {
    background: white;
    color: #072b2e;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: auto; /* Ensure button is clickable */
    position: relative;
    z-index: 4;
}

.add-to-cart-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #072b2e;
    cursor: pointer;
    transition: background-color 0.2s ease;
    pointer-events: auto; /* Ensure buttons are clickable */
    position: relative;
    z-index: 4;
}

.quantity-btn:hover {
    background: #f0f0f0;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    min-width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #072b2e;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

/* Plant name overlay - exact terrain styling */
.species-name-banner {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    align-items: flex-start;
    z-index: 5;
}

.text-overlay {
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    position: relative;
    z-index: 2;
    display: inline;
    background-color: #01213dcb;
    border-bottom-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 25px;
    border-top-left-radius: 25px;
    padding: 5px 20px;
}

.genus {
    display: block;
    font-weight: bold;
    line-height: 1.2;
}

.species {
    display: block;
    font-weight: normal;
    line-height: 1.2;
}

/* Purchase hover icon - mirrors plant name corner styling */
.plant-purchase-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    background: white;
    border-top-left-radius: 0px;
    border-top-right-radius: 25px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.plant-item:hover .plant-purchase-icon {
    opacity: 1;
    transform: scale(1);
}

.plant-purchase-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.purchase-icon-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-plus {
    position: absolute;
    font-size: 20px;
    font-weight: bold;
    color: #072b2e;
    z-index: 2;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.purchase-truck {
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url('../images/truck.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    filter: contrast(1.2);
}

/* Legacy support for existing structure */
.plant-name-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    background: transparent;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
}

.plant-name-overlay .species {
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: normal;
    margin: 0;
    font-style: normal;
    line-height: 1.2;
    text-shadow: none;
    background-color: #01213dcb;
    border-bottom-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 25px;
    border-top-left-radius: 25px;
    padding: 5px 20px;
    display: inline-block;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
}

/* Navigation arrows - exact terrain styling */
.img-arrow {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    padding: 10px;
    margin: -5px;
    cursor: pointer;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: auto;
    width: auto;
    height: auto;
    border-radius: 0;
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.img-arrow:hover {
    color: white;
    transform: translateY(-50%);
    background: transparent;
}

.img-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

/* Old arrow positioning removed - now handled by .image-selector flexbox layout */

.img-arrow svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Simplified image selector - arrows at edges, dots centered independently */
.image-selector {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 24px; /* Set explicit height for positioning */
    z-index: 6;
    pointer-events: none;
}

/* Image indicators container - independently centered */
.img-indicators {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    gap: 0; /* No gap between indicators - they handle their own spacing */
}

.indicator-wrapper {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.indicator {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background-color: transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.indicator-wrapper:hover .indicator {
    border-color: white;
    transform: scale(1.1);
}

.indicator-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 20px;
    background-color: white;
    border: 1px solid #072b2e;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Remove old plant info styles */
.plant-info,
.plant-name,
.plant-common-name {
    display: none;
}

/* Navigation arrows - positioned at absolute edges */
.image-selector .img-arrow {
    pointer-events: auto;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0;
    z-index: 1;
}

.image-selector .img-arrow.left {
    left: 10px !important; /* 10px from left edge */
    right: auto !important;
}

.image-selector .img-arrow.right {
    right: 10px !important; /* 10px from right edge */
    left: auto !important;
}

/* Clean up any conflicting styles */
.img-arrow.left:not(.image-selector .img-arrow),
.img-arrow.right:not(.image-selector .img-arrow) {
    position: static;
    left: auto;
    right: auto;
}

/* Loading states */
.loading-plants {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.plant-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No plants state */
.no-plants {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.no-plants-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.no-plants-suggestion {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
}

/* Error state */
.plant-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.plant-error-icon {
    font-size: 24px;
    margin-bottom: 12px;
}

.retry-plants-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.retry-plants-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Plant filters panel - terrain-style dropdown */
.plant-filters-panel {
    position: fixed;
    transform-origin: top center;
    width: var(--button-width, 250px); /* Use button width when connected, fallback to 250px */
    min-width: 250px; /* Minimum width for content readability */
    box-sizing: border-box;
    height: 0;
    background-color: #ffffff;
    padding: 0;
    border: 1px solid rgba(7, 43, 46, 0.2);
    border-top: none; /* Remove top border for seamless connection */
    border-radius: 0 0 25px 25px; /* Remove top radius for seamless connection */
    margin-top: 0;
    z-index: 1002;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    will-change: height, opacity, top, left;
    /* Position below refine button when shown */
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
}

.plant-filters-panel.visible {
    height: 70vh;
    opacity: 1;
    pointer-events: auto;
}

.plant-filters-panel.content-visible {
    padding: 15px 15px 20px 15px;
    overflow-y: scroll;
    scrollbar-width: none;
}

.plant-filters-panel.content-visible::-webkit-scrollbar {
    display: none;
}

.plant-filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 43, 46, 0.05); /* Minimal overlay like terrain */
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4375s ease, visibility 0.4375s ease;
    pointer-events: none;
}

.plant-filters-panel.visible + .plant-filters-overlay,
.plant-filters-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.filter-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: 100%;
    margin: 0 auto;
}

.plant-filters-panel.content-visible .filter-content {
    opacity: 1;
    transform: translateY(0);
}

/* Terrain-style filter headers and controls */
.filter-header,
.filter-parameter {
    cursor: pointer;
    padding-left: 25px;
    margin-top: 15px;
    position: relative;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #072b2e;
    font-size: 16px;
}

.filter-selector {
    display: flex;
    align-items: center;
    padding-left: 25px;
    margin-top: 6px;
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    color: #072b2e;
    font-size: 16px;
}

.filter-selector input {
    margin-right: 8px;
    transform: scale(1.33);
    margin-left: 0;
}

.toggle-icon {
    position: absolute;
    left: 0;
    margin-left: 5px;
    color: slategray;
    font-weight: bold;
    width: 20px;
    display: inline-block;
    text-align: center;
}

/* Compatibility header for existing structure */
.plant-filters-header {
    display: none; /* Hide since we're using inline controls */
}

.plant-filters-close {
    display: none; /* Hide since we use terrain-style auto-close */
}

.plant-filters-body {
    padding: 0; /* Remove padding to match terrain style */
    max-height: none;
    overflow: visible;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    font-family: 'Oxygen', sans-serif;
}

.filter-section label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 6px;
    cursor: pointer;
    padding-left: 20px;
    position: relative;
    font-family: 'Oxygen', sans-serif;
}

.filter-section input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 2px;
    margin: 0;
    accent-color: rgba(255, 255, 255, 0.8);
}

/* Terrain-style filter actions */
.filter-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(7, 43, 46, 0.2);
    display: flex;
    justify-content: center;
    gap: 15px;
}

.apply-filters-btn,
.clear-filters-btn {
    background: linear-gradient(135deg, #072b2e 0%, #01213d 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    width: 120px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 14px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.apply-filters-btn:hover,
.clear-filters-btn:hover {
    background-color: #01213d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.clear-filters-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.clear-filters-btn:hover {
    background-color: #495057;
}

.loading-filters {
    text-align: center;
    color: #072b2e;
    padding: 20px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-style: italic;
}

/* Terrain-style hierarchical filter styling */
.filter-children {
    margin-bottom: 8px;
}

/* Terrain-style section separator */
.filter-separator {
    border-bottom: 1px solid #072b2e;
    width: 33%;
    margin: 6px 0;
    margin-top: 15px;
    height: 0;
    flex-shrink: 0;
}

.filter-checkbox {
    margin: 0;
    accent-color: #072b2e;
    transform: scale(1.33);
}

.filter-selector label {
    color: #072b2e;
    font-size: 16px;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    user-select: none;
    flex: 1;
    font-weight: 300;
    margin-left: 8px;
}

.filter-selector:hover label {
    color: #01213d;
}

.filter-toggle-icon {
    color: slategray;
    font-weight: bold;
    font-size: 16px;
    width: 20px;
    display: inline-block;
    text-align: center;
}

/* Mobile responsiveness for plant grid */
@media screen and (max-width: 767px) {
    .plant-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 15px; /* Maintain reasonable gap on mobile */
        padding: 15px;
    }

    .focus-panel.plant-mode {
        width: calc(100vw - 20px) !important; /* Full width minus margin on mobile */
    }

    .focus-panel.metrics-mode {
        width: calc(100vw - 20px) !important;
    }

    .focus-panel.metrics-mode .metric-row {
        width: 100%; /* Single column on mobile */
        margin-right: 0;
    }

    .plant-item {
        width: 100%; /* Fill available space on mobile */
        height: 200px; /* Reasonable mobile height */
    }

    .plant-image-container {
        height: 200px;
    }

    .plant-filters-content {
        width: 95%;
        max-height: 85vh;
    }
}

/* Multi-Card Purchase Widget System */

/* Update main widget container for card layout */
.plant-purchase-widget {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 360px;
    background: #072b2e;
    border: 1px solid #072b2e;
    border-radius: 0 0 25px 25px;
    border-top: none;
    padding: 15px;
    padding-top: 45px;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-25px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 400px; /* Constrain height for scrolling */
}

/* Cards container - scrollable for 3+ cards */
.purchase-cards-container {
    max-height: 468px; /* Accommodate full card with max image height */
    overflow-y: auto;
    padding-right: 5px; /* Space for scrollbar */
}

.purchase-cards-container::-webkit-scrollbar {
    width: 4px;
}

.purchase-cards-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.purchase-cards-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.purchase-cards-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Individual inventory card */
.inventory-card {
    background: #072b2e; /* Ecodash blue background */
    border: 2px solid white; /* White outline as shown in mockup */
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.inventory-card:last-child {
    margin-bottom: 0;
}

/* Card image container */
.card-image-container {
    position: relative;
    min-height: 120px; /* Minimum height (current height) */
    max-height: 300px; /* Maximum height (2.5x current) */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #072b2e; /* Ecodash blue background for aspect ratio gaps */
    border-top-left-radius: 10px; /* Match card radius minus border */
    border-top-right-radius: 10px;
}

.card-image {
    width: 100%;
    height: auto; /* Allow height to adjust for aspect ratio */
    min-height: 120px;
    max-height: 300px;
    object-fit: cover; /* Fill full width, crop top/bottom if needed */
    object-position: center;
}

/* Image caption with white outline as shown in mockup */
.card-caption {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(7, 43, 46, 0.9); /* Semi-transparent Ecodash blue */
    color: white;
    padding: 8px 20px;
    border-bottom-right-radius: 25px;
    border-top-left-radius: 12px; /* Match card radius */
    border: 1px solid white; /* Thin white outline */
    font-size: 10pt;
    font-weight: normal;
    font-style: italic;
    text-transform: none;
    letter-spacing: normal;
    font-family: 'Nunito', sans-serif;
}

/* Card content section with JetBrains Mono font */
.card-content {
    padding: 12px;
    font-family: 'JetBrains Mono', monospace; /* JetBrains Mono for all text content */
    color: white;
}

/* Top section: quantity/nursery on left, price on right */
.card-info-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-left-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.quantity-available {
    font-size: 12pt; /* 12pt as specified */
    font-weight: normal;
    margin-bottom: 2px;
}

.qty-number {
    font-weight: bold; /* Bold for quantity number only */
}

.nursery-name {
    font-size: 12pt; /* 12pt as specified */
    font-weight: normal;
    font-style: italic; /* Italic as specified */
}

.card-price {
    font-size: 21pt; /* 21pt as specified */
    font-weight: normal;
    margin: 0;
}

/* Bottom section: size on left, actions on right */
.card-info-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 8px;
}

.card-size {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.container-size {
    font-size: 12pt;
    font-weight: normal;
    margin-bottom: 2px;
}

.plant-dimensions {
    font-size: 12pt;
    font-weight: normal;
}

.dimension-numbers {
    font-weight: bold; /* Bold for dimension numbers only */
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    min-height: 44px;
    align-items: center;
}

.card-buy-btn {
    background: #e0e0e0;
    color: black;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Nunito', sans-serif; /* Use Nunito for buttons */
}

.card-buy-btn:hover {
    background: #d0d0d0;
    transform: translateY(-1px);
}

.card-buy-btn.disabled,
.card-buy-btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

/* Card quantity controls (replaces buy button in same space) */
.card-quantity-controls {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.card-quantity-controls .quantity-selector {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-quantity-controls .quantity-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #072b2e;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Nunito', sans-serif;
}

.card-quantity-controls .quantity-btn:hover {
    background: #f0f0f0;
}

.card-quantity-controls .quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card-quantity-controls .quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #072b2e;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
}

.card-quantity-controls .add-to-cart-btn {
    background: #e0e0e0;
    color: black;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Nunito', sans-serif;
}

.card-quantity-controls .add-to-cart-btn:hover {
    background: #d0d0d0;
}

/* White horizontal divider between cards */
.inventory-card:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -12px; /* Exactly in middle of 20px margin-bottom */
    left: 0;
    right: 0;
    height: 1px;
    background: white;
    opacity: 0.8;
    z-index: 10; /* Above widget background, same level as card borders */
    pointer-events: none; /* Prevent interaction with dividers */
}

/* Hide the HTML card-divider elements since we're using CSS pseudo-elements */
.card-divider {
    display: none;
}

/* No inventory message */
.no-inventory-message {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Nunito', sans-serif;
    font-style: italic;
}

.no-inventory-message p {
    margin: 0;
    font-size: 14px;
}

/* Smaller widget variant for no inventory */
.plant-purchase-widget.no-inventory {
    min-height: 80px; /* Much smaller - just for message + close button */
}

.plant-purchase-widget.no-inventory .purchase-cards-container {
    max-height: 80px; /* Match the smaller widget height */
    overflow: visible; /* No need for scrolling with just a message */
}
